Airwallex logo

Purchase Orders

Copy for LLMView as Markdown

Manages purchase orders for tracking vendor commitments and spend. Supports creation, retrieval, listing with filters, and sync status updates for integration with external accounting systems.

Endpoints
GET /api/v1/spend/purchase_orders
GET /api/v1/spend/purchase_orders/{id}
POST /api/v1/spend/purchase_orders/{id}/sync
POST /api/v1/spend/purchase_orders/create

List purchase ordersBeta

GET /api/v1/spend/purchase_orders

List purchase orders is in beta
We may include major new functionality or changes before general release. Learn more about beta.

Returns a list of purchase orders filtered by the specified query parameters.

Parameters
external_idstring

Filter by purchase order external unique identifier.

from_created_atstring

Filter by purchase orders created after this timestamp (inclusive) in ISO8601 format. If not specified, defaults to last 30 days from to_created_at.

from_updated_atstring

Filter by purchase orders updated after this timestamp (inclusive) in ISO8601 format.

legal_entity_idstring

Filter by legal entity unique identifier.

pagestring

A bookmark for use in pagination to retrieve either the next page or the previous page of results. You can fetch the value for this identifier from the response of the previous API call.

statusstring

Filter by purchase order status.

OPEN
COMPLETED
ARCHIVED
CLOSED
sync_statusstring

Filter by sync status.

NOT_SYNCED
SYNCED
SYNC_FAILED
to_created_atstring

Filter by purchase orders created before this timestamp (exclusive) in ISO8601 format. If not specified, defaults to now.

to_updated_atstring

Filter by purchase orders updated before this timestamp (exclusive) in ISO8601 format.

Response body - 200 OK
itemsarray

List of items returned.

items.approversarray

List of user emails who can approve the purchase order.

items.attachmentsarray

List of file attachments associated with the purchase order.

items.attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

items.attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

items.attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

items.attachments.idstring

Unique identifier of the attachment.

items.billed_amountstring

Total tax-exclusive amount already billed against this purchase order.

items.billing_currencystring

Currency of the purchase order, as an ISO 4217 currency code.

UNDEFINED
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
BDT
BGN
BHD
BIF
BMD
BND
BOB
BOV
BRL
BSD
BTN
BWP
BYN
BYR
BZD
CAD
CDF
CHE
CHF
CHW
CLF
CLP
CNY
COP
COU
CRC
CUC
CUP
CVE
CZK
DJF
DKK
DOP
DZD
EGP
ERN
ETB
EUR
FJD
FKP
GBP
GEL
GHS
GIP
GMD
GNF
GTQ
GYD
HKD
HNL
HRK
HTG
HUF
IDR
ILS
INR
IQD
IRR
ISK
JMD
JOD
JPY
KES
KGS
KHR
KMF
KPW
KRW
KWD
KYD
KZT
LAK
LBP
LKR
LRD
LSL
LTL
LYD
MAD
MDL
MGA
MKD
MMK
MNT
MOP
MRO
MRU
MUR
MVR
MWK
MXN
MXV
MYR
MZN
NAD
NGN
NIO
NOK
NPR
NZD
OMR
PAB
PEN
PGK
PHP
PKR
PLN
PYG
QAR
RON
RSD
RUB
RUR
RWF
SAR
SBD
SCR
SDG
SEK
SGD
SHP
SLL
SOS
SRD
SSP
STD
STN
SVC
SYP
SZL
THB
TJS
TMT
TND
TOP
TRY
TTD
TWD
TZS
UAH
UGX
USD
USN
USS
UYI
UYU
UZS
VEF
VES
VND
VUV
WST
XAF
XAG
XAU
XBA
XBB
XBC
XBD
XCD
XDR
XOF
XPD
XPF
XPT
XSU
XTS
XUA
XXX
YER
ZAR
ZMW
ZWL
items.commentsarray

List of comments on the purchase order.

items.comments.contentstring

Text body of the comment.

items.comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

items.created_atstring

Timestamp for when the resource was created in ISO8601 format.

items.idstring

Unique identifier of the purchase order.

items.legal_entity_idstring

Unique identifier of the legal entity associated with the purchase order.

items.line_itemsarray

List of line items on the purchase order.

items.line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

items.line_items.accounting_field_selections.typestring

Type of accounting field.

SUBSIDIARY
MERCHANT
GENERAL_LEDGER_ACCOUNT
TAX_CODE
CLASS
DEPARTMENT
LOCATION
PROJECT
OTHER
items.line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

items.line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

items.line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

items.line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

items.line_items.idstring

Unique identifier of the line item.

items.line_items.quantitystring

Quantity of the line item.

items.line_items.unit_pricestring

Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.

items.line_items.descriptionstring

Description of the line item.

items.purchase_order_numberstring

Unique reference number for this purchase order.

items.statusstring

Purchase order status.

OPEN
COMPLETED
ARCHIVED
CLOSED
items.sync_statusstring

Sync status for an accounting system.

NOT_SYNCED
SYNCED
SYNC_FAILED
items.total_amountstring

Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.

items.updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

items.vendor_idstring

Unique identifier of the vendor associated with the purchase order.

items.contactsobject

Purchase Order Contact Information.

items.contacts.billing_contactobject

Purchase Order Contact Details.

items.contacts.billing_contact.addressobject

Address.

items.contacts.billing_contact.address.citystring

City, district, suburb, or town.

items.contacts.billing_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
items.contacts.billing_contact.address.postcodestring

Postal/ZIP code.

items.contacts.billing_contact.address.statestring

State, province, or region.

items.contacts.billing_contact.address.street_addressstring

Street address line.

items.contacts.billing_contact.company_namestring

Name of the company.

items.contacts.billing_contact.contact_namestring

Name of the contact person.

items.contacts.billing_contact.emailstring

Email address.

items.contacts.billing_contact.phone_numberstring

Phone number in E.164 format.

items.contacts.shipping_contactobject

Purchase Order Contact Details.

items.contacts.shipping_contact.addressobject

Address.

items.contacts.shipping_contact.address.citystring

City, district, suburb, or town.

items.contacts.shipping_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
items.contacts.shipping_contact.address.postcodestring

Postal/ZIP code.

items.contacts.shipping_contact.address.statestring

State, province, or region.

items.contacts.shipping_contact.address.street_addressstring

Street address line.

items.contacts.shipping_contact.company_namestring

Name of the company.

items.contacts.shipping_contact.contact_namestring

