Airwallex logo

Expenses

Copy for LLMView as Markdown

Manages expensesDocs associated with corporate card transactions. Supports approval workflows, receipt attachments, accounting field categorization, line item breakdowns, and sync with external accounting systems.

POST /api/v1/spend/expenses/{id}/add_line_itemsAdd Expense Line Items
POST /api/v1/spend/expenses/{id}/delete_line_itemsDelete Expense Line Items
POST /api/v1/spend/expenses/{id}/updateUpdate an Expense
POST /api/v1/spend/expenses/{id}/update_line_itemsUpdate Expense Line Items
GET /api/v1/spend/expenses/{id}Retrieve an Expense
GET /api/v1/spend/expensesList all Expenses
POST /api/v1/spend/expenses/{id}/syncUpdate Expense Sync Status
spend.expense.approvedWhen an expense is approved.
spend.expense.archivedWhen an expense is archived.
spend.expense.awaiting_approvalWhen an expense is awaiting approval.
spend.expense.deletedWhen an expense is deleted.
spend.expense.draftWhen an expense draft is created or recalled.
spend.expense.rejectedWhen an expense is rejected.
spend.expense.updatedWhen an expense transaction is edited or transaction status is changed.

Add Expense Line ItemsBeta

POST /api/v1/spend/expenses/{id}/add_line_items

Add Expense Line Items is in beta
We may include major new functionality or changes before general release. Learn more about beta.Docs

Adds between 1 and 100 line items to an existing expense. Archived expenses cannot be edited.

On behalf of
Supports x-on-behalf-of header
Path parameters
idrequiredstring

Unique identifier of the expense.

Request body
line_itemsrequiredarray

Expense line items to create.

line_items.transaction_amountrequiredstring

Non-negative line item amount in the expense transaction currency.

line_items.accounting_field_selectionsarray

Accounting field selections to assign to the expense line item.

line_items.accounting_field_selections.source_idrequiredstring

Unique identifier of the accounting value to assign to this line item. The required value depends on type: use the id returned by List GL accounts for GENERAL_LEDGER_ACCOUNT, List tax codes for TAX_CODE, or List accounting field values for OTHER.

line_items.accounting_field_selections.typerequiredstring

Type of selected accounting value.

GENERAL_LEDGER_ACCOUNT

General ledger account that the line item is booked to.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP.

line_items.descriptionstring

Optional description of the expense line item.

request_idrequiredstring

Unique identifier for this request to ensure idempotency.

Response body - 200 OK
account_idstring

Unique identifier of the Airwallex account that owns this expense. This determines which account the expense amount is debited from.

accounting_field_selectionsarray

Merchant accounting field selection assigned to this expense for reporting and categorization in your accounting system.

accounting_field_selections.source_idstring

Unique identifier of the merchant associated with this expense.

accounting_field_selections.typestring

Type of accounting field.

MERCHANT

Merchant accounting field selection.

accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is not populated for merchant accounting field selections.

accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

approversarray

Email addresses of users authorized to approve this expense. An empty array indicates no approval is required or the expense has already been approved.

attachmentsarray

Receipt images and supporting documents uploaded for this expense. Commonly used for compliance and approval workflows.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file.

attachments.idstring

Unique identifier of the attachment.

attendeesarray

Attendees associated with this expense, including internal employees and external guests.

attendees.externalboolean

Indicates whether the attendee is external to the organization.

attendees.namestring

Name of the attendee.

attendees.emailstring

Email address of the attendee. Present only when external is false.

billing_amountstring

Total amount charged to your account in billing currency, including any fees or currency conversion. This may differ from the original transaction amount.

billing_currencystring

Currency in which the billing amount is charged to your account. This is your account's primary currency, regardless of the original transaction currency.

card_idstring

Unique identifier of the Airwallex card used to make this purchase. Links the expense to the specific card and cardholder for tracking and reporting.

card_transactionobject

Details of the original card transaction associated with an expense, including the authorization status, amount, and currency.

card_transaction.amountstring

Amount of the original card transaction in the transaction currency.

card_transaction.currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

card_transaction.statusstring

Transaction status.

AUTHORIZED

Transaction has been authorized by the card network but not yet settled.

CLEARED

Transaction has been settled and cleared.

REVERSED

Transaction has been reversed or refunded.

card_transaction.card_transaction_idstring

Unique identifier of the card transaction associated with the expense.

card_typestring

Identifies whether the expense was made using a company card or an employee card. Possible values are COMPANY and EMPLOYEE.

COMPANY

Expense made using a company card.

EMPLOYEE

Expense made using an employee card.

commentsarray

Conversation thread and notes about this expense, typically used for approval workflows and clarifications between cardholders and approvers.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Optional description or memo providing additional context about the expense. Often includes the business purpose or additional details about the purchase.

idstring

Unique identifier of the expense.

invoice_numberstring

Invoice number associated with the expense.

legal_entity_idstring

Unique identifier of the legal entity associated with this expense. Used for accounting segregation and compliance reporting across different legal entities.

line_itemsarray

Breakdown of the expense into detailed line items with individual accounting categories. The sum of all line item amounts should equal the total expense amount.

line_items.accounting_field_selectionsarray

Accounting and categorization fields assigned to this specific line item. Allows for different accounting treatment of individual components within a single expense.

line_items.accounting_field_selections.source_idstring

Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.

line_items.accounting_field_selections.typestring

Type of accounting field.

GENERAL_LEDGER_ACCOUNT

General ledger (GL) account assigned to the line item.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP. The field name is provided in name.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the expense line item.

line_items.descriptionstring

Optional description providing details about this specific line item. Helps explain what this component of the expense represents for accounting and approval purposes.

line_items.transaction_amountstring

Amount of this line item in the transaction currency, including all taxes. Represents the actual expense amount for this specific component of the overall expense.

merchantstring

Name of the payee for this expense. Not linked to your accounting system.

settled_atstring

Timestamp when the transaction was settled, in ISO8601 format. Null if transaction is still pending settlement.

statusstring

Current approval status of the expense. Additional values may appear; implementations should handle unknown values gracefully.

DRAFT
AWAITING_APPROVAL
REJECTED
APPROVED
ARCHIVED
DELETED
sync_statusstring

Expense sync status.

NOT_SYNCED
READY_TO_SYNC
SYNCED
SYNC_FAILED
updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Expense not found.

500

Internal server error.

