iotoms Docs

Create a vendor

POST
/api/v1/procurement/vendors

Creates a new vendor (supplier) record. vendorCode must be unique; paymentTermsDays defaults to 30. New vendors are active.

How to use it

  1. Pick a unique vendorCode and send it with vendorName; add contact details and paymentTermsDays (default 30) if known.
  2. A duplicate vendorCode is rejected. Keep the returned id for purchase orders and vendor prices.
  3. Next, record what the vendor supplies with Add an item price to a vendor.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Header Parameters

X-TenantID*string

Your merchant's tenant code — the value typed in the Domain field on the iotoms login screen. See Concepts.

Request Body

application/json
  1. body
vendorCode*string

Required. Your short code for the vendor. Must be unique; it cannot be changed later.

vendorName*string

Required. 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*integer

Days the merchant has to pay the vendor's invoices. Defaults to 30.

Formatint32
notes?|

Optional free-text notes.

Response Body

OK

*/*
  1. response
status*string

Outcome of the call: SUCCESS when it worked, ERROR when it failed.

message*string

Short human-readable message describing the outcome, for example "Vendor created". Do not parse it.

data?

The vendor record.

Example Request
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}'
Example Response
{  "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"  }}