Name of the contact person.

items.contacts.shipping_contact.emailstring

Email address.

items.contacts.shipping_contact.phone_numberstring

Phone number in E.164 format.

items.contacts.vendor_contactobject

Purchase Order Contact Details.

items.contacts.vendor_contact.addressobject

Address.

items.contacts.vendor_contact.address.citystring

City, district, suburb, or town.

items.contacts.vendor_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
items.contacts.vendor_contact.address.postcodestring

Postal/ZIP code.

items.contacts.vendor_contact.address.statestring

State, province, or region.

items.contacts.vendor_contact.address.street_addressstring

Street address line.

items.contacts.vendor_contact.company_namestring

Name of the company.

items.contacts.vendor_contact.contact_namestring

Name of the contact person.

items.contacts.vendor_contact.emailstring

Email address.

items.contacts.vendor_contact.phone_numberstring

Phone number in E.164 format.

items.descriptionstring

Description of the purchase order.

items.external_idstring

External identifier for this purchase order in your system.

items.net_payment_terms_in_daysinteger

Net payment terms in days.

items.notestring

Additional note or instruction for the vendor regarding this purchase order.

items.owner_emailstring

Email of the internal owner responsible for managing this purchase order.

items.promise_datestring

Expected delivery date for the goods or services, in ISO8601 format.

items.recurrenceobject

Defines the schedule and duration for a recurring purchase order.

items.recurrence.frequencystring

Frequency for recurring purchase orders.

WEEKLY
MONTHLY
QUARTERLY
YEARLY
items.recurrence.iterationsinteger

Number of occurrences for recurring purchase orders.

items.recurring_amountstring

Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.

items.sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

page_afterstring

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

page_beforestring

A pointer to the start of the page list use in pagination to retrieve the previous page of results.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

GET /api/v1/spend/purchase_orders
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/purchase_orders' \
> --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 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
6 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
7 "billing_currency": "USD",
8 "recurring_amount": "5000.0",
9 "total_amount": "60000.0",
10 "billed_amount": "3000.0",
11 "purchase_order_number": "PO-0001",
12 "external_id": "PO-EXT-001",
13 "status": "OPEN",
14 "sync_status": "SYNCED",
15 "sync_error_message": "Failed to sync purchase order: this purchase order number already exists.",
16 "recurrence": {
17 "frequency": "MONTHLY",
18 "iterations": 12
19 },
20 "description": "Annual software license renewal for Q1 2025.",
21 "note": "Please deliver between 9AM-5PM",
22 "net_payment_terms_in_days": 30,
23 "promise_date": "2025-01-10",
24 "approvers": [
27 ],
28 "owner_email": "[email protected]",
29 "contacts": {
30 "vendor_contact": {
31 "contact_name": "John Doe",
32 "company_name": "Airwallex Pty Ltd",
33 "email": "[email protected]",
34 "phone_number": "+61499999999",
35 "address": {
36 "street_address": "123 Main Street",
37 "city": "San Francisco",
38 "state": "California",
39 "postcode": "94105",
40 "country_code": "US"
41 }
42 },
43 "shipping_contact": {
44 "contact_name": "John Doe",
45 "company_name": "Airwallex Pty Ltd",
46 "email": "[email protected]",
47 "phone_number": "+61499999999",
48 "address": {
49 "street_address": "123 Main Street",
50 "city": "San Francisco",
51 "state": "California",
52 "postcode": "94105",
53 "country_code": "US"
54 }
55 },
56 "billing_contact": {
57 "contact_name": "John Doe",
58 "company_name": "Airwallex Pty Ltd",
59 "email": "[email protected]",
60 "phone_number": "+61499999999",
61 "address": {
62 "street_address": "123 Main Street",
63 "city": "San Francisco",
64 "state": "California",
65 "postcode": "94105",
66 "country_code": "US"
67 }
68 }
69 },
70 "attachments": [
71 {
72 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
73 "content_type": "image/jpeg",
74 "file_name": "flight_receipt.jpg",
75 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
76 "created_at": "2025-02-02T00:00:00Z"
77 }
78 ],
79 "line_items": [
80 {
81 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
82 "description": "Office supplies",
83 "quantity": "10",
84 "unit_price": "500.0",
85 "accounting_field_selections": [
86 {
87 "type": "OTHER",
88 "name": "Cost Center",
89 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
90 "value": "Office Expense",
91 "value_label": "Office Expense"
92 }
93 ]
94 }
95 ],
96 "comments": [
97 {
98 "content": "Expense approved - valid business purpose confirmed",
99 "created_by": "[email protected]",
100 "created_at": "2025-01-01T00:00:00Z"
101 }
102 ],
103 "created_at": "2025-01-01T00:00:00Z",
104 "updated_at": "2025-02-02T00:00:00Z"
105 }
106 ],
107 "page_after": "eyJwYWdlX2JlZm9yZSI6IjIwMjUtMDctMDFUMDA6MDA6MDBaIn0=",
108 "page_before": "eyJwYWdlX2JlZm9yZSI6IjIwMjUtMDctMDFUMDA6MDA6MDBaIn0="
109}
Was this section helpful?

Get purchase orderBeta

GET /api/v1/spend/purchase_orders/{id}

Get purchase order is in beta
We may include major new functionality or changes before general release. Learn more about beta.

Retrieves the details of an existing purchase order.

Parameters
idrequiredstring

Unique identifier of the purchase order.

Response body - 200 OK
approversarray

List of user emails who can approve the purchase order.

attachmentsarray

List of file attachments associated with the purchase order.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

attachments.idstring

Unique identifier of the attachment.

billed_amountstring

Total tax-exclusive amount already billed against this purchase order.

billing_currencystring

Currency of the purchase order, as an ISO 4217 currency code.