POST /api/v1/spend/expenses/{id}/add_line_items
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/expenses/ba46f0ff-8081-4db6-8333-4e011fe9561d/add_line_items' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "request_id": "ee939540-3203-4a2c-9172-89a566485dd9",
> "line_items": [
> {
> "transaction_amount": "60.50",
> "description": "Client dinner",
> "accounting_field_selections": [
> {
> "type": "GENERAL_LEDGER_ACCOUNT",
> "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04"
> }
> ]
> },
> {
> "transaction_amount": "45.00",
> "description": "Taxi"
> }
> ]
>}'
Response (200 OK)
1{
2 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
3 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
4 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
5 "card_id": "93eed14b-104d-4f40-ae1d-3633c6538276",
6 "card_type": "EMPLOYEE",
7 "status": "DRAFT",
8 "card_transaction": {
9 "status": "CLEARED",
10 "amount": "105.50",
11 "currency": "USD"
12 },
13 "sync_status": "NOT_SYNCED",
14 "billing_currency": "USD",
15 "billing_amount": "105.50",
16 "approvers": [],
17 "created_at": "2025-01-01T00:00:00Z",
18 "updated_at": "2025-02-02T00:00:00Z",
19 "accounting_field_selections": [],
20 "attachments": [],
21 "line_items": [
22 {
23 "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
24 "transaction_amount": "60.50",
25 "description": "Client dinner",
26 "accounting_field_selections": [
27 {
28 "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04",
29 "type": "GENERAL_LEDGER_ACCOUNT",
30 "external_id": "6000",
31 "value": "Travel & Entertainment",
32 "value_label": "Travel & Entertainment"
33 }
34 ]
35 },
36 {
37 "id": "9f10c7dc-3083-48c7-8c1a-bf8f76dcf600",
38 "transaction_amount": "45.00",
39 "description": "Taxi",
40 "accounting_field_selections": []
41 }
42 ],
43 "comments": []
44}
Was this section helpful?

Delete Expense Line ItemsBeta

POST /api/v1/spend/expenses/{id}/delete_line_items

Delete Expense Line Items is in beta
We may include major new functionality or changes before general release. Learn more about beta.Docs

Deletes between 1 and 100 expense line items. The operation is atomic. Line item totals may temporarily differ from the expense transaction amount, but must reconcile before the expense is submitted. Archived expenses cannot be edited.

On behalf of
Supports x-on-behalf-of header
Path parameters
idrequiredstring

Unique identifier of the expense.

Request body
line_item_idsrequiredarray

Unique identifiers of the expense line items to delete.

Response body - 200 OK
account_idstring

Unique identifier of the Airwallex account that owns this expense. This determines which account the expense amount is debited from.

accounting_field_selectionsarray

Merchant accounting field selection assigned to this expense for reporting and categorization in your accounting system.

accounting_field_selections.source_idstring

Unique identifier of the merchant associated with this expense.

accounting_field_selections.typestring

Type of accounting field.

MERCHANT

Merchant accounting field selection.

accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is not populated for merchant accounting field selections.

accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

approversarray

Email addresses of users authorized to approve this expense. An empty array indicates no approval is required or the expense has already been approved.

attachmentsarray

Receipt images and supporting documents uploaded for this expense. Commonly used for compliance and approval workflows.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file.

attachments.idstring

Unique identifier of the attachment.

attendeesarray

Attendees associated with this expense, including internal employees and external guests.

attendees.externalboolean

Indicates whether the attendee is external to the organization.

attendees.namestring

Name of the attendee.

attendees.emailstring

Email address of the attendee. Present only when external is false.

billing_amountstring

Total amount charged to your account in billing currency, including any fees or currency conversion. This may differ from the original transaction amount.

billing_currencystring

Currency in which the billing amount is charged to your account. This is your account's primary currency, regardless of the original transaction currency.

card_idstring

Unique identifier of the Airwallex card used to make this purchase. Links the expense to the specific card and cardholder for tracking and reporting.

card_transactionobject

Details of the original card transaction associated with an expense, including the authorization status, amount, and currency.

card_transaction.amountstring

Amount of the original card transaction in the transaction currency.

card_transaction.currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

card_transaction.statusstring

Transaction status.

AUTHORIZED

Transaction has been authorized by the card network but not yet settled.

CLEARED

Transaction has been settled and cleared.

REVERSED

Transaction has been reversed or refunded.

card_transaction.card_transaction_idstring

Unique identifier of the card transaction associated with the expense.

card_typestring

Identifies whether the expense was made using a company card or an employee card. Possible values are COMPANY and EMPLOYEE.

COMPANY

Expense made using a company card.

EMPLOYEE

Expense made using an employee card.

commentsarray

Conversation thread and notes about this expense, typically used for approval workflows and clarifications between cardholders and approvers.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Optional description or memo providing additional context about the expense. Often includes the business purpose or additional details about the purchase.

idstring

Unique identifier of the expense.

invoice_numberstring

Invoice number associated with the expense.

legal_entity_idstring

Unique identifier of the legal entity associated with this expense. Used for accounting segregation and compliance reporting across different legal entities.

line_itemsarray

Breakdown of the expense into detailed line items with individual accounting categories. The sum of all line item amounts should equal the total expense amount.

line_items.accounting_field_selectionsarray

Accounting and categorization fields assigned to this specific line item. Allows for different accounting treatment of individual components within a single expense.

line_items.accounting_field_selections.source_idstring

Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.

line_items.accounting_field_selections.typestring

Type of accounting field.

GENERAL_LEDGER_ACCOUNT

General ledger (GL) account assigned to the line item.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP. The field name is provided in name.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the expense line item.

line_items.descriptionstring

Optional description providing details about this specific line item. Helps explain what this component of the expense represents for accounting and approval purposes.

line_items.transaction_amountstring

Amount of this line item in the transaction currency, including all taxes. Represents the actual expense amount for this specific component of the overall expense.

merchantstring

Name of the payee for this expense. Not linked to your accounting system.

settled_atstring

Timestamp when the transaction was settled, in ISO8601 format. Null if transaction is still pending settlement.

statusstring

Current approval status of the expense. Additional values may appear; implementations should handle unknown values gracefully.

DRAFT
AWAITING_APPROVAL
REJECTED
APPROVED
ARCHIVED
DELETED
sync_statusstring

Expense sync status.

NOT_SYNCED
READY_TO_SYNC
SYNCED
SYNC_FAILED
updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Expense or line item not found.

