iotoms Docs

Update a vendor

PATCH
/api/v1/procurement/vendors/{id}

Partially updates a vendor: only the fields you send are changed. Send isActive: false to deactivate a vendor. The vendor code cannot be changed.

How to use it

  1. Take the vendor id from List vendors or Get a vendor.
  2. Send only the fields to change; omitted fields keep their values.
  3. Send isActive false to deactivate the vendor, which hides it from List vendors when activeOnly=true.

Authorization

BearerAuth
headerAuthorizationBearer <JWT>

Path Parameters

id*string

ID of the record (UUID).

Formatuuid

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
vendorName?|

New business name. Omit to keep the current value.

contactName?|

New contact person. Omit to keep the current value.

contactEmail?|

New contact email. Omit to keep the current value.

contactPhone?|

New contact phone. Omit to keep the current value.

address?|

New address. Omit to keep the current value.

paymentTermsDays?|

New payment terms in days. Omit to keep the current value.

Formatint32
isActive?|

Send false to deactivate the vendor or true to reactivate it. Omit to keep the current value.

notes?|

New notes. Omit to keep the current value.

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 PATCH 'https://beta.iotoms.com/api/v1/procurement/vendors/497f6eca-6276-4993-bfeb-53cbbbba6f08' \  -H 'X-TenantID: your-tenant-code' \  -H 'Content-Type: application/json' \  -d '{}'
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"  }}