UNDEFINED
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
BDT
BGN
BHD
BIF
BMD
BND
BOB
BOV
BRL
BSD
BTN
BWP
BYN
BYR
BZD
CAD
CDF
CHE
CHF
CHW
CLF
CLP
CNY
COP
COU
CRC
CUC
CUP
CVE
CZK
DJF
DKK
DOP
DZD
EGP
ERN
ETB
EUR
FJD
FKP
GBP
GEL
GHS
GIP
GMD
GNF
GTQ
GYD
HKD
HNL
HRK
HTG
HUF
IDR
ILS
INR
IQD
IRR
ISK
JMD
JOD
JPY
KES
KGS
KHR
KMF
KPW
KRW
KWD
KYD
KZT
LAK
LBP
LKR
LRD
LSL
LTL
LYD
MAD
MDL
MGA
MKD
MMK
MNT
MOP
MRO
MRU
MUR
MVR
MWK
MXN
MXV
MYR
MZN
NAD
NGN
NIO
NOK
NPR
NZD
OMR
PAB
PEN
PGK
PHP
PKR
PLN
PYG
QAR
RON
RSD
RUB
RUR
RWF
SAR
SBD
SCR
SDG
SEK
SGD
SHP
SLL
SOS
SRD
SSP
STD
STN
SVC
SYP
SZL
THB
TJS
TMT
TND
TOP
TRY
TTD
TWD
TZS
UAH
UGX
USD
USN
USS
UYI
UYU
UZS
VEF
VES
VND
VUV
WST
XAF
XAG
XAU
XBA
XBB
XBC
XBD
XCD
XDR
XOF
XPD
XPF
XPT
XSU
XTS
XUA
XXX
YER
ZAR
ZMW
ZWL
commentsarray

List of comments on the purchase order.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

contactsobject

Purchase Order Contact Information.

contacts.billing_contactobject

Purchase Order Contact Details.

contacts.billing_contact.addressobject

Address.

contacts.billing_contact.address.citystring

City, district, suburb, or town.

contacts.billing_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.billing_contact.address.postcodestring

Postal/ZIP code.

contacts.billing_contact.address.statestring

State, province, or region.

contacts.billing_contact.address.street_addressstring

Street address line.

contacts.billing_contact.company_namestring

Name of the company.

contacts.billing_contact.contact_namestring

Name of the contact person.

contacts.billing_contact.emailstring

Email address.

contacts.billing_contact.phone_numberstring

Phone number in E.164 format.

contacts.shipping_contactobject

Purchase Order Contact Details.

contacts.shipping_contact.addressobject

Address.

contacts.shipping_contact.address.citystring

City, district, suburb, or town.

contacts.shipping_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.shipping_contact.address.postcodestring

Postal/ZIP code.

contacts.shipping_contact.address.statestring

State, province, or region.

contacts.shipping_contact.address.street_addressstring

Street address line.

contacts.shipping_contact.company_namestring

Name of the company.

contacts.shipping_contact.contact_namestring

Name of the contact person.

contacts.shipping_contact.emailstring

Email address.

contacts.shipping_contact.phone_numberstring

Phone number in E.164 format.

contacts.vendor_contactobject

Purchase Order Contact Details.

contacts.vendor_contact.addressobject

Address.

contacts.vendor_contact.address.citystring

City, district, suburb, or town.

contacts.vendor_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.vendor_contact.address.postcodestring

Postal/ZIP code.

contacts.vendor_contact.address.statestring

State, province, or region.

contacts.vendor_contact.address.street_addressstring

Street address line.

contacts.vendor_contact.company_namestring

Name of the company.

contacts.vendor_contact.contact_namestring

Name of the contact person.

contacts.vendor_contact.emailstring

Email address.

contacts.vendor_contact.phone_numberstring

Phone number in E.164 format.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Description of the purchase order.

external_idstring

External identifier for this purchase order in your system.

idstring

Unique identifier of the purchase order.

legal_entity_idstring

Unique identifier of the legal entity associated with the purchase order.

line_itemsarray

List of line items on the purchase order.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.typestring

Type of accounting field.

SUBSIDIARY
MERCHANT
GENERAL_LEDGER_ACCOUNT
TAX_CODE
CLASS
DEPARTMENT
LOCATION
PROJECT
OTHER
line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the line item.

line_items.quantitystring

Quantity of the line item.

line_items.unit_pricestring

Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.

line_items.descriptionstring

Description of the line item.

net_payment_terms_in_daysinteger

Net payment terms in days.

notestring

Additional note or instruction for the vendor regarding this purchase order.

owner_emailstring

Email of the internal owner responsible for managing this purchase order.

promise_datestring

Expected delivery date for the goods or services, in ISO8601 format.

purchase_order_numberstring

Unique reference number for this purchase order.

recurrenceobject

Defines the schedule and duration for a recurring purchase order.

recurrence.frequencystring

Frequency for recurring purchase orders.

WEEKLY
MONTHLY
QUARTERLY
YEARLY
recurrence.iterationsinteger

Number of occurrences for recurring purchase orders.

recurring_amountstring

Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.

statusstring

Purchase order status.

OPEN
COMPLETED
ARCHIVED
CLOSED
sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

sync_statusstring

Sync status for an accounting system.

NOT_SYNCED
SYNCED
SYNC_FAILED
total_amountstring

Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.

updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

vendor_idstring

Unique identifier of the vendor associated with the purchase order.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

GET /api/v1/spend/purchase_orders/{id}
$curl --request GET \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/purchase_orders/purchase_order_id' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json'
Response (200 OK)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
4 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
5 "billing_currency": "USD",
6 "recurring_amount": "5000.0",
7 "total_amount": "60000.0",
8 "billed_amount": "3000.0",
9 "purchase_order_number": "PO-0001",
10 "external_id": "PO-EXT-001",
11 "status": "OPEN",
12 "sync_status": "SYNCED",
13 "sync_error_message": "Failed to sync purchase order: this purchase order number already exists.",
14 "recurrence": {
15 "frequency": "MONTHLY",
16 "iterations": 12
17 },
18 "description": "Annual software license renewal for Q1 2025.",
19 "note": "Please deliver between 9AM-5PM",
20 "net_payment_terms_in_days": 30,
21 "promise_date": "2025-01-10",
22 "approvers": [
25 ],
26 "owner_email": "[email protected]",
27 "contacts": {
28 "vendor_contact": {
29 "contact_name": "John Doe",
30 "company_name": "Airwallex Pty Ltd",
31 "email": "[email protected]",
32 "phone_number": "+61499999999",
33 "address": {
34 "street_address": "123 Main Street",
35 "city": "San Francisco",
36 "state": "California",
37 "postcode": "94105",
38 "country_code": "US"
39 }
40 },
41 "shipping_contact": {
42 "contact_name": "John Doe",
43 "company_name": "Airwallex Pty Ltd",
44 "email": "[email protected]",
45 "phone_number": "+61499999999",
46 "address": {
47 "street_address": "123 Main Street",
48 "city": "San Francisco",
49 "state": "California",
50 "postcode": "94105",
51 "country_code": "US"
52 }
53 },
54 "billing_contact": {
55 "contact_name": "John Doe",
56 "company_name": "Airwallex Pty Ltd",
57 "email": "[email protected]",
58 "phone_number": "+61499999999",
59 "address": {
60 "street_address": "123 Main Street",
61 "city": "San Francisco",
62 "state": "California",
63 "postcode": "94105",
64 "country_code": "US"
65 }
66 }
67 },
68 "attachments": [
69 {
70 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
71 "content_type": "image/jpeg",
72 "file_name": "flight_receipt.jpg",
73 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
74 "created_at": "2025-02-02T00:00:00Z"
75 }
76 ],
77 "line_items": [
78 {
79 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
80 "description": "Office supplies",
81 "quantity": "10",
82 "unit_price": "500.0",
83 "accounting_field_selections": [
84 {
85 "type": "OTHER",
86 "name": "Cost Center",
87 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
88 "value": "Office Expense",
89 "value_label": "Office Expense"
90 }
91 ]
92 }
93 ],
94 "comments": [
95 {
96 "content": "Expense approved - valid business purpose confirmed",
97 "created_by": "[email protected]",
98 "created_at": "2025-01-01T00:00:00Z"
99 }
100 ],
101 "created_at": "2025-01-01T00:00:00Z",
102 "updated_at": "2025-02-02T00:00:00Z"
103}
Was this section helpful?