500

Internal server error.

POST /api/v1/spend/expenses/{id}/delete_line_items
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/expenses/ba46f0ff-8081-4db6-8333-4e011fe9561d/delete_line_items' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "line_item_ids": [
> "9f10c7dc-3083-48c7-8c1a-bf8f76dcf600"
> ]
>}'
Response (200 OK)
1{
2 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
3 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
4 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
5 "card_id": "93eed14b-104d-4f40-ae1d-3633c6538276",
6 "card_type": "EMPLOYEE",
7 "status": "DRAFT",
8 "card_transaction": {
9 "status": "CLEARED",
10 "amount": "105.50",
11 "currency": "USD"
12 },
13 "sync_status": "NOT_SYNCED",
14 "billing_currency": "USD",
15 "billing_amount": "105.50",
16 "approvers": [],
17 "created_at": "2025-01-01T00:00:00Z",
18 "updated_at": "2025-02-02T00:00:00Z",
19 "accounting_field_selections": [],
20 "attachments": [],
21 "line_items": [
22 {
23 "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
24 "transaction_amount": "105.50",
25 "description": "Client dinner and transport",
26 "accounting_field_selections": []
27 }
28 ],
29 "comments": []
30}
Was this section helpful?

Update an ExpenseBeta

POST /api/v1/spend/expenses/{id}/update

Update an Expense is in beta
We may include major new functionality or changes before general release. Learn more about beta.Docs

Updates the coding and details of an existing expense, such as its description, merchant, invoice number, and attendees. Archived expenses cannot be edited.

On behalf of
Supports x-on-behalf-of header
Path parameters
idrequiredstring

Unique identifier of the expense.

Request body
attendeesarray

List of attendees for the expense.

attendees.externalrequiredboolean

Whether the attendee is external to the organization.

attendees.emailstring

Email address of the attendee. Present only when external is false.

attendees.namestring

Name of the attendee. Required for external attendee.

descriptionstring

Description or memo for the expense.

invoice_numberstring

Invoice number associated with the expense.

merchantstring

Name of the payee for this expense. Not linked to your accounting system.

Response body - 200 OK
account_idstring

Unique identifier of the Airwallex account that owns this expense. This determines which account the expense amount is debited from.

accounting_field_selectionsarray

Merchant accounting field selection assigned to this expense for reporting and categorization in your accounting system.

accounting_field_selections.source_idstring

Unique identifier of the merchant associated with this expense.

accounting_field_selections.typestring

Type of accounting field.

MERCHANT

Merchant accounting field selection.

accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is not populated for merchant accounting field selections.

accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

approversarray

Email addresses of users authorized to approve this expense. An empty array indicates no approval is required or the expense has already been approved.

attachmentsarray

Receipt images and supporting documents uploaded for this expense. Commonly used for compliance and approval workflows.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file.

attachments.idstring

Unique identifier of the attachment.

attendeesarray

Attendees associated with this expense, including internal employees and external guests.

attendees.externalboolean

Indicates whether the attendee is external to the organization.

attendees.namestring

Name of the attendee.

attendees.emailstring

Email address of the attendee. Present only when external is false.

billing_amountstring

Total amount charged to your account in billing currency, including any fees or currency conversion. This may differ from the original transaction amount.

billing_currencystring

Currency in which the billing amount is charged to your account. This is your account's primary currency, regardless of the original transaction currency.

card_idstring

Unique identifier of the Airwallex card used to make this purchase. Links the expense to the specific card and cardholder for tracking and reporting.

card_transactionobject

Details of the original card transaction associated with an expense, including the authorization status, amount, and currency.

card_transaction.amountstring

Amount of the original card transaction in the transaction currency.

card_transaction.currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

card_transaction.statusstring

Transaction status.

AUTHORIZED

Transaction has been authorized by the card network but not yet settled.

CLEARED

Transaction has been settled and cleared.

REVERSED

Transaction has been reversed or refunded.

card_transaction.card_transaction_idstring

Unique identifier of the card transaction associated with the expense.

card_typestring

Identifies whether the expense was made using a company card or an employee card. Possible values are COMPANY and EMPLOYEE.

COMPANY

Expense made using a company card.

EMPLOYEE

Expense made using an employee card.

commentsarray

Conversation thread and notes about this expense, typically used for approval workflows and clarifications between cardholders and approvers.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Optional description or memo providing additional context about the expense. Often includes the business purpose or additional details about the purchase.

idstring

Unique identifier of the expense.

invoice_numberstring

Invoice number associated with the expense.

legal_entity_idstring

Unique identifier of the legal entity associated with this expense. Used for accounting segregation and compliance reporting across different legal entities.

line_itemsarray

Breakdown of the expense into detailed line items with individual accounting categories. The sum of all line item amounts should equal the total expense amount.

line_items.accounting_field_selectionsarray

Accounting and categorization fields assigned to this specific line item. Allows for different accounting treatment of individual components within a single expense.

line_items.accounting_field_selections.source_idstring

Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.

line_items.accounting_field_selections.typestring

Type of accounting field.

GENERAL_LEDGER_ACCOUNT

General ledger (GL) account assigned to the line item.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP. The field name is provided in name.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the expense line item.

line_items.descriptionstring

Optional description providing details about this specific line item. Helps explain what this component of the expense represents for accounting and approval purposes.

line_items.transaction_amountstring

Amount of this line item in the transaction currency, including all taxes. Represents the actual expense amount for this specific component of the overall expense.

merchantstring

Name of the payee for this expense. Not linked to your accounting system.

settled_atstring

Timestamp when the transaction was settled, in ISO8601 format. Null if transaction is still pending settlement.

statusstring

Current approval status of the expense. Additional values may appear; implementations should handle unknown values gracefully.

DRAFT
AWAITING_APPROVAL
REJECTED
APPROVED
ARCHIVED
DELETED
sync_statusstring

Expense sync status.

NOT_SYNCED
READY_TO_SYNC
SYNCED
SYNC_FAILED
updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

