Airwallex logo

Accounting Fields

Copy for LLMView as Markdown

Manages custom accounting fields that define additional accounting dimensions.

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

List Accounting FieldsBeta

GET /api/v1/accounting/accounting_fields

Returns accounting fields.

Parameters
pagestring

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

statusstring

Filter by accounting field status. Possible values are ACTIVE and ARCHIVED.

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

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

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?

Get Accounting FieldBeta

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

Retrieves an existing accounting field.

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

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

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?

Update Accounting FieldBeta

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

Updates an existing accounting field.

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

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

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?

Create Accounting FieldBeta

POST /api/v1/accounting/accounting_fields/create

Creates a new 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
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

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

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?