Update purchase order sync statusBeta

POST /api/v1/spend/purchase_orders/{id}/sync

Update purchase order sync status is in beta
We may include major new functionality or changes before general release. Learn more about beta.

Updates the sync status of a purchase order.

Parameters
idrequiredstring

Unique identifier for the purchase order.

Request body
sync_statusrequiredstring

Sync status for an accounting system.

NOT_SYNCED
SYNCED
SYNC_FAILED
sync_error_messagestring

Error message for sync failures. Only applicable when sync_status is SYNC_FAILED.

Response body - 200 OK
approversarray

List of user emails who can approve the purchase order.

attachmentsarray

List of file attachments associated with the purchase order.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

attachments.idstring

Unique identifier of the attachment.

billed_amountstring

Total tax-exclusive amount already billed against this purchase order.

billing_currencystring

Currency of the purchase order, as an ISO 4217 currency code.

UNDEFINED
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
BDT
BGN
BHD
BIF
BMD
BND
BOB
BOV
BRL
BSD
BTN
BWP
BYN
BYR
BZD
CAD
CDF
CHE
CHF
CHW
CLF
CLP
CNY
COP
COU
CRC
CUC
CUP
CVE
CZK
DJF
DKK
DOP
DZD
EGP
ERN
ETB
EUR
FJD
FKP
GBP
GEL
GHS
GIP
GMD
GNF
GTQ
GYD
HKD
HNL
HRK
HTG
HUF
IDR
ILS
INR
IQD
IRR
ISK
JMD
JOD
JPY
KES
KGS
KHR
KMF
KPW
KRW
KWD
KYD
KZT
LAK
LBP
LKR
LRD
LSL
LTL
LYD
MAD
MDL
MGA
MKD
MMK
MNT
MOP
MRO
MRU
MUR
MVR
MWK
MXN
MXV
MYR
MZN
NAD
NGN
NIO
NOK
NPR
NZD
OMR
PAB
PEN
PGK
PHP
PKR
PLN
PYG
QAR
RON
RSD
RUB
RUR
RWF
SAR
SBD
SCR
SDG
SEK
SGD
SHP
SLL
SOS
SRD
SSP
STD
STN
SVC
SYP
SZL
THB
TJS
TMT
TND
TOP
TRY
TTD
TWD
TZS
UAH
UGX
USD
USN
USS
UYI
UYU
UZS
VEF
VES
VND
VUV
WST
XAF
XAG
XAU
XBA
XBB
XBC
XBD
XCD
XDR
XOF
XPD
XPF
XPT
XSU
XTS
XUA
XXX
YER
ZAR
ZMW
ZWL
commentsarray

List of comments on the purchase order.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

contactsobject

Purchase Order Contact Information.

contacts.billing_contactobject

Purchase Order Contact Details.

contacts.billing_contact.addressobject

Address.

contacts.billing_contact.address.citystring

City, district, suburb, or town.

contacts.billing_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.billing_contact.address.postcodestring

Postal/ZIP code.

contacts.billing_contact.address.statestring

State, province, or region.

contacts.billing_contact.address.street_addressstring

Street address line.

contacts.billing_contact.company_namestring

Name of the company.

contacts.billing_contact.contact_namestring

Name of the contact person.

contacts.billing_contact.emailstring

Email address.

contacts.billing_contact.phone_numberstring

Phone number in E.164 format.

contacts.shipping_contactobject

Purchase Order Contact Details.

contacts.shipping_contact.addressobject

Address.

contacts.shipping_contact.address.citystring

City, district, suburb, or town.

contacts.shipping_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.shipping_contact.address.postcodestring

Postal/ZIP code.

contacts.shipping_contact.address.statestring

State, province, or region.

contacts.shipping_contact.address.street_addressstring

Street address line.

contacts.shipping_contact.company_namestring

Name of the company.

contacts.shipping_contact.contact_namestring

Name of the contact person.

contacts.shipping_contact.emailstring

Email address.

contacts.shipping_contact.phone_numberstring

Phone number in E.164 format.

contacts.vendor_contactobject

Purchase Order Contact Details.

contacts.vendor_contact.addressobject

Address.

contacts.vendor_contact.address.citystring

City, district, suburb, or town.

contacts.vendor_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.vendor_contact.address.postcodestring

Postal/ZIP code.

contacts.vendor_contact.address.statestring

State, province, or region.

contacts.vendor_contact.address.street_addressstring

Street address line.

contacts.vendor_contact.company_namestring

Name of the company.

contacts.vendor_contact.contact_namestring

Name of the contact person.

contacts.vendor_contact.emailstring

Email address.

contacts.vendor_contact.phone_numberstring

Phone number in E.164 format.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Description of the purchase order.

external_idstring

External identifier for this purchase order in your system.

idstring

Unique identifier of the purchase order.

legal_entity_idstring

Unique identifier of the legal entity associated with the purchase order.

line_itemsarray

List of line items on the purchase order.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.typestring

Type of accounting field.

