Airwallex logo

Accounting Fields

Copy for LLMView as Markdown

Manages custom accounting fields that define additional accounting dimensions for Airwallex Spend, such as projects or cost centers.

Endpoints
POST /api/v1/accounting/accounting_fields/create
GET /api/v1/accounting/accounting_fields/{id}
GET /api/v1/accounting/accounting_fields
POST /api/v1/accounting/accounting_fields/{id}/update

Create an Accounting FieldBeta

POST /api/v1/accounting/accounting_fields/create

Create an Accounting Field is in beta
We may include major new functionality or changes before general release. Learn more about beta.

Creates a new custom accounting field for Airwallex Spend.

Request body
namerequiredstring

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 1
Custom field 2
Custom field 3
Custom field 4
Custom field 5
request_idrequiredstring

Unique identifier for this request to ensure idempotency. Generate a random UUID to prevent accidental duplication.

name_labelstring

Airwallex display name for the accounting field.

Response body - 201 Created
created_atstring

Time at which the accounting field was created, in ISO 8601 format.

idstring

Unique identifier of the accounting field.

namestring

Accounting field name.

name_labelstring

Airwallex display name for the accounting field.

statusstring

Status of an Accounting resource used in Airwallex Spend.

ACTIVE
ARCHIVED
updated_atstring

Time at which the accounting field was last updated, in ISO 8601 format.

Errors
Error statusDescription
400

Invalid request.

500

Internal server error.

POST /api/v1/accounting/accounting_fields/create
$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"
>}'
Response (201 Created)
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}
Was this section helpful?

Retrieve an Accounting FieldBeta

GET /api/v1/accounting/accounting_fields/{id}

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

Retrieves an existing custom accounting field used in Airwallex Spend.

Path parameters
idrequiredstring

Unique identifier of the accounting field.

Response body - 200 OK
created_atstring

Time at which the accounting field was created, in ISO 8601 format.

idstring

Unique identifier of the accounting field.

namestring

Accounting field name.

name_labelstring

Airwallex display name for the accounting field.

statusstring

Status of an Accounting resource used in Airwallex Spend.

ACTIVE
ARCHIVED
updated_atstring

Time at which the accounting field was last updated, in ISO 8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

GET /api/v1/accounting/accounting_fields/{id}
$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'
Response (200 OK)
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}
Was this section helpful?

List all Accounting FieldsBeta

GET /api/v1/accounting/accounting_fields

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

Returns custom accounting fields used in Airwallex Spend.

Query parameters
pagestring

A bookmark for use in pagination to retrieve the next or previous page of results.

statusstring

Filter by accounting field status.

ACTIVE
ARCHIVED
Response body - 200 OK
itemsarray

List of accounting fields returned.

items.created_atstring

Time at which the accounting field was created, in ISO 8601 format.

items.idstring

Unique identifier of the accounting field.

items.namestring

Accounting field name.

items.statusstring

Status of an Accounting resource used in Airwallex Spend.

ACTIVE
ARCHIVED
items.updated_atstring

Time at which the accounting field was last updated, in ISO 8601 format.

items.name_labelstring

Airwallex display name for the accounting field.

page_afterstring

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

page_beforestring

A pointer to the start of the page list used to retrieve the previous page of results.

Errors
Error statusDescription
400

Invalid request.

500

Internal server error.

GET /api/v1/accounting/accounting_fields
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/accounting_fields' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
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}
Was this section helpful?

Update an Accounting FieldBeta

POST /api/v1/accounting/accounting_fields/{id}/update

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

Updates an existing custom accounting field used in Airwallex Spend.

Path parameters
idrequiredstring

Unique identifier of the accounting field.

Request body
namerequiredstring

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 1
Custom field 2
Custom field 3
Custom field 4
Custom field 5
name_labelstring

Airwallex display name for the accounting field.

Response body - 200 OK
created_atstring

Time at which the accounting field was created, in ISO 8601 format.

idstring

Unique identifier of the accounting field.

namestring

Accounting field name.

name_labelstring

Airwallex display name for the accounting field.

statusstring

Status of an Accounting resource used in Airwallex Spend.

ACTIVE
ARCHIVED
updated_atstring

Time at which the accounting field was last updated, in ISO 8601 format.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

POST /api/v1/accounting/accounting_fields/{id}/update
$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"
>}'
Response (200 OK)
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}
Was this section helpful?