Skip to content

Tag a transaction with a subcategory

Request

Tags an expense or topup transaction with a subcategory. IFT and REFUND transactions are not supported.

Security
oauth2ClientCredentials(Required scopes: transactions:write)
Path
idstringrequired
Headers
org_wallet_refstring

Organization wallet reference, defaults to "1" if not provided

business_idstringrequired

Business identifier for the request

Bodyapplication/jsonrequired
subcategoryIdstringrequired

Subcategory ID to assign (MongoDB ObjectId)

Example:"64ec5b4bffaef6ff2a28455d"
curl -i -X POST \
  'https://developer.boyahq.com/_mock/v2/openapi/transactions/{id}/tag' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'business_id: string' \
  -H 'org_wallet_ref: string' \
  -d '{
    "subcategoryId": "64ec5b4bffaef6ff2a28455d"
  }'

Responses

Transaction tagged successfully

Bodyapplication/json
_idstring

Transaction MongoDB ID

currencystring

Transaction currency (USD/KES)

org_wallet_refstring

Organization wallet reference

accountstring

Account number

creditnumber

Credit amount

counternumber

Transaction counter

debitnumber

Debit amount

descriptionstring

Transaction description

refstring

Transaction reference

created_bystring

Created by user ID

transaction_typestring

Transaction type

Enum:"IFT""EXPENSE""TOPUP""REFUND""INTERNAL TRANSFER""OVERDRAFT""REPAYMENT""BRANCH TRANSFER"
iftobject(IftDto)

IFT transaction details

expenseobject(ExpenseV1Dto)

Expense transaction details

topupobject(TopupDto)

Topup transaction details

refundobject(RefundDto)

Refund transaction details

running_balancenumber

Running account balance

business_running_balancenumber

Business running balance

createdAtstring

Created timestamp

updatedAtstring

Updated timestamp

__vnumber

Version key

idstring

Auto-generated ID field

Response
{ "_id": "string", "currency": "string", "org_wallet_ref": "string", "account": "string", "credit": 0, "counter": 0, "debit": 0, "description": "string", "ref": "string", "created_by": "string", "transaction_type": "IFT", "ift": { "_id": "string", "ref": "string", "amount": 0, "description": "string", "account": "string", "person": "string", "org_wallet_ref": "string", "currency": "string", "created_by": "string", "createdAt": "string", "updatedAt": "string", "__v": 0 }, "expense": { "_id": "string", "amount": 0, "fees": 0, "charge": 0, "original_currency": "string", "currency": "string", "original_amount": 0, "transaction_ref": "string", "provider_ref": "string", "employee_id": "string", "person": "string", "vendor_ref": {}, "transaction_date": "string", "MerchantCategoryCode": "string", "MerchantIdentifier": "string", "fx_rate": 0, "card_vcn": "string", "receiver": "string", "accno": "string", "payment_type": "string", "channel": "string", "subcategory": {}, "team": {}, "tag": [], "notes": "string", "risk": "string", "risk_notes": "string", "ip": "string", "attachments": [], "invoice_attachments": [], "payment_status": "string", "status": "string", "review_participants": [], "review_mandate": 0, "review_level": 0, "priority": 0, "events": [], "exported": true, "tax_compliant": true, "sync_successful": true, "org_wallet_ref": "string", "vendor": "string", "customer": {}, "subscription_id": "string", "account_number": "string", "scan": [], "batched": true, "line_items": [], "employee_external_id": {}, "employee": {}, "reviews": [], "createdAt": "string", "updatedAt": "string", "__v": 0, "requisition_reference": "string", "acknowledged_by_ai": true, "analysed_by_ai": true, "attachments_data": [], "deleted_attachments": [], "ready_for_ai": true, "send_to_ai_attempts": 0, "sent_to_ai": true, "id": "string" }, "topup": { "_id": "string", "ref": "string", "description": "string", "amount": 0, "account": "string", "channel": "string", "is_employee_topup": true, "exported": true, "sync_successful": true, "created_by": "string", "status": "string", "subcategory": {}, "createdAt": "string", "updatedAt": "string", "__v": 0, "attachments": [] }, "refund": { "_id": "string", "ref": "string", "transaction_ref": "string", "description": "string", "amount": 0, "account": "string", "employee_id": "string", "status": "string", "vendor": "string", "org_wallet_ref": "string", "currency": "string", "createdAt": "string", "updatedAt": "string", "__v": 0 }, "running_balance": 0, "business_running_balance": 0, "createdAt": "string", "updatedAt": "string", "__v": 0, "id": "string" }