SUBSIDIARY
MERCHANT
GENERAL_LEDGER_ACCOUNT
TAX_CODE
CLASS
DEPARTMENT
LOCATION
PROJECT
OTHER
line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the line item.

line_items.quantitystring

Quantity of the line item.

line_items.unit_pricestring

Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.

line_items.descriptionstring

Description of the line item.

net_payment_terms_in_daysinteger

Net payment terms in days.

notestring

Additional note or instruction for the vendor regarding this purchase order.

owner_emailstring

Email of the internal owner responsible for managing this purchase order.

promise_datestring

Expected delivery date for the goods or services, in ISO8601 format.

purchase_order_numberstring

Unique reference number for this purchase order.

recurrenceobject

Defines the schedule and duration for a recurring purchase order.

recurrence.frequencystring

Frequency for recurring purchase orders.

WEEKLY
MONTHLY
QUARTERLY
YEARLY
recurrence.iterationsinteger

Number of occurrences for recurring purchase orders.

recurring_amountstring

Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.

statusstring

Purchase order status.

OPEN
COMPLETED
ARCHIVED
CLOSED
sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

sync_statusstring

Sync status for an accounting system.

NOT_SYNCED
SYNCED
SYNC_FAILED
total_amountstring

Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.

updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

vendor_idstring

Unique identifier of the vendor associated with the purchase order.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

POST /api/v1/spend/purchase_orders/{id}/sync
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/purchase_orders/purchase_order_id/sync' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "sync_status": "SYNC_FAILED",
> "sync_error_message": "Failed to sync purchase order: this purchase order number already exists."
>}'
Response (200 OK)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
4 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
5 "billing_currency": "USD",
6 "recurring_amount": "5000.0",
7 "total_amount": "60000.0",
8 "billed_amount": "3000.0",
9 "purchase_order_number": "PO-0001",
10 "external_id": "PO-EXT-001",
11 "status": "OPEN",
12 "sync_status": "SYNCED",
13 "sync_error_message": "Failed to sync purchase order: this purchase order number already exists.",
14 "recurrence": {
15 "frequency": "MONTHLY",
16 "iterations": 12
17 },
18 "description": "Annual software license renewal for Q1 2025.",
19 "note": "Please deliver between 9AM-5PM",
20 "net_payment_terms_in_days": 30,
21 "promise_date": "2025-01-10",
22 "approvers": [
25 ],
26 "owner_email": "[email protected]",
27 "contacts": {
28 "vendor_contact": {
29 "contact_name": "John Doe",
30 "company_name": "Airwallex Pty Ltd",
31 "email": "[email protected]",
32 "phone_number": "+61499999999",
33 "address": {
34 "street_address": "123 Main Street",
35 "city": "San Francisco",
36 "state": "California",
37 "postcode": "94105",
38 "country_code": "US"
39 }
40 },
41 "shipping_contact": {
42 "contact_name": "John Doe",
43 "company_name": "Airwallex Pty Ltd",
44 "email": "[email protected]",
45 "phone_number": "+61499999999",
46 "address": {
47 "street_address": "123 Main Street",
48 "city": "San Francisco",
49 "state": "California",
50 "postcode": "94105",
51 "country_code": "US"
52 }
53 },
54 "billing_contact": {
55 "contact_name": "John Doe",
56 "company_name": "Airwallex Pty Ltd",
57 "email": "[email protected]",
58 "phone_number": "+61499999999",
59 "address": {
60 "street_address": "123 Main Street",
61 "city": "San Francisco",
62 "state": "California",
63 "postcode": "94105",
64 "country_code": "US"
65 }
66 }
67 },
68 "attachments": [
69 {
70 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
71 "content_type": "image/jpeg",
72 "file_name": "flight_receipt.jpg",
73 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
74 "created_at": "2025-02-02T00:00:00Z"
75 }
76 ],
77 "line_items": [
78 {
79 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
80 "description": "Office supplies",
81 "quantity": "10",
82 "unit_price": "500.0",
83 "accounting_field_selections": [
84 {
85 "type": "OTHER",
86 "name": "Cost Center",
87 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
88 "value": "Office Expense",
89 "value_label": "Office Expense"
90 }
91 ]
92 }
93 ],
94 "comments": [
95 {
96 "content": "Expense approved - valid business purpose confirmed",
97 "created_by": "[email protected]",
98 "created_at": "2025-01-01T00:00:00Z"
99 }
100 ],
101 "created_at": "2025-01-01T00:00:00Z",
102 "updated_at": "2025-02-02T00:00:00Z"
103}
Was this section helpful?

Create purchase orderBeta

POST /api/v1/spend/purchase_orders/create

Create purchase order is in beta
We may include major new functionality or changes before general release. Learn more about beta.

Creates a new purchase order.

Request body
billing_currencyrequiredstring

Currency code for the purchase order.

UNDEFINED
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
BDT
BGN
BHD
BIF
BMD
BND
BOB
BOV
BRL
BSD
BTN
BWP
BYN
BYR
BZD
CAD
CDF
CHE
CHF
CHW
CLF
CLP
CNY
COP
COU
CRC
CUC
CUP
CVE
CZK
DJF
DKK
DOP
DZD
EGP
ERN
ETB
EUR
FJD
FKP
GBP
GEL
GHS
GIP
GMD
GNF
GTQ
GYD
HKD
HNL
HRK
HTG
HUF
IDR
ILS
INR
IQD
IRR
ISK
JMD
JOD
JPY
KES
KGS
KHR
KMF
KPW
KRW
KWD
KYD
KZT
LAK
LBP
LKR
LRD
LSL
LTL
LYD
MAD
MDL
MGA
MKD
MMK
MNT
MOP
MRO
MRU
MUR
MVR
MWK
MXN
MXV
MYR
MZN
NAD
NGN
NIO
NOK
NPR
NZD
OMR
PAB
PEN
PGK
PHP
PKR
PLN
PYG
QAR
RON
RSD
RUB
RUR
RWF
SAR
SBD
SCR
SDG
SEK
SGD
SHP
SLL
SOS
SRD
SSP
STD
STN
SVC
SYP
SZL
THB
TJS
TMT
TND
TOP
TRY
TTD
TWD
TZS
UAH
UGX
USD
USN
USS
UYI
UYU
UZS
VEF
VES
VND
VUV
WST
XAF
XAG
XAU
XBA
XBB
XBC
XBD
XCD
XDR
XOF
XPD
XPF
XPT
XSU
XTS
XUA
XXX
YER
ZAR
ZMW
ZWL
external_idrequiredstring

