Airwallex logo

Tax Codes

Copy for LLMView as Markdown

Manages tax codes used when coding accounting data.

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

List Tax CodesBeta

GET /api/v1/accounting/tax_codes

Returns tax codes filtered by the specified query parameters.

Parameters
external_idstring

Filter by external ID.

legal_entity_idstring

Filter by legal entity ID.

pagestring

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

statusstring

Filter by tax code status. Possible values are ACTIVE and ARCHIVED.

ACTIVE
ARCHIVED
Response body - 200 OK
itemsarray

List of tax codes returned.

items.created_atstring

Time at which the tax code was created, in ISO 8601 format.

items.idstring

Unique identifier of the tax code.

items.rate_percentstring

Tax rate value as a decimal percentage.

items.statusstring

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

ACTIVE
ARCHIVED
items.updated_atstring

Time at which the tax code was last updated, in ISO 8601 format.

items.valuestring

Tax code name as defined in the accounting system.

items.external_idstring

External ID from the accounting system.

items.legal_entity_idsarray

Legal entity IDs to which this tax code applies. Omit this field when it applies to all legal entities.

items.value_labelstring

Airwallex display name for the tax code.

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/tax_codes
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/tax_codes' \
> --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 "value": "9",
6 "rate_percent": "9.0000",
7 "value_label": "9%",
8 "external_id": "9",
9 "legal_entity_ids": [
10 "le_U3jlHqQRNHWn2zAKeeT8sg"
11 ],
12 "status": "ACTIVE",
13 "created_at": "2025-01-01T00:00:00Z",
14 "updated_at": "2025-02-02T00:00:00Z"
15 }
16 ],
17 "page_after": "eyJwYWdlIjoiMiJ9"
18}
Was this section helpful?

Get Tax CodeBeta

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

Retrieves an existing tax code.

Parameters
idrequiredstring

Unique identifier of the tax code.

Response body - 200 OK
created_atstring

Time at which the tax code was created, in ISO 8601 format.

external_idstring

External ID from the accounting system.

idstring

Unique identifier of the tax code.

legal_entity_idsarray

Legal entity IDs to which this tax code applies. Omit this field when it applies to all legal entities.

rate_percentstring

Tax rate value as a decimal percentage.

statusstring

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

ACTIVE
ARCHIVED
updated_atstring

Time at which the tax code was last updated, in ISO 8601 format.

valuestring

Tax code name as defined in the accounting system.

value_labelstring

Airwallex display name for the tax code.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

GET /api/v1/accounting/tax_codes/{id}
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/tax_codes/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 "value": "9",
4 "rate_percent": "9.0000",
5 "value_label": "9%",
6 "external_id": "9",
7 "legal_entity_ids": [
8 "le_U3jlHqQRNHWn2zAKeeT8sg"
9 ],
10 "status": "ACTIVE",
11 "created_at": "2025-01-01T00:00:00Z",
12 "updated_at": "2025-02-02T00:00:00Z"
13}
Was this section helpful?

Update Tax CodeBeta

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

Updates an existing tax code.

Parameters
idrequiredstring

Unique identifier of the tax code.

Request body
rate_percentrequiredstring

Tax rate value as a decimal percentage.

statusrequiredstring

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

ACTIVE
ARCHIVED
valuerequiredstring

Tax code name as defined in the accounting system.

external_idstring

External ID from the accounting system.

legal_entity_idsarray

Legal entity IDs to which this tax code applies. Omit this field when it applies to all legal entities.

value_labelstring

Airwallex display name for the tax code.

Response body - 200 OK
created_atstring

Time at which the tax code was created, in ISO 8601 format.

external_idstring

External ID from the accounting system.

idstring

Unique identifier of the tax code.

legal_entity_idsarray

Legal entity IDs to which this tax code applies. Omit this field when it applies to all legal entities.

rate_percentstring

Tax rate value as a decimal percentage.

statusstring

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

ACTIVE
ARCHIVED
updated_atstring

Time at which the tax code was last updated, in ISO 8601 format.

valuestring

Tax code name as defined in the accounting system.

value_labelstring

Airwallex display name for the tax code.

Errors
Error statusDescription
400

Invalid request.

404

Not found.

500

Internal server error.

POST /api/v1/accounting/tax_codes/{id}/update
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/tax_codes/985461d5-016f-4e1f-a387-5f1380b42d92/update' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "value": "9",
> "rate_percent": "9.0000",
> "value_label": "9%",
> "external_id": "9",
> "legal_entity_ids": [
> "le_U3jlHqQRNHWn2zAKeeT8sg"
> ],
> "status": "ACTIVE"
>}'
Response (200 OK)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "value": "9",
4 "rate_percent": "9.0000",
5 "value_label": "9%",
6 "external_id": "9",
7 "legal_entity_ids": [
8 "le_U3jlHqQRNHWn2zAKeeT8sg"
9 ],
10 "status": "ACTIVE",
11 "created_at": "2025-01-01T00:00:00Z",
12 "updated_at": "2025-02-02T00:00:00Z"
13}
Was this section helpful?

Create Tax CodeBeta

POST /api/v1/accounting/tax_codes/create

Creates a new tax code.

Request body
rate_percentrequiredstring

Tax rate value as a decimal percentage.

request_idrequiredstring

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

valuerequiredstring

Tax code name as defined in the accounting system.

external_idstring

External ID from the accounting system.

legal_entity_idsarray

Legal entity IDs to which this tax code applies. Omit this field when it applies to all legal entities.

value_labelstring

Airwallex display name for the tax code.

Response body - 201 Created
created_atstring

Time at which the tax code was created, in ISO 8601 format.

external_idstring

External ID from the accounting system.

idstring

Unique identifier of the tax code.

legal_entity_idsarray

Legal entity IDs to which this tax code applies. Omit this field when it applies to all legal entities.

rate_percentstring

Tax rate value as a decimal percentage.

statusstring

Accounting resource status. Possible values are ACTIVE and ARCHIVED.

ACTIVE
ARCHIVED
updated_atstring

Time at which the tax code was last updated, in ISO 8601 format.

valuestring

Tax code name as defined in the accounting system.

value_labelstring

Airwallex display name for the tax code.

Errors
Error statusDescription
400

Invalid request.

500

Internal server error.

POST /api/v1/accounting/tax_codes/create
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/tax_codes/create' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "request_id": "4b8d83d6-70c4-429d-8a0b-bb3281f6b17f",
> "value": "9",
> "rate_percent": "9.0000",
> "value_label": "9%",
> "external_id": "9",
> "legal_entity_ids": [
> "le_U3jlHqQRNHWn2zAKeeT8sg"
> ]
>}'
Response (201 Created)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "value": "9",
4 "rate_percent": "9.0000",
5 "value_label": "9%",
6 "external_id": "9",
7 "legal_entity_ids": [
8 "le_U3jlHqQRNHWn2zAKeeT8sg"
9 ],
10 "status": "ACTIVE",
11 "created_at": "2025-01-01T00:00:00Z",
12 "updated_at": "2025-01-01T00:00:00Z"
13}
Was this section helpful?