Create inventory item (manual or AI)
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/inventories \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Wireless Mouse",
"selling_price": 15000,
"cost_price": 9000,
"stock": 100,
"unit": "pcs",
"type": "product",
"is_inventory": true,
"currency": "NGN"
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/inventories"
payload = {
"name": "Wireless Mouse",
"selling_price": 15000,
"cost_price": 9000,
"stock": 100,
"unit": "pcs",
"type": "product",
"is_inventory": True,
"currency": "NGN"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Wireless Mouse',
selling_price: 15000,
cost_price: 9000,
stock: 100,
unit: 'pcs',
type: 'product',
is_inventory: true,
currency: 'NGN'
})
};
fetch('https://staging-api.usetyms.com/v1/adam/inventories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Inventory item created successfully",
"data": {
"uuid": "inv-uuid-1",
"name": "Wireless Mouse",
"selling_price": 15000,
"cost_price": 9000,
"stock": 100,
"unit": "pcs",
"type": "product",
"is_inventory": true,
"currency": "NGN"
}
}{
"status": "failed",
"message": "<string>"
}Inventory
Create inventory item (manual or AI)
Create a new product or service item in the Tyms catalog. Set is_inventory: true to track stock; omit for non-stocked services. Supports AI create when prompt is present.
POST
/
inventories
Create inventory item (manual or AI)
curl --request POST \
--url https://staging-api.usetyms.com/v1/adam/inventories \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Wireless Mouse",
"selling_price": 15000,
"cost_price": 9000,
"stock": 100,
"unit": "pcs",
"type": "product",
"is_inventory": true,
"currency": "NGN"
}
'import requests
url = "https://staging-api.usetyms.com/v1/adam/inventories"
payload = {
"name": "Wireless Mouse",
"selling_price": 15000,
"cost_price": 9000,
"stock": 100,
"unit": "pcs",
"type": "product",
"is_inventory": True,
"currency": "NGN"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Wireless Mouse',
selling_price: 15000,
cost_price: 9000,
stock: 100,
unit: 'pcs',
type: 'product',
is_inventory: true,
currency: 'NGN'
})
};
fetch('https://staging-api.usetyms.com/v1/adam/inventories', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"status": "success",
"message": "Inventory item created successfully",
"data": {
"uuid": "inv-uuid-1",
"name": "Wireless Mouse",
"selling_price": 15000,
"cost_price": 9000,
"stock": 100,
"unit": "pcs",
"type": "product",
"is_inventory": true,
"currency": "NGN"
}
}{
"status": "failed",
"message": "<string>"
}Authorizations
Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.
Body
application/json
Item name.
Default selling price.
Unit cost for COGS and stock valuation.
Opening stock quantity.
Unit of measure (e.g. pcs, kg).
Set true to track stock movements. Omit for non-stocked services.
Item type.
Available options:
product, service Item currency; defaults to business currency.
Item description.
Revenue account name/uuid/code for sales lines.
Expense or COGS account name/uuid/code for cost lines.
Response
Item created