External identifier for this purchase order in your system.

legal_entity_idrequiredstring

Unique identifier of the legal entity associated with the purchase order.

line_itemsrequiredarray

List of line items in the purchase order.

line_items.quantityrequiredstring

Unit quantity of the line item.

line_items.unit_pricerequiredstring

Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.field_idrequiredstring

Unique identifier of the accounting field. If AIRWALLEX_ID is selected as identifier_type this refers to the unique identifier of the accounting field in the Airwallex system. If EXTERNAL_ID is selected as identifier_type, this refers to the unique identifier of the accounting field in the ERP system. Use Chart of accounts for chart of account and Tax rates for tax rate. For remaining custom accounting data connections, use the category name to specify the field.

line_items.accounting_field_selections.field_value_idrequiredstring

Unique identifier of the accounting field value. If AIRWALLEX_ID is selected as identifier_type this refers to the unique identifier of the accounting field value in the Airwallex system. If EXTERNAL_ID is selected as identifier_type, this refers to the unique identifier of the accounting field value in the ERP system.

line_items.accounting_field_selections.identifier_typerequiredstring

Type of identifier used for accounting field references.

AIRWALLEX_ID

Reference internal Airwallex UUIDs.

EXTERNAL_ID

Reference identifiers from your integrated ERP system.

line_items.descriptionstring

Description of the line item.

purchase_order_numberrequiredstring

Unique reference number for the purchase order.

request_idrequiredstring

Unique identifier for this request to ensure idempotency. To prevent accidental duplication, clients should generate a random UUID.

sync_statusrequiredstring

Sync status for an accounting system.

NOT_SYNCED
SYNCED
SYNC_FAILED
vendor_idrequiredstring

Unique identifier of the vendor associated with the purchase order.

contactsobject

Purchase Order Contact Information.

contacts.billing_contactobject

Purchase Order Contact Details.

contacts.billing_contact.addressobject

Address.

contacts.billing_contact.address.citystring

City, district, suburb, or town.

contacts.billing_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.billing_contact.address.postcodestring

Postal/ZIP code.

contacts.billing_contact.address.statestring

State, province, or region.

contacts.billing_contact.address.street_addressstring

Street address line.

contacts.billing_contact.company_namestring

Name of the company.

contacts.billing_contact.contact_namestring

Name of the contact person.

contacts.billing_contact.emailstring

Email address.

contacts.billing_contact.phone_numberstring

Phone number in E.164 format.

contacts.shipping_contactobject

Purchase Order Contact Details.

contacts.shipping_contact.addressobject

Address.

contacts.shipping_contact.address.citystring

City, district, suburb, or town.

contacts.shipping_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.shipping_contact.address.postcodestring

Postal/ZIP code.

contacts.shipping_contact.address.statestring

State, province, or region.

contacts.shipping_contact.address.street_addressstring

Street address line.

contacts.shipping_contact.company_namestring

Name of the company.

contacts.shipping_contact.contact_namestring

Name of the contact person.

contacts.shipping_contact.emailstring

Email address.

contacts.shipping_contact.phone_numberstring

Phone number in E.164 format.

contacts.vendor_contactobject

Purchase Order Contact Details.

contacts.vendor_contact.addressobject

Address.

contacts.vendor_contact.address.citystring

City, district, suburb, or town.

contacts.vendor_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.vendor_contact.address.postcodestring

Postal/ZIP code.

contacts.vendor_contact.address.statestring

State, province, or region.

contacts.vendor_contact.address.street_addressstring

Street address line.

contacts.vendor_contact.company_namestring

Name of the company.

contacts.vendor_contact.contact_namestring

Name of the contact person.

contacts.vendor_contact.emailstring

Email address.

contacts.vendor_contact.phone_numberstring

Phone number in E.164 format.

descriptionstring

Description of the purchase order.

net_payment_terms_in_daysinteger

Net payment terms in days.

notestring

Note for the purchase order.

owner_emailstring

Email of the purchase order owner.

promise_datestring

Date when the vendor will deliver the goods or services. This can be either ISO8601 Date or DateTime format. Dates without time are interpreted as midnight UTC.

recurrenceobject

Defines the schedule and duration for a recurring purchase order.

recurrence.frequencyrequiredstring

Frequency for recurring purchase orders.

WEEKLY
MONTHLY
QUARTERLY
YEARLY
recurrence.iterationsrequiredinteger

Number of occurrences for recurring purchase orders.

Response body - 201 Created
approversarray

List of user emails who can approve the purchase order.

attachmentsarray

List of file attachments associated with the purchase order.

attachments.content_typestring

MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.

attachments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

attachments.file_namestring

Original filename of the uploaded attachment, including the file extension.

attachments.file_urlstring

URL to access and download the attachment file. Authentication is required.

attachments.idstring

Unique identifier of the attachment.

billed_amountstring

Total tax-exclusive amount already billed against this purchase order.

billing_currencystring

Currency of the purchase order, as an ISO 4217 currency code.

UNDEFINED
AED
AFN
ALL
AMD
ANG
AOA
ARS
AUD
AWG
AZN
BAM
BBD
BDT
BGN
BHD
BIF
BMD
BND
BOB
BOV
BRL
BSD
BTN
BWP
BYN
BYR
BZD
CAD
CDF
CHE
CHF
CHW
CLF
CLP
CNY
COP
COU
CRC
CUC
CUP
CVE
CZK
DJF
DKK
DOP
DZD
EGP
ERN
ETB
EUR
FJD
FKP
GBP
GEL
GHS
GIP
GMD
GNF
GTQ
GYD
HKD
HNL
HRK
HTG
HUF
IDR
ILS
INR
IQD
IRR
ISK
JMD
JOD
JPY
KES
KGS
KHR
KMF
KPW
KRW
KWD
KYD
KZT
LAK
LBP
LKR
LRD
LSL
LTL
LYD
MAD
MDL
MGA
MKD
MMK
MNT
MOP
MRO
MRU
MUR
MVR
MWK
MXN
MXV
MYR
MZN
NAD
NGN
NIO
NOK
NPR
NZD
OMR
PAB
PEN
PGK
PHP
PKR
PLN
PYG
QAR
RON
RSD
RUB
RUR
RWF
SAR
SBD
SCR
SDG
SEK
SGD
SHP
SLL
SOS
SRD
SSP
STD
STN
SVC
SYP
SZL
THB
TJS
TMT
TND
TOP
TRY
TTD
TWD
TZS
UAH
UGX
USD
USN
USS
UYI
UYU
UZS
VEF
VES
VND
VUV
WST
XAF
XAG
XAU
XBA
XBB
XBC
XBD
XCD
XDR
XOF
XPD
XPF
XPT
XSU
XTS
XUA
XXX
YER
ZAR
ZMW
ZWL
commentsarray