POST /api/v1/spend/expenses/{id}/update
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/expenses/ba46f0ff-8081-4db6-8333-4e011fe9561d/update' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "description": "Client dinner - Q4 planning",
> "merchant": "The French Laundry",
> "invoice_number": "INV-2026-001",
> "attendees": [
> {
> "external": false,
> "name": "Jane Doe",
> "email": "[email protected]"
> }
> ]
>}'
Response (200 OK)
1{
2 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
3 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
4 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
5 "card_id": "93eed14b-104d-4f40-ae1d-3633c6538276",
6 "card_type": "EMPLOYEE",
7 "status": "AWAITING_APPROVAL",
8 "card_transaction": {
9 "status": "CLEARED",
10 "amount": "105.50",
11 "currency": "USD"
12 },
13 "sync_status": "SYNCED",
14 "billing_currency": "USD",
15 "billing_amount": "105.5",
16 "description": "Client dinner - Q4 planning",
17 "merchant": "The French Laundry",
18 "invoice_number": "INV-2026-001",
19 "approvers": [
21 ],
22 "created_at": "2025-01-01T00:00:00Z",
23 "updated_at": "2025-02-02T00:00:00Z",
24 "accounting_field_selections": [
25 {
26 "type": "MERCHANT",
27 "source_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
28 "name": null,
29 "external_id": null,
30 "value": "Starbucks Coffee #1234",
31 "value_label": "Starbucks Coffee #1234"
32 }
33 ],
34 "attachments": [
35 {
36 "id": "0fd62109-cfc0-4c94-86a5-d01c42506b76",
37 "content_type": "image/jpeg",
38 "file_name": "receipt.jpg",
39 "file_url": "https://files.airwallex.com/receipt.jpg",
40 "created_at": "2024-12-16T09:22:00Z"
41 }
42 ],
43 "line_items": [
44 {
45 "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
46 "transaction_amount": "105.50",
47 "description": "Client dinner",
48 "accounting_field_selections": [
49 {
50 "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04",
51 "type": "GENERAL_LEDGER_ACCOUNT",
52 "external_id": "6000",
53 "value": "Travel & Entertainment",
54 "value_label": "Travel & Entertainment"
55 }
56 ]
57 }
58 ],
59 "comments": [
60 {
61 "content": "Expense approved - valid business purpose confirmed",
62 "created_by": "[email protected]",
63 "created_at": "2025-01-01T00:00:00Z"
64 }
65 ],
66 "attendees": [
67 {
68 "external": false,
69 "name": "Jane Doe",
70 "email": "[email protected]"
71 }
72 ]
73}
Was this section helpful?

Update Expense Line ItemsBeta

POST /api/v1/spend/expenses/{id}/update_line_items

Update Expense Line Items is in beta
We may include major new functionality or changes before general release. Learn more about beta.Docs

Updates between 1 and 100 expense line items. The operation is atomic. Line item totals may temporarily differ from the expense transaction amount, but must reconcile before the expense is submitted. Archived expenses cannot be edited.

On behalf of
Supports x-on-behalf-of header
Path parameters
idrequiredstring

Unique identifier of the expense.

Request body
line_itemsrequiredarray

Expense line items to update.

line_items.idrequiredstring

Unique identifier of the expense line item.

line_items.accounting_field_selectionsarray

Accounting field selections to replace on the expense line item.

line_items.accounting_field_selections.source_idrequiredstring

Unique identifier of the accounting value to assign to this line item. The required value depends on type: use the id returned by List GL accounts for GENERAL_LEDGER_ACCOUNT, List tax codes for TAX_CODE, or List accounting field values for OTHER.

line_items.accounting_field_selections.typerequiredstring

Type of selected accounting value.

GENERAL_LEDGER_ACCOUNT

General ledger account that the line item is booked to.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP.

line_items.descriptionstring

Description of the expense line item.

line_items.transaction_amountstring

Non-negative line item amount in the expense transaction currency.

Response body - 200 OK
account_idstring

Unique identifier of the Airwallex account that owns this expense. This determines which account the expense amount is debited from.

accounting_field_selectionsarray

Merchant accounting field selection assigned to this expense for reporting and categorization in your accounting system.

accounting_field_selections.source_idstring

Unique identifier of the merchant associated with this expense.

accounting_field_selections.typestring

Type of accounting field.

MERCHANT

Merchant accounting field selection.

accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is not populated for merchant accounting field selections.

accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

approversarray

Email addresses of users authorized to approve this expense. An empty array indicates no approval is required or the expense has already been approved.

attachmentsarray

Receipt images and supporting documents uploaded for this expense. Commonly used for compliance and approval workflows.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file.

attachments.idstring

Unique identifier of the attachment.

attendeesarray

Attendees associated with this expense, including internal employees and external guests.

attendees.externalboolean

Indicates whether the attendee is external to the organization.

attendees.namestring

Name of the attendee.

attendees.emailstring

Email address of the attendee. Present only when external is false.

billing_amountstring

Total amount charged to your account in billing currency, including any fees or currency conversion. This may differ from the original transaction amount.

billing_currencystring

Currency in which the billing amount is charged to your account. This is your account's primary currency, regardless of the original transaction currency.

card_idstring

Unique identifier of the Airwallex card used to make this purchase. Links the expense to the specific card and cardholder for tracking and reporting.

card_transactionobject

Details of the original card transaction associated with an expense, including the authorization status, amount, and currency.

card_transaction.amountstring

Amount of the original card transaction in the transaction currency.

card_transaction.currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

card_transaction.statusstring

Transaction status.

AUTHORIZED

Transaction has been authorized by the card network but not yet settled.

CLEARED

Transaction has been settled and cleared.

REVERSED

Transaction has been reversed or refunded.

card_transaction.card_transaction_idstring

Unique identifier of the card transaction associated with the expense.

card_typestring

Identifies whether the expense was made using a company card or an employee card. Possible values are COMPANY and EMPLOYEE.

COMPANY

Expense made using a company card.

EMPLOYEE

Expense made using an employee card.

commentsarray

Conversation thread and notes about this expense, typically used for approval workflows and clarifications between cardholders and approvers.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Optional description or memo providing additional context about the expense. Often includes the business purpose or additional details about the purchase.

idstring

Unique identifier of the expense.

invoice_numberstring

Invoice number associated with the expense.

legal_entity_idstring

Unique identifier of the legal entity associated with this expense. Used for accounting segregation and compliance reporting across different legal entities.

line_itemsarray

Breakdown of the expense into detailed line items with individual accounting categories. The sum of all line item amounts should equal the total expense amount.

line_items.accounting_field_selectionsarray

Accounting and categorization fields assigned to this specific line item. Allows for different accounting treatment of individual components within a single expense.

line_items.accounting_field_selections.source_idstring

Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.

line_items.accounting_field_selections.typestring

