Skip to content

Update expense subcategory

Request

Security
oauth2ClientCredentials(Required scopes: expenses:write)
Path
expenseIdstringrequired
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 to the expense

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

Responses

Expense subcategory updated successfully

Bodyapplication/json
_idstring

MongoDB ID

amountnumber

Expense amount

feesnumber

Transaction fees

chargenumber

Total charge amount

original_currencystring

Original currency

currencystring

Current currency

original_amountnumber

Original amount

transaction_refstring

Transaction reference

provider_refstring

Provider reference

employee_idstring

Employee ID

personstring

Person name

vendor_refobject

Vendor reference

transaction_datestring

Transaction date

MerchantCategoryCodestring

Merchant category code

MerchantIdentifierstring

Merchant identifier

fx_ratenumber

Foreign exchange rate

card_vcnstring

Card VCN

receiverstring

Transaction receiver

accnostring

Account number

payment_typestring

Payment type

channelstring

Payment channel

subcategoryobject(SubcategoryDto)

Subcategory details

teamobject(TeamDto)

Team details

tagArray of objects(TagDto)

Tags array

notesstring

Transaction notes

riskstring

Risk level

risk_notesstring

Risk notes

ipstring

IP address

attachmentsArray of strings

Attachment URLs

invoice_attachmentsArray of strings

Invoice attachment URLs

payment_statusstring

Payment status

statusstring

Expense status

review_participantsArray of strings

Review participants

review_mandatenumber

Review mandate

review_levelnumber

Review level

prioritynumber

Priority level

eventsArray of strings

Events array

exportedboolean

Exported flag

tax_compliantboolean

Tax compliant flag

sync_successfulboolean

Sync successful flag

org_wallet_refstring

Organization wallet reference

vendorstring

Vendor name

customerobject

Customer info

subscription_idstring

Subscription ID

account_numberstring

Account number

scanArray of objects(ScanDto)

Scan results

batchedboolean

Batched flag

line_itemsArray of objects(LineItemDto)

Line items

employee_external_idobject

Employee external ID

employeeobject(EmployeeInfoDto)

Employee details

reviewsArray of objects(ReviewDto)

Reviews array

createdAtstring

Created timestamp

updatedAtstring

Updated timestamp

__vnumber

Version key

requisition_referencestring

Requisition reference

acknowledged_by_aiboolean

AI acknowledged flag

analysed_by_aiboolean

AI analysed flag

attachments_dataArray of strings

Attachments data array

deleted_attachmentsArray of strings

Deleted attachments array

ready_for_aiboolean

Ready for AI processing flag

send_to_ai_attemptsnumber

Send to AI attempts count

sent_to_aiboolean

Sent to AI flag

idstring

Auto-generated ID field

Response
{ "_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": { "_id": "string", "category": {}, "code": "string", "name": "string" }, "team": { "_id": "string", "name": "string", "code": "string" }, "tag": [ {} ], "notes": "string", "risk": "string", "risk_notes": "string", "ip": "string", "attachments": [ "string" ], "invoice_attachments": [ "string" ], "payment_status": "string", "status": "string", "review_participants": [ "string" ], "review_mandate": 0, "review_level": 0, "priority": 0, "events": [ "string" ], "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": { "_id": "string", "name": "string", "organization_email": "string", "tags": [], "supervisor": {}, "customer_id": "string", "customer_name": "string" }, "reviews": [ {} ], "createdAt": "string", "updatedAt": "string", "__v": 0, "requisition_reference": "string", "acknowledged_by_ai": true, "analysed_by_ai": true, "attachments_data": [ "string" ], "deleted_attachments": [ "string" ], "ready_for_ai": true, "send_to_ai_attempts": 0, "sent_to_ai": true, "id": "string" }