List of comments on the purchase order.

comments.contentstring

Text body of the comment.

comments.created_atstring

Timestamp for when the resource was created in ISO8601 format.

comments.created_bystring

Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.

contactsobject

Purchase Order Contact Information.

contacts.billing_contactobject

Purchase Order Contact Details.

contacts.billing_contact.addressobject

Address.

contacts.billing_contact.address.citystring

City, district, suburb, or town.

contacts.billing_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.billing_contact.address.postcodestring

Postal/ZIP code.

contacts.billing_contact.address.statestring

State, province, or region.

contacts.billing_contact.address.street_addressstring

Street address line.

contacts.billing_contact.company_namestring

Name of the company.

contacts.billing_contact.contact_namestring

Name of the contact person.

contacts.billing_contact.emailstring

Email address.

contacts.billing_contact.phone_numberstring

Phone number in E.164 format.

contacts.shipping_contactobject

Purchase Order Contact Details.

contacts.shipping_contact.addressobject

Address.

contacts.shipping_contact.address.citystring

City, district, suburb, or town.

contacts.shipping_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.shipping_contact.address.postcodestring

Postal/ZIP code.

contacts.shipping_contact.address.statestring

State, province, or region.

contacts.shipping_contact.address.street_addressstring

Street address line.

contacts.shipping_contact.company_namestring

Name of the company.

contacts.shipping_contact.contact_namestring

Name of the contact person.

contacts.shipping_contact.emailstring

Email address.

contacts.shipping_contact.phone_numberstring

Phone number in E.164 format.

contacts.vendor_contactobject

Purchase Order Contact Details.

contacts.vendor_contact.addressobject

Address.

contacts.vendor_contact.address.citystring

City, district, suburb, or town.

contacts.vendor_contact.address.country_codestring

Country code (ISO 3166-1 alpha-2).

UNDEFINED
AC
AD
AE
AF
AG
AI
AL
AM
AN
AO
AQ
AR
AS
AT
AU
AW
AX
AZ
BA
BB
BD
BE
BF
BG
BH
BI
BJ
BL
BM
BN
BO
BQ
BR
BS
BT
BU
BV
BW
BY
BZ
CA
CC
CD
CF
CG
CH
CI
CK
CL
CM
CN
CO
CP
CR
CS
CU
CV
CW
CX
CY
CZ
DE
DG
DJ
DK
DM
DO
DZ
EA
EC
EE
EG
EH
ER
ES
ET
EU
EZ
FI
FJ
FK
FM
FO
FR
FX
GA
GB
GD
GE
GF
GG
GH
GI
GL
GM
GN
GP
GQ
GR
GS
GT
GU
GW
GY
HK
HM
HN
HR
HT
HU
IC
ID
IE
IL
IM
IN
IO
IQ
IR
IS
IT
JE
JM
JO
JP
KE
KG
KH
KI
KM
KN
KP
KR
KW
KY
KZ
LA
LB
LC
LI
LK
LR
LS
LT
LU
LV
LY
MA
MC
MD
ME
MF
MG
MH
MK
ML
MM
MN
MO
MP
MQ
MR
MS
MT
MU
MV
MW
MX
MY
MZ
NA
NC
NE
NF
NG
NI
NL
NO
NP
NR
NT
NU
NZ
OM
PA
PE
PF
PG
PH
PK
PL
PM
PN
PR
PS
PT
PW
PY
QA
RE
RO
RS
RU
RW
SA
SB
SC
SD
SE
SF
SG
SH
SI
SJ
SK
SL
SM
SN
SO
SR
SS
ST
SU
SV
SX
SY
SZ
TA
TC
TD
TF
TG
TH
TJ
TK
TL
TM
TN
TO
TP
TR
TT
TV
TW
TZ
UA
UG
UK
UM
US
UY
UZ
VA
VC
VE
VG
VI
VN
VU
WF
WS
XI
XU
XK
YE
YT
YU
ZA
ZM
ZR
ZW
contacts.vendor_contact.address.postcodestring

Postal/ZIP code.

contacts.vendor_contact.address.statestring

State, province, or region.

contacts.vendor_contact.address.street_addressstring

Street address line.

contacts.vendor_contact.company_namestring

Name of the company.

contacts.vendor_contact.contact_namestring

Name of the contact person.

contacts.vendor_contact.emailstring

Email address.

contacts.vendor_contact.phone_numberstring

Phone number in E.164 format.

created_atstring

Timestamp for when the resource was created in ISO8601 format.

descriptionstring

Description of the purchase order.

external_idstring

External identifier for this purchase order in your system.

idstring

Unique identifier of the purchase order.

legal_entity_idstring

Unique identifier of the legal entity associated with the purchase order.

line_itemsarray

List of line items on the purchase order.

line_items.accounting_field_selectionsarray

List of accounting fields selected for the line item.

line_items.accounting_field_selections.typestring

Type of accounting field.

SUBSIDIARY
MERCHANT
GENERAL_LEDGER_ACCOUNT
TAX_CODE
CLASS
DEPARTMENT
LOCATION
PROJECT
OTHER
line_items.accounting_field_selections.valuestring

Name of the accounting field value in the ERP.

line_items.accounting_field_selections.external_idstring

External unique identifier of the accounting field value in the ERP.

line_items.accounting_field_selections.namestring

Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.

line_items.accounting_field_selections.value_labelstring

Name of the accounting field value displayed in Airwallex.

line_items.idstring

Unique identifier of the line item.

line_items.quantitystring

Quantity of the line item.

line_items.unit_pricestring

Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.

line_items.descriptionstring

Description of the line item.

net_payment_terms_in_daysinteger

Net payment terms in days.

notestring

Additional note or instruction for the vendor regarding this purchase order.

owner_emailstring

Email of the internal owner responsible for managing this purchase order.

promise_datestring

Expected delivery date for the goods or services, in ISO8601 format.

purchase_order_numberstring

Unique reference number for this purchase order.

recurrenceobject