Type of accounting field.

GENERAL_LEDGER_ACCOUNT

General ledger (GL) account assigned to the line item.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP. The field name is provided in name.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the expense line item.

line_items.descriptionstring

Optional description providing details about this specific line item. Helps explain what this component of the expense represents for accounting and approval purposes.

line_items.transaction_amountstring

Amount of this line item in the transaction currency, including all taxes. Represents the actual expense amount for this specific component of the overall expense.

merchantstring

Name of the payee for this expense. Not linked to your accounting system.

settled_atstring

Timestamp when the transaction was settled, in ISO8601 format. Null if transaction is still pending settlement.

statusstring

Current approval status of the expense. Additional values may appear; implementations should handle unknown values gracefully.

DRAFT
AWAITING_APPROVAL
REJECTED
APPROVED
ARCHIVED
DELETED
sync_statusstring

Expense sync status.

NOT_SYNCED
READY_TO_SYNC
SYNCED
SYNC_FAILED
updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Expense or line item not found.

500

Internal server error.

POST /api/v1/spend/expenses/{id}/update_line_items
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/expenses/ba46f0ff-8081-4db6-8333-4e011fe9561d/update_line_items' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "line_items": [
> {
> "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
> "transaction_amount": "65.50",
> "description": "Client dinner and tip",
> "accounting_field_selections": [
> {
> "type": "GENERAL_LEDGER_ACCOUNT",
> "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04"
> }
> ]
> },
> {
> "id": "9f10c7dc-3083-48c7-8c1a-bf8f76dcf600",
> "transaction_amount": "40.00"
> }
> ]
>}'
Response (200 OK)
1{
2 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
3 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
4 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
5 "card_id": "93eed14b-104d-4f40-ae1d-3633c6538276",
6 "card_type": "EMPLOYEE",
7 "status": "DRAFT",
8 "card_transaction": {
9 "status": "CLEARED",
10 "amount": "105.50",
11 "currency": "USD"
12 },
13 "sync_status": "NOT_SYNCED",
14 "billing_currency": "USD",
15 "billing_amount": "105.50",
16 "approvers": [],
17 "created_at": "2025-01-01T00:00:00Z",
18 "updated_at": "2025-02-02T00:00:00Z",
19 "accounting_field_selections": [],
20 "attachments": [],
21 "line_items": [
22 {
23 "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
24 "transaction_amount": "65.50",
25 "description": "Client dinner and tip",
26 "accounting_field_selections": [
27 {
28 "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04",
29 "type": "GENERAL_LEDGER_ACCOUNT",
30 "external_id": "6000",
31 "value": "Travel & Entertainment",
32 "value_label": "Travel & Entertainment"
33 }
34 ]
35 },
36 {
37 "id": "9f10c7dc-3083-48c7-8c1a-bf8f76dcf600",
38 "transaction_amount": "40.00",
39 "description": "Taxi",
40 "accounting_field_selections": []
41 }
42 ],
43 "comments": []
44}
Was this section helpful?

Retrieve an ExpenseBeta

GET /api/v1/spend/expenses/{id}

Retrieve an Expense is in beta
We may include major new functionality or changes before general release. Learn more about beta.Docs

Retrieves the details of an existing expense.

Scoped API key permissions
SpendExpensesRead
OAuth scopes
spend.expense:read
Path parameters
idrequiredstring

Unique identifier of the expense.

Response body - 200 OK
account_idstring

Unique identifier of the Airwallex account that owns this expense. This determines which account the expense amount is debited from.

accounting_field_selectionsarray

Merchant accounting field selection assigned to this expense for reporting and categorization in your accounting system.

accounting_field_selections.source_idstring

Unique identifier of the merchant associated with this expense.

accounting_field_selections.typestring

Type of accounting field.

MERCHANT

Merchant accounting field selection.

accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is not populated for merchant accounting field selections.

accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

approversarray

Email addresses of users authorized to approve this expense. An empty array indicates no approval is required or the expense has already been approved.

attachmentsarray

Receipt images and supporting documents uploaded for this expense. Commonly used for compliance and approval workflows.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file.

attachments.idstring

Unique identifier of the attachment.

attendeesarray

Attendees associated with this expense, including internal employees and external guests.

attendees.externalboolean

Indicates whether the attendee is external to the organization.

attendees.namestring

Name of the attendee.

attendees.emailstring

Email address of the attendee. Present only when external is false.

billing_amountstring

Total amount charged to your account in billing currency, including any fees or currency conversion. This may differ from the original transaction amount.

billing_currencystring

Currency in which the billing amount is charged to your account. This is your account's primary currency, regardless of the original transaction currency.

card_idstring

Unique identifier of the Airwallex card used to make this purchase. Links the expense to the specific card and cardholder for tracking and reporting.

card_transactionobject

Details of the original card transaction associated with an expense, including the authorization status, amount, and currency.

card_transaction.amountstring

Amount of the original card transaction in the transaction currency.

card_transaction.currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

card_transaction.statusstring

Transaction status.

AUTHORIZED

Transaction has been authorized by the card network but not yet settled.

CLEARED

Transaction has been settled and cleared.

REVERSED

Transaction has been reversed or refunded.

card_transaction.card_transaction_idstring

Unique identifier of the card transaction associated with the expense.

card_typestring

Identifies whether the expense was made using a company card or an employee card. Possible values are COMPANY and EMPLOYEE.

COMPANY

Expense made using a company card.

EMPLOYEE

Expense made using an employee card.

commentsarray

Conversation thread and notes about this expense, typically used for approval workflows and clarifications between cardholders and approvers.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Optional description or memo providing additional context about the expense. Often includes the business purpose or additional details about the purchase.

idstring

Unique identifier of the expense.

invoice_numberstring

Invoice number associated with the expense.

legal_entity_idstring

Unique identifier of the legal entity associated with this expense. Used for accounting segregation and compliance reporting across different legal entities.

line_itemsarray

Breakdown of the expense into detailed line items with individual accounting categories. The sum of all line item amounts should equal the total expense amount.

line_items.accounting_field_selectionsarray

Accounting and categorization fields assigned to this specific line item. Allows for different accounting treatment of individual components within a single expense.

line_items.accounting_field_selections.source_idstring

Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.

line_items.accounting_field_selections.typestring

Type of accounting field.

GENERAL_LEDGER_ACCOUNT

General ledger (GL) account assigned to the line item.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP. The field name is provided in name.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the expense line item.

