curl --request PATCH \
--url https://staging-api.usetyms.com/v1/adam/purchase-orders/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"date": "2026-04-05",
"delivery_date": "2026-04-20",
"currency": "NGN",
"document_number": "PO-0042",
"narration": "Q2 stock replenishment",
"customer": "v8e7d6c5b4a3418290f0e9d8c7b6a5947",
"items": [
{
"item_name": "Wireless Mouse",
"quantity": 50,
"selling_price": 9000,
"category": "Inventory"
}
]
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/purchase-orders/{uuid}"
payload = {
"date": "2026-04-05",
"delivery_date": "2026-04-20",
"currency": "NGN",
"document_number": "PO-0042",
"narration": "Q2 stock replenishment",
"customer": "v8e7d6c5b4a3418290f0e9d8c7b6a5947",
"items": [
{
"item_name": "Wireless Mouse",
"quantity": 50,
"selling_price": 9000,
"category": "Inventory"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2026-04-05',
delivery_date: '2026-04-20',
currency: 'NGN',
document_number: 'PO-0042',
narration: 'Q2 stock replenishment',
customer: 'v8e7d6c5b4a3418290f0e9d8c7b6a5947',
items: [
{
item_name: 'Wireless Mouse',
quantity: 50,
selling_price: 9000,
category: 'Inventory'
}
]
})
};
fetch('https://staging-api.usetyms.com/v1/adam/purchase-orders/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "<string>",
"data": "<unknown>",
"meta": {}
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}Update purchase order (partial)
curl --request PATCH \
--url https://staging-api.usetyms.com/v1/adam/purchase-orders/{uuid} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"date": "2026-04-05",
"delivery_date": "2026-04-20",
"currency": "NGN",
"document_number": "PO-0042",
"narration": "Q2 stock replenishment",
"customer": "v8e7d6c5b4a3418290f0e9d8c7b6a5947",
"items": [
{
"item_name": "Wireless Mouse",
"quantity": 50,
"selling_price": 9000,
"category": "Inventory"
}
]
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/purchase-orders/{uuid}"
payload = {
"date": "2026-04-05",
"delivery_date": "2026-04-20",
"currency": "NGN",
"document_number": "PO-0042",
"narration": "Q2 stock replenishment",
"customer": "v8e7d6c5b4a3418290f0e9d8c7b6a5947",
"items": [
{
"item_name": "Wireless Mouse",
"quantity": 50,
"selling_price": 9000,
"category": "Inventory"
}
]
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
date: '2026-04-05',
delivery_date: '2026-04-20',
currency: 'NGN',
document_number: 'PO-0042',
narration: 'Q2 stock replenishment',
customer: 'v8e7d6c5b4a3418290f0e9d8c7b6a5947',
items: [
{
item_name: 'Wireless Mouse',
quantity: 50,
selling_price: 9000,
category: 'Inventory'
}
]
})
};
fetch('https://staging-api.usetyms.com/v1/adam/purchase-orders/{uuid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "<string>",
"data": "<unknown>",
"meta": {}
}{
"status": "failed",
"message": "<string>"
}{
"status": "failed",
"message": "<string>"
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Path Parameters
Record uuid.
Body
Purchase order date.
Line items.
1Hide child attributes
Hide child attributes
Line label. Alias: name.
Quantity sold or purchased.
Unit price. On bills this is unit cost. Alias: price.
Required. Revenue, expense, or inventory account — name, uuid, or account code.
Optional line description.
Tax rate as a percentage (e.g. 7.5 = 7.5%). Preferred over tax_uuid.
Optional tax record uuid instead of tax percentage.
Withholding tax (WHT) rate as a percentage.
Optional WHT uuid instead of withholding_tax percentage.
Line discount value.
percent or amount / fixed.
percent, amount, fixed true if the line affects stock.
Existing inventory item uuid when linking stock.
Expected delivery date.
Currency code.
PO number; auto-assigned if omitted.
PO title / description.
Internal note.
Vendor contact uuid, name, or email. Alias: vendor.
Default 1.
Default draft.
Response
Purchase order updated