Defines the schedule and duration for a recurring purchase order.

recurrence.frequencystring

Frequency for recurring purchase orders.

WEEKLY
MONTHLY
QUARTERLY
YEARLY
recurrence.iterationsinteger

Number of occurrences for recurring purchase orders.

recurring_amountstring

Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.

statusstring

Purchase order status.

OPEN
COMPLETED
ARCHIVED
CLOSED
sync_error_messagestring

Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.

sync_statusstring

Sync status for an accounting system.

NOT_SYNCED
SYNCED
SYNC_FAILED
total_amountstring

Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.

updated_atstring

Timestamp for when the resource was updated in ISO8601 format.

vendor_idstring

Unique identifier of the vendor associated with the purchase order.

Errors
Error statusDescription
400

Invalid Request.

404

Not found.

500

Internal server error.

POST /api/v1/spend/purchase_orders/create
$curl --request POST \
> --url 'https://api.sandbox.airwallex.com/api/v1/spend/purchase_orders/create' \
> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \
> --header 'Content-Type: application/json' \
> --data '{
> "request_id": "985461d5-016f-4e1f-a387-5f1380b42d92",
> "external_id": "PO-EXT-001",
> "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
> "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
> "purchase_order_number": "PO-0001",
> "sync_status": "SYNCED",
> "billing_currency": "USD",
> "owner_email": "[email protected]",
> "recurrence": {
> "frequency": "MONTHLY",
> "iterations": 12
> },
> "line_items": [
> {
> "description": "Office supplies",
> "quantity": "10",
> "unit_price": "500.0",
> "accounting_field_selections": [
> {
> "identifier_type": "EXTERNAL_ID",
> "field_id": "Chart of accounts",
> "field_value_id": "EXT-SALES-003"
> }
> ]
> }
> ],
> "description": "This is a description of the purchase order.",
> "note": "Please deliver between 9AM-5PM",
> "net_payment_terms_in_days": 30,
> "promise_date": "2025-01-10",
> "contacts": {
> "vendor_contact": {
> "contact_name": "John Doe",
> "company_name": "Airwallex Pty Ltd",
> "email": "[email protected]",
> "phone_number": "+61499999999",
> "address": {
> "street_address": "123 Main Street",
> "city": "San Francisco",
> "state": "California",
> "postcode": "94105",
> "country_code": "US"
> }
> },
> "shipping_contact": {
> "contact_name": "John Doe",
> "company_name": "Airwallex Pty Ltd",
> "email": "[email protected]",
> "phone_number": "+61499999999",
> "address": {
> "street_address": "123 Main Street",
> "city": "San Francisco",
> "state": "California",
> "postcode": "94105",
> "country_code": "US"
> }
> },
> "billing_contact": {
> "contact_name": "John Doe",
> "company_name": "Airwallex Pty Ltd",
> "email": "[email protected]",
> "phone_number": "+61499999999",
> "address": {
> "street_address": "123 Main Street",
> "city": "San Francisco",
> "state": "California",
> "postcode": "94105",
> "country_code": "US"
> }
> }
> }
>}'
Response (201 Created)
1{
2 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
3 "legal_entity_id": "le_U3jlHqQRNHWn2zAKeeT8sg",
4 "vendor_id": "ba46f0ff-8081-4db6-8333-4e011fe9561d",
5 "billing_currency": "USD",
6 "recurring_amount": "5000.0",
7 "total_amount": "60000.0",
8 "billed_amount": "3000.0",
9 "purchase_order_number": "PO-0001",
10 "external_id": "PO-EXT-001",
11 "status": "OPEN",
12 "sync_status": "SYNCED",
13 "sync_error_message": "Failed to sync purchase order: this purchase order number already exists.",
14 "recurrence": {
15 "frequency": "MONTHLY",
16 "iterations": 12
17 },
18 "description": "Annual software license renewal for Q1 2025.",
19 "note": "Please deliver between 9AM-5PM",
20 "net_payment_terms_in_days": 30,
21 "promise_date": "2025-01-10",
22 "approvers": [
25 ],
26 "owner_email": "[email protected]",
27 "contacts": {
28 "vendor_contact": {
29 "contact_name": "John Doe",
30 "company_name": "Airwallex Pty Ltd",
31 "email": "[email protected]",
32 "phone_number": "+61499999999",
33 "address": {
34 "street_address": "123 Main Street",
35 "city": "San Francisco",
36 "state": "California",
37 "postcode": "94105",
38 "country_code": "US"
39 }
40 },
41 "shipping_contact": {
42 "contact_name": "John Doe",
43 "company_name": "Airwallex Pty Ltd",
44 "email": "[email protected]",
45 "phone_number": "+61499999999",
46 "address": {
47 "street_address": "123 Main Street",
48 "city": "San Francisco",
49 "state": "California",
50 "postcode": "94105",
51 "country_code": "US"
52 }
53 },
54 "billing_contact": {
55 "contact_name": "John Doe",
56 "company_name": "Airwallex Pty Ltd",
57 "email": "[email protected]",
58 "phone_number": "+61499999999",
59 "address": {
60 "street_address": "123 Main Street",
61 "city": "San Francisco",
62 "state": "California",
63 "postcode": "94105",
64 "country_code": "US"
65 }
66 }
67 },
68 "attachments": [
69 {
70 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
71 "content_type": "image/jpeg",
72 "file_name": "flight_receipt.jpg",
73 "file_url": "https://www.airwallex.com/flight_receipt.jpg",
74 "created_at": "2025-02-02T00:00:00Z"
75 }
76 ],
77 "line_items": [
78 {
79 "id": "985461d5-016f-4e1f-a387-5f1380b42d92",
80 "description": "Office supplies",
81 "quantity": "10",
82 "unit_price": "500.0",
83 "accounting_field_selections": [
84 {
85 "type": "OTHER",
86 "name": "Cost Center",
87 "external_id": "1036f6f7-87e4-4508-b865-f670b1926022",
88 "value": "Office Expense",
89 "value_label": "Office Expense"
90 }
91 ]
92 }
93 ],
94 "comments": [
95 {
96 "content": "Expense approved - valid business purpose confirmed",
97 "created_by": "[email protected]",
98 "created_at": "2025-01-01T00:00:00Z"
99 }
100 ],
101 "created_at": "2025-01-01T00:00:00Z",
102 "updated_at": "2025-02-02T00:00:00Z"
103}
Was this section helpful?