line_items.descriptionstring

Optional description providing details about this specific line item. Helps explain what this component of the expense represents for accounting and approval purposes.

line_items.transaction_amountstring

Amount of this line item in the transaction currency, including all taxes. Represents the actual expense amount for this specific component of the overall expense.

merchantstring

Name of the payee for this expense. Not linked to your accounting system.

settled_atstring

Timestamp when the transaction was settled, in ISO8601 format. Null if transaction is still pending settlement.

statusstring

Current approval status of the expense. Additional values may appear; implementations should handle unknown values gracefully.

DRAFT
AWAITING_APPROVAL
REJECTED
APPROVED
ARCHIVED
DELETED
sync_statusstring

Expense sync status.

NOT_SYNCED
READY_TO_SYNC
SYNCED
SYNC_FAILED
updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

GET /api/v1/spend/expenses/{id}
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/expenses/expense_id' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
3 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
4 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
5 "card_id": "93eed14b-104d-4f40-ae1d-3633c6538276",
6 "card_type": "EMPLOYEE",
7 "status": "AWAITING_APPROVAL",
8 "card_transaction": {
9 "card_transaction_id": "43aec951-3204-4b1a-9e77-8f2c1d0a1b2c",
10 "status": "CLEARED",
11 "amount": "105.50",
12 "currency": "USD"
13 },
14 "sync_status": "SYNCED",
15 "billing_currency": "USD",
16 "billing_amount": "105.5",
17 "description": "Client dinner at restaurant for Q4 planning meeting.",
18 "merchant": "Starbucks Coffee #1234",
19 "invoice_number": "INV-2026-001",
20 "approvers": [
23 ],
24 "created_at": "2025-01-01T00:00:00Z",
25 "updated_at": "2025-02-02T00:00:00Z",
26 "settled_at": "2025-03-03T10:15:30Z",
27 "accounting_field_selections": [
28 {
29 "type": "MERCHANT",
30 "source_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
31 "name": null,
32 "external_id": null,
33 "value": "Starbucks Coffee #1234",
34 "value_label": "Starbucks Coffee #1234"
35 }
36 ],
37 "attachments": [
38 {
39 "id": "0fd62109-cfc0-4c94-86a5-d01c42506b76",
40 "content_type": "image/jpeg",
41 "file_name": "receipt.jpg",
42 "file_url": "https://files.airwallex.com/receipt.jpg",
43 "created_at": "2024-12-16T09:22:00Z"
44 }
45 ],
46 "line_items": [
47 {
48 "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
49 "transaction_amount": "105.50",
50 "description": "Client dinner",
51 "accounting_field_selections": [
52 {
53 "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04",
54 "type": "GENERAL_LEDGER_ACCOUNT",
55 "external_id": "6000",
56 "value": "Travel & Entertainment",
57 "value_label": "Travel & Entertainment"
58 }
59 ]
60 }
61 ],
62 "comments": [
63 {
64 "content": "Expense approved - valid business purpose confirmed",
65 "created_by": "[email protected]",
66 "created_at": "2025-01-01T00:00:00Z"
67 }
68 ]
69}
Was this section helpful?

List all ExpensesBeta

GET /api/v1/spend/expenses

List all Expenses is in beta
We may include major new functionality or changes before general release. Learn more about beta.Docs

List expenses based on the query parameters.

Scoped API key permissions
SpendExpensesRead
OAuth scopes
spend.expense:read
Query parameters
card_transactionobject

Filter by card transaction properties.

card_transaction.statusarray

Filter by card transaction statuses. Possible values are AUTHORIZED, CLEARED, REVERSED.

card_typearray

Filter by card types. COMPANY identifies company cards and EMPLOYEE identifies employee cards.

from_created_atstring

Filter by expenses created after this timestamp (inclusive) in ISO8601 format.

If not specified, defaults to last 30 days from to_created_at.

legal_entity_idstring

Filter by legal entity identifier.

pagestring

A bookmark for use in pagination to retrieve either the next page or the previous page of results. You can fetch the value for this identifier from the response of the previous API call.

page_sizeinteger

The number of items returned per page, between 1 and 100. The default is 100.

statusarray

Filter by expense statuses. Additional values may appear; implementations should handle unknown values gracefully.

sync_statusarray

Filter by sync statuses.

to_created_atstring

Filter by expenses created before this timestamp (exclusive) in ISO8601 format.

If not specified, defaults to now.

Response body - 200 OK
itemsarray

List of items returned.

items.account_idstring

Unique identifier of the Airwallex account that owns this expense. This determines which account the expense amount is debited from.

items.accounting_field_selectionsarray

Merchant accounting field selection assigned to this expense for reporting and categorization in your accounting system.

items.accounting_field_selections.source_idstring

Unique identifier of the merchant associated with this expense.

items.accounting_field_selections.typestring

Type of accounting field.

MERCHANT

Merchant accounting field selection.

items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is not populated for merchant accounting field selections.

items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

items.approversarray

Email addresses of users authorized to approve this expense. An empty array indicates no approval is required or the expense has already been approved.

items.attachmentsarray

Receipt images and supporting documents uploaded for this expense. Commonly used for compliance and approval workflows.

items.attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

items.attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

items.attachments.file_urlstring

URL to access and download the attachment file.

items.attachments.idstring

Unique identifier of the attachment.

items.billing_amountstring

Total amount charged to your account in billing currency, including any fees or currency conversion. This may differ from the original transaction amount.

items.billing_currencystring

Currency in which the billing amount is charged to your account. This is your account's primary currency, regardless of the original transaction currency.

items.card_idstring

Unique identifier of the Airwallex card used to make this purchase. Links the expense to the specific card and cardholder for tracking and reporting.

items.card_transactionobject

Details of the original card transaction associated with an expense, including the authorization status, amount, and currency.

items.card_transaction.amountstring

Amount of the original card transaction in the transaction currency.

items.card_transaction.currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

items.card_transaction.statusstring

Transaction status.

AUTHORIZED

Transaction has been authorized by the card network but not yet settled.

CLEARED

Transaction has been settled and cleared.

REVERSED

Transaction has been reversed or refunded.

items.card_transaction.card_transaction_idstring

Unique identifier of the card transaction associated with the expense.

items.card_typestring

Identifies whether the expense was made using a company card or an employee card. Possible values are COMPANY and EMPLOYEE.

COMPANY

Expense made using a company card.

EMPLOYEE

Expense made using an employee card.

items.commentsarray

Conversation thread and notes about this expense, typically used for approval workflows and clarifications between cardholders and approvers.

items.comments.contentstring

Text body of the comment.

items.comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

items.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.idstring

Unique identifier of the expense.

items.legal_entity_idstring

Unique identifier of the legal entity associated with this expense. Used for accounting segregation and compliance reporting across different legal entities.

items.line_itemsarray

Breakdown of the expense into detailed line items with individual accounting categories. The sum of all line item amounts should equal the total expense amount.

items.line_items.accounting_field_selectionsarray

Accounting and categorization fields assigned to this specific line item. Allows for different accounting treatment of individual components within a single expense.

items.line_items.accounting_field_selections.source_idstring

Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.

items.line_items.accounting_field_selections.typestring

Type of accounting field.

GENERAL_LEDGER_ACCOUNT

General ledger (GL) account assigned to the line item.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP. The field name is provided in name.

items.line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

items.line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

items.line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

items.line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

items.line_items.idstring

Unique identifier of the expense line item.

items.line_items.descriptionstring

Optional description providing details about this specific line item. Helps explain what this component of the expense represents for accounting and approval purposes.

items.line_items.transaction_amountstring

Amount of this line item in the transaction currency, including all taxes. Represents the actual expense amount for this specific component of the overall expense.

items.statusstring

Current approval status of the expense. Additional values may appear; implementations should handle unknown values gracefully.

DRAFT
AWAITING_APPROVAL
REJECTED
APPROVED
ARCHIVED
DELETED
items.sync_statusstring

Expense sync status.

NOT_SYNCED
READY_TO_SYNC
SYNCED
SYNC_FAILED
items.updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

items.attendeesarray

Attendees associated with this expense, including internal employees and external guests.

items.attendees.externalboolean

Indicates whether the attendee is external to the organization.

items.attendees.namestring

Name of the attendee.

items.attendees.emailstring

Email address of the attendee. Present only when external is false.

items.descriptionstring

Optional description or memo providing additional context about the expense. Often includes the business purpose or additional details about the purchase.

items.invoice_numberstring

Invoice number associated with the expense.

items.merchantstring

Name of the payee for this expense. Not linked to your accounting system.

items.settled_atstring

Timestamp when the transaction was settled, in ISO8601 format. Null if transaction is still pending settlement.

page_afterstring

A pointer to the end of the page list used in pagination to retrieve the next page of results.

page_beforestring

A pointer to the start of the page list use in pagination to retrieve the previous page of results.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

GET /api/v1/spend/expenses
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/expenses' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "items": [
3 {
4 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
5 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
6 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
7 "card_id": "93eed14b-104d-4f40-ae1d-3633c6538276",
8 "card_type": "EMPLOYEE",
9 "status": "AWAITING_APPROVAL",
10 "card_transaction": {
11 "card_transaction_id": "43aec951-3204-4b1a-9e77-8f2c1d0a1b2c",
12 "status": "CLEARED",
13 "amount": "105.50",
14 "currency": "USD"
15 },
16 "sync_status": "SYNCED",
17 "billing_currency": "USD",
18 "billing_amount": "105.5",
19 "description": "Client dinner at restaurant for Q4 planning meeting.",
20 "merchant": "Starbucks Coffee #1234",
21 "invoice_number": "INV-2026-001",
22 "approvers": [
25 ],
26 "created_at": "2025-01-01T00:00:00Z",
27 "updated_at": "2025-02-02T00:00:00Z",
28 "settled_at": "2025-03-03T10:15:30Z",
29 "accounting_field_selections": [
30 {
31 "type": "MERCHANT",
32 "source_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
33 "name": null,
34 "external_id": null,
35 "value": "Starbucks Coffee #1234",
36 "value_label": "Starbucks Coffee #1234"
37 }
38 ],
39 "attachments": [
40 {
41 "id": "0fd62109-cfc0-4c94-86a5-d01c42506b76",
42 "content_type": "image/jpeg",
43 "file_name": "receipt.jpg",
44 "file_url": "https://files.airwallex.com/receipt.jpg",
45 "created_at": "2024-12-16T09:22:00Z"
46 }
47 ],
48 "line_items": [
49 {
50 "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
51 "transaction_amount": "105.50",
52 "description": "Client dinner",
53 "accounting_field_selections": [
54 {
55 "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04",
56 "type": "GENERAL_LEDGER_ACCOUNT",
57 "external_id": "6000",
58 "value": "Travel & Entertainment",
59 "value_label": "Travel & Entertainment"
60 }
61 ]
62 }
63 ],
64 "comments": [
65 {
66 "content": "Expense approved - valid business purpose confirmed",
67 "created_by": "[email protected]",
68 "created_at": "2025-01-01T00:00:00Z"
69 }
70 ]
71 }
72 ],
73 "page_after": "eyJwYWdlX2JlZm9yZSI6IjIwMjUtMDctMDFUMDA6MDA6MDBaIn0=",
74 "page_before": "eyJwYWdlX2JlZm9yZSI6IjIwMjUtMDctMDFUMDA6MDA6MDBaIn0="
75}
Was this section helpful?

Update Expense Sync StatusBeta

POST /api/v1/spend/expenses/{id}/sync

Update Expense Sync Status is in beta
We may include major new functionality or changes before general release. Learn more about beta.Docs

Updates the sync status of an existing expense.

A sync status can only move in the following directions:

  • NOT_SYNCED can move to READY_TO_SYNC, SYNC_FAILED, or SYNCED.
  • READY_TO_SYNC can move to SYNCED or SYNC_FAILED.
  • SYNC_FAILED can move to SYNCED or READY_TO_SYNC.
  • SYNCED is a final state and cannot move to any other status.

NOT_SYNCED is the initial status of an expense and cannot be set through this endpoint.

Scoped API key permissions
SpendExpensesWrite
OAuth scopes
spend.expense:write
Path parameters
idrequiredstring

Unique identifier of the expense.

Request body
sync_statusrequiredstring

Expense sync status.

READY_TO_SYNC
SYNCED
SYNC_FAILED
Response body - 200 OK
account_idstring

Unique identifier of the Airwallex account that owns this expense. This determines which account the expense amount is debited from.

accounting_field_selectionsarray

Merchant accounting field selection assigned to this expense for reporting and categorization in your accounting system.

accounting_field_selections.source_idstring

