Create a vendor
Creates a new vendor (supplier) record. vendorCode must be unique; paymentTermsDays defaults to 30. New vendors are active.
How to use it
- Pick a unique vendorCode and send it with vendorName; add contact details and paymentTermsDays (default 30) if known.
- A duplicate vendorCode is rejected. Keep the returned id for purchase orders and vendor prices.
- Next, record what the vendor supplies with Add an item price to a vendor.
BearerAuthAuthorizationBearer <JWT>X-TenantID*stringYour merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.
application/json- body
vendorCode*stringRequired. Your short code for the vendor. Must be unique; it cannot be changed later.
vendorName*stringRequired. Vendor's business name.
contactName?|Optional main contact person.
contactEmail?|Optional contact email address.
contactPhone?|Optional contact phone number.
address?|Optional address, as free text.
paymentTermsDays*integerDays the merchant has to pay the vendor's invoices. Defaults to 30.
int32notes?|Optional free-text notes.
OK
*/*- response
status*stringOutcome of the call: SUCCESS when it worked, ERROR when it failed.
message*stringShort human-readable message describing the outcome, for example "Vendor created". Do not parse it.
data?The vendor record.
curl -X POST 'https://beta.iotoms.com/api/v1/procurement/vendors' \ -H 'X-TenantID: your-tenant-code' \ -H 'Content-Type: application/json' \ -d '{ "vendorCode": "string", "vendorName": "string", "paymentTermsDays": 0}'{ "status": "string", "message": "string", "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "vendorCode": "string", "vendorName": "string", "contactName": "string", "contactEmail": "string", "contactPhone": "string", "address": "string", "paymentTermsDays": 0, "isActive": true, "notes": "string", "createdAt": "2019-08-24T14:15:22Z" }}