Accounting Fields
Manages custom accounting fields that define additional accounting dimensions for Airwallex Spend, such as projects or cost centers.
POST /api/v1/accounting/accounting_fields/createGET /api/v1/accounting/accounting_fields/{id}GET /api/v1/accounting/accounting_fieldsPOST /api/v1/accounting/accounting_fields/{id}/update
Create an Accounting FieldBeta
POST /api/v1/accounting/accounting_fields/create
Creates a new custom accounting field for Airwallex Spend.
Accounting field name. Must be exactly one of Custom field 1, Custom field 2, Custom field 3, Custom field 4, or Custom field 5. Values are case-sensitive.
Custom field 1Custom field 2Custom field 3Custom field 4Custom field 5Unique identifier for this request to ensure idempotency. Generate a random UUID to prevent accidental duplication.
Airwallex display name for the accounting field.
Time at which the accounting field was created, in ISO 8601 format.
Unique identifier of the accounting field.
Accounting field name.
Airwallex display name for the accounting field.
Status of an Accounting resource used in Airwallex Spend.
ACTIVEARCHIVEDTime at which the accounting field was last updated, in ISO 8601 format.
| Error status | Description |
|---|---|
| 400 | Invalid request. |
| 500 | Internal server error. |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/accounting_fields/create' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "request_id": "4b8d83d6-70c4-429d-8a0b-bb3281f6b17f",> "name": "Custom field 1",> "name_label": "Region">}'
1{2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",3 "name": "Custom field 1",4 "name_label": "Region",5 "status": "ACTIVE",6 "created_at": "2025-01-01T00:00:00Z",7 "updated_at": "2025-01-01T00:00:00Z"8}
Retrieve an Accounting FieldBeta
GET /api/v1/accounting/accounting_fields/{id}
Retrieves an existing custom accounting field used in Airwallex Spend.
Unique identifier of the accounting field.
Time at which the accounting field was created, in ISO 8601 format.
Unique identifier of the accounting field.
Accounting field name.
Airwallex display name for the accounting field.
Status of an Accounting resource used in Airwallex Spend.
ACTIVEARCHIVEDTime at which the accounting field was last updated, in ISO 8601 format.
| Error status | Description |
|---|---|
| 400 | Invalid request. |
| 404 | Not found. |
| 500 | Internal server error. |
$curl --request GET \> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/accounting_fields/985461d5-016f-4e1f-a387-5f1380b42d92' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",3 "name": "Custom field 1",4 "name_label": "Region",5 "status": "ACTIVE",6 "created_at": "2025-01-01T00:00:00Z",7 "updated_at": "2025-02-02T00:00:00Z"8}
List all Accounting FieldsBeta
GET /api/v1/accounting/accounting_fields
Returns custom accounting fields used in Airwallex Spend.
A bookmark for use in pagination to retrieve the next or previous page of results.
Filter by accounting field status.
ACTIVEARCHIVEDList of accounting fields returned.
Time at which the accounting field was created, in ISO 8601 format.
Unique identifier of the accounting field.
Accounting field name.
Status of an Accounting resource used in Airwallex Spend.
ACTIVEARCHIVEDTime at which the accounting field was last updated, in ISO 8601 format.
Airwallex display name for the accounting field.
A pointer to the end of the page list used to retrieve the next page of results.
A pointer to the start of the page list used to retrieve the previous page of results.
| Error status | Description |
|---|---|
| 400 | Invalid request. |
| 500 | Internal server error. |
$curl --request GET \> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/accounting_fields' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "items": [3 {4 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",5 "name": "Custom field 1",6 "name_label": "Region",7 "status": "ACTIVE",8 "created_at": "2025-01-01T00:00:00Z",9 "updated_at": "2025-02-02T00:00:00Z"10 }11 ],12 "page_after": "eyJwYWdlIjoiMiJ9"13}
Update an Accounting FieldBeta
POST /api/v1/accounting/accounting_fields/{id}/update
Updates an existing custom accounting field used in Airwallex Spend.
Unique identifier of the accounting field.
Accounting field name. Must be exactly one of Custom field 1, Custom field 2, Custom field 3, Custom field 4, or Custom field 5. Values are case-sensitive.
Custom field 1Custom field 2Custom field 3Custom field 4Custom field 5Airwallex display name for the accounting field.
Time at which the accounting field was created, in ISO 8601 format.
Unique identifier of the accounting field.
Accounting field name.
Airwallex display name for the accounting field.
Status of an Accounting resource used in Airwallex Spend.
ACTIVEARCHIVEDTime at which the accounting field was last updated, in ISO 8601 format.
| Error status | Description |
|---|---|
| 400 | Invalid request. |
| 404 | Not found. |
| 500 | Internal server error. |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/accounting_fields/985461d5-016f-4e1f-a387-5f1380b42d92/update' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "name": "Custom field 1",> "name_label": "APAC Region">}'
1{2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",3 "name": "Custom field 1",4 "name_label": "APAC Region",5 "status": "ACTIVE",6 "created_at": "2025-01-01T00:00:00Z",7 "updated_at": "2025-02-02T00:00:00Z"8}