Skip to main content
POST
/
create
/
expense
Create expense
curl --request POST \
  --url https://staging-api.usetyms.com/v1/adam/create/expense \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "date": "2026-03-03",
  "currency": "NGN",
  "document_number": "EXP-220",
  "narration": "Team lunch — client meeting",
  "customer": "c9b8a7d6e5f4438290a1b2c3d4e5f6c0",
  "payment_category": "Main Operating Account",
  "amount_paid": 18500,
  "items": [
    {
      "item_name": "Meals and entertainment",
      "quantity": 1,
      "selling_price": 18500,
      "category": "Meals & Entertainment"
    }
  ]
}
'
import requests

url = "https://staging-api.usetyms.com/v1/adam/create/expense"

payload = {
"date": "2026-03-03",
"currency": "NGN",
"document_number": "EXP-220",
"narration": "Team lunch — client meeting",
"customer": "c9b8a7d6e5f4438290a1b2c3d4e5f6c0",
"payment_category": "Main Operating Account",
"amount_paid": 18500,
"items": [
{
"item_name": "Meals and entertainment",
"quantity": 1,
"selling_price": 18500,
"category": "Meals & Entertainment"
}
]
}
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({
date: '2026-03-03',
currency: 'NGN',
document_number: 'EXP-220',
narration: 'Team lunch — client meeting',
customer: 'c9b8a7d6e5f4438290a1b2c3d4e5f6c0',
payment_category: 'Main Operating Account',
amount_paid: 18500,
items: [
{
item_name: 'Meals and entertainment',
quantity: 1,
selling_price: 18500,
category: 'Meals & Entertainment'
}
]
})
};

fetch('https://staging-api.usetyms.com/v1/adam/create/expense', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
{
  "status": "success",
  "message": "Expenses imported successfully",
  "data": [
    {
      "uuid": "a0b1c2d3e4f5428290a1b2c3d4e5f6b1",
      "transaction_type": "expenses",
      "status": "paid"
    }
  ]
}
{
"status": "failed",
"message": "<string>"
}

Authorizations

X-API-Key
string
header
default:your_tyms_sk_or_partner_key
required

Business secret tyms_sk_... for business-scoped routes. Partner secret for register-business and referred-business distributor routes.

Body

application/json
date
string<date>
required

Expense date.

items
object[]
required
Minimum array length: 1
payment_category
string
required

Cash or bank name paid from.

amount_paid
number
required

Amount paid. Defaults from lines if omitted.

currency
string
customer
string
document_number
string

Alias: bill_no.

narration
string

Response

Expense created

status
string
required
Example:

"success"

message
string
required
data
any

Single resource, array of resources, statement sections, or async job metadata — see each operation's example.

meta
object

Pagination (page, limit, total) and/or report range (from, to). Cash flow may include previous_period_end.