Unique identifier of the merchant associated with this expense.

accounting_field_selections.typestring

Type of accounting field.

MERCHANT

Merchant accounting field selection.

accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is not populated for merchant accounting field selections.

accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

approversarray

Email addresses of users authorized to approve this expense. An empty array indicates no approval is required or the expense has already been approved.

attachmentsarray

Receipt images and supporting documents uploaded for this expense. Commonly used for compliance and approval workflows.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file.

attachments.idstring

Unique identifier of the attachment.

attendeesarray

Attendees associated with this expense, including internal employees and external guests.

attendees.externalboolean

Indicates whether the attendee is external to the organization.

attendees.namestring

Name of the attendee.

attendees.emailstring

Email address of the attendee. Present only when external is false.

billing_amountstring

Total amount charged to your account in billing currency, including any fees or currency conversion. This may differ from the original transaction amount.

billing_currencystring

Currency in which the billing amount is charged to your account. This is your account's primary currency, regardless of the original transaction currency.

card_idstring

Unique identifier of the Airwallex card used to make this purchase. Links the expense to the specific card and cardholder for tracking and reporting.

card_transactionobject

Details of the original card transaction associated with an expense, including the authorization status, amount, and currency.

card_transaction.amountstring

Amount of the original card transaction in the transaction currency.

card_transaction.currencystring

Currency of the original card transaction, as an ISO 4217 currency code.

card_transaction.statusstring

Transaction status.

AUTHORIZED

Transaction has been authorized by the card network but not yet settled.

CLEARED

Transaction has been settled and cleared.

REVERSED

Transaction has been reversed or refunded.

card_transaction.card_transaction_idstring

Unique identifier of the card transaction associated with the expense.

card_typestring

Identifies whether the expense was made using a company card or an employee card. Possible values are COMPANY and EMPLOYEE.

COMPANY

Expense made using a company card.

EMPLOYEE

Expense made using an employee card.

commentsarray

Conversation thread and notes about this expense, typically used for approval workflows and clarifications between cardholders and approvers.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Optional description or memo providing additional context about the expense. Often includes the business purpose or additional details about the purchase.

idstring

Unique identifier of the expense.

invoice_numberstring

Invoice number associated with the expense.

legal_entity_idstring

Unique identifier of the legal entity associated with this expense. Used for accounting segregation and compliance reporting across different legal entities.

line_itemsarray

Breakdown of the expense into detailed line items with individual accounting categories. The sum of all line item amounts should equal the total expense amount.

line_items.accounting_field_selectionsarray

Accounting and categorization fields assigned to this specific line item. Allows for different accounting treatment of individual components within a single expense.

line_items.accounting_field_selections.source_idstring

Unique identifier of the selected general ledger (GL) account, tax code, or accounting field value.

line_items.accounting_field_selections.typestring

Type of accounting field.

GENERAL_LEDGER_ACCOUNT

General ledger (GL) account assigned to the line item.

TAX_CODE

Tax code applied to the line item.

OTHER

Custom accounting field defined in your ERP. The field name is provided in name.

line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the expense line item.

line_items.descriptionstring

Optional description providing details about this specific line item. Helps explain what this component of the expense represents for accounting and approval purposes.

line_items.transaction_amountstring

Amount of this line item in the transaction currency, including all taxes. Represents the actual expense amount for this specific component of the overall expense.

merchantstring

Name of the payee for this expense. Not linked to your accounting system.

settled_atstring

Timestamp when the transaction was settled, in ISO8601 format. Null if transaction is still pending settlement.

statusstring

Current approval status of the expense. Additional values may appear; implementations should handle unknown values gracefully.

DRAFT
AWAITING_APPROVAL
REJECTED
APPROVED
ARCHIVED
DELETED
sync_statusstring

Expense sync status.

NOT_SYNCED
READY_TO_SYNC
SYNCED
SYNC_FAILED
updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

POST /api/v1/spend/expenses/{id}/sync
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/expenses/expense_id/sync' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "sync_status": "SYNCED"
>}'
Response (200 OK)
1{
2 "id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
3 "account_id": "acct_a2y0pxz3m4k5hoZldn97hjzp",
4 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
5 "card_id": "93eed14b-104d-4f40-ae1d-3633c6538276",
6 "card_type": "EMPLOYEE",
7 "status": "AWAITING_APPROVAL",
8 "card_transaction": {
9 "card_transaction_id": "43aec951-3204-4b1a-9e77-8f2c1d0a1b2c",
10 "status": "CLEARED",
11 "amount": "105.50",
12 "currency": "USD"
13 },
14 "sync_status": "SYNCED",
15 "billing_currency": "USD",
16 "billing_amount": "105.5",
17 "description": "Client dinner at restaurant for Q4 planning meeting.",
18 "merchant": "Starbucks Coffee #1234",
19 "approvers": [
22 ],
23 "created_at": "2025-01-01T00:00:00Z",
24 "updated_at": "2025-02-02T00:00:00Z",
25 "settled_at": "2025-03-03T10:15:30Z",
26 "accounting_field_selections": [
27 {
28 "type": "MERCHANT",
29 "source_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
30 "name": null,
31 "external_id": null,
32 "value": "Starbucks Coffee #1234",
33 "value_label": "Starbucks Coffee #1234"
34 }
35 ],
36 "attachments": [
37 {
38 "id": "0fd62109-cfc0-4c94-86a5-d01c42506b76",
39 "content_type": "image/jpeg",
40 "file_name": "receipt.jpg",
41 "file_url": "https://files.airwallex.com/receipt.jpg",
42 "created_at": "2024-12-16T09:22:00Z"
43 }
44 ],
45 "line_items": [
46 {
47 "id": "a12fca5e-4aeb-4adb-85b0-428b4f078aba",
48 "transaction_amount": "105.50",
49 "description": "Client dinner",
50 "accounting_field_selections": [
51 {
52 "source_id": "c9fcfdee-f943-45c9-abaa-45df1601ae04",
53 "type": "GENERAL_LEDGER_ACCOUNT",
54 "external_id": "6000",
55 "value": "Travel & Entertainment",
56 "value_label": "Travel & Entertainment"
57 }
58 ]
59 }
60 ],
61 "comments": [
62 {
63 "content": "Expense approved - valid business purpose confirmed",
64 "created_by": "[email protected]",
65 "created_at": "2025-01-01T00:00:00Z"
66 }
67 ]
68}
Was this section helpful?