General Ledger Accounts
Manages General Ledger (GL) account entries used when coding Airwallex Spend transactions, such as expenses and bills.
GET /api/v1/accounting/gl_accountsGET /api/v1/accounting/gl_accounts/{id}POST /api/v1/accounting/gl_accounts/{id}/updatePOST /api/v1/accounting/gl_accounts/create
List General Ledger AccountsBeta
GET /api/v1/accounting/gl_accounts
Returns General Ledger (GL) accounts used in Airwallex Spend, filtered by the specified query parameters.
Filter by external ID.
Filter by legal entity ID.
A bookmark for use in pagination to retrieve the next or previous page of results.
Filter by general ledger account status. Possible values are ACTIVE and ARCHIVED.
ACTIVEARCHIVEDList of general ledger accounts returned.
Time at which the general ledger account was created, in ISO 8601 format.
Unique identifier of the general ledger account.
Status of an Accounting resource used in Airwallex Spend. Possible values are ACTIVE and ARCHIVED.
ACTIVEARCHIVEDTime at which the general ledger account was last updated, in ISO 8601 format.
General ledger account name.
General ledger account code.
External ID from the accounting system.
Legal entity IDs to which this general ledger account applies. Omit this field when it applies to all legal entities.
Airwallex display name for the general ledger account.
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/gl_accounts' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "items": [3 {4 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",5 "code": "601022001-2",6 "value": "Travel Costs-Domestic-Transportation -2",7 "value_label": "Travel-Domestic-Flight | 601022001",8 "external_id": "601022001-2",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}
Get General Ledger AccountBeta
GET /api/v1/accounting/gl_accounts/{id}
Retrieves an existing General Ledger (GL) account used in Airwallex Spend.
Unique identifier of the general ledger account.
General ledger account code.
Time at which the general ledger account was created, in ISO 8601 format.
External ID from the accounting system.
Unique identifier of the general ledger account.
Legal entity IDs to which this general ledger account applies. Omit this field when it applies to all legal entities.
Status of an Accounting resource used in Airwallex Spend. Possible values are ACTIVE and ARCHIVED.
ACTIVEARCHIVEDTime at which the general ledger account was last updated, in ISO 8601 format.
General ledger account name.
Airwallex display name for the general ledger account.
| 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/gl_accounts/985461d5-016f-4e1f-a387-5f1380b42d92' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
1{2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",3 "code": "601022001-2",4 "value": "Travel Costs-Domestic-Transportation -2",5 "value_label": "Travel-Domestic-Flight | 601022001",6 "external_id": "601022001-2",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}
Update General Ledger AccountBeta
POST /api/v1/accounting/gl_accounts/{id}/update
Updates an existing General Ledger (GL) account used in Airwallex Spend.
Unique identifier of the general ledger account.
Status of an Accounting resource used in Airwallex Spend. Possible values are ACTIVE and ARCHIVED.
ACTIVEARCHIVEDGeneral ledger account name.
General ledger account code.
External ID from the accounting system.
Legal entity IDs to which this general ledger account applies. Omit this field when it applies to all legal entities.
Airwallex display name for the general ledger account.
General ledger account code.
Time at which the general ledger account was created, in ISO 8601 format.
External ID from the accounting system.
Unique identifier of the general ledger account.
Legal entity IDs to which this general ledger account applies. Omit this field when it applies to all legal entities.
Status of an Accounting resource used in Airwallex Spend. Possible values are ACTIVE and ARCHIVED.
ACTIVEARCHIVEDTime at which the general ledger account was last updated, in ISO 8601 format.
General ledger account name.
Airwallex display name for the general ledger account.
| 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/gl_accounts/985461d5-016f-4e1f-a387-5f1380b42d92/update' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "code": "601022001-2",> "value": "Travel Costs-Domestic-Transportation -2",> "value_label": "Travel-Domestic-Flight | 601022001",> "external_id": "601022001-2",> "legal_entity_ids": [> "le_U3jlHqQRNHWn2zAKeeT8sg"> ],> "status": "ACTIVE">}'
1{2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",3 "code": "601022001-2",4 "value": "Travel Costs-Domestic-Transportation -2",5 "value_label": "Travel-Domestic-Flight | 601022001",6 "external_id": "601022001-2",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}
Create General Ledger AccountBeta
POST /api/v1/accounting/gl_accounts/create
Creates a new General Ledger (GL) account for coding Airwallex Spend transactions.
Unique identifier for this request to ensure idempotency. Generate a random UUID to prevent accidental duplication.
General ledger account name.
General ledger account code.
External ID from the accounting system.
Legal entity IDs to which this general ledger account applies. Omit this field when it applies to all legal entities.
Airwallex display name for the general ledger account.
General ledger account code.
Time at which the general ledger account was created, in ISO 8601 format.
External ID from the accounting system.
Unique identifier of the general ledger account.
Legal entity IDs to which this general ledger account applies. Omit this field when it applies to all legal entities.
Status of an Accounting resource used in Airwallex Spend. Possible values are ACTIVE and ARCHIVED.
ACTIVEARCHIVEDTime at which the general ledger account was last updated, in ISO 8601 format.
General ledger account name.
Airwallex display name for the general ledger account.
| Error status | Description |
|---|---|
| 400 | Invalid request. |
| 500 | Internal server error. |
$curl --request POST \> --url 'https://api.sandbox.airwallex.com/api/v1/accounting/gl_accounts/create' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json' \> --data '{> "request_id": "4b8d83d6-70c4-429d-8a0b-bb3281f6b17f",> "code": "601022001-2",> "value": "Travel Costs-Domestic-Transportation -2",> "value_label": "Travel-Domestic-Flight | 601022001",> "external_id": "601022001-2",> "legal_entity_ids": [> "le_U3jlHqQRNHWn2zAKeeT8sg"> ]>}'
1{2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",3 "code": "601022001-2",4 "value": "Travel Costs-Domestic-Transportation -2",5 "value_label": "Travel-Domestic-Flight | 601022001",6 "external_id": "601022001-2",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}