Purchase OrdersBeta
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.
GET /api/v1/spend/purchase_ordersGET /api/v1/spend/purchase_orders/{id}POST /api/v1/spend/purchase_orders/{id}/syncPOST /api/v1/spend/purchase_orders/create
List purchase orders
GET /api/v1/spend/purchase_orders
Returns a list of purchase orders filtered by the specified query parameters.
Filter by purchase order external unique identifier.
Filter by purchase orders created after this timestamp (inclusive) in ISO8601 format. If not specified, defaults to last 30 days from to_created_at.
Filter by purchase orders updated after this timestamp (inclusive) in ISO8601 format.
Filter by legal entity unique identifier.
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.
Filter by purchase order status. Possible values are OPEN, COMPLETED, ARCHIVED, CLOSED.
Filter by sync status. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.
Filter by purchase orders created before this timestamp (exclusive) in ISO8601 format. If not specified, defaults to now.
Filter by purchase orders updated before this timestamp (exclusive) in ISO8601 format.
List of items returned.
List of user emails who can approve the purchase order.
List of file attachments associated with the purchase order.
MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.
Timestamp for when the resource was created in ISO8601 format.
Original filename of the uploaded attachment, including the file extension.
URL to access and download the attachment file. Authentication is required.
Unique identifier of the attachment.
Total tax-exclusive amount already billed against this purchase order.
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
List of comments on the purchase order.
Text body of the comment.
Timestamp for when the resource was created in ISO8601 format.
Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.
Timestamp for when the resource was created in ISO8601 format.
Unique identifier of the purchase order.
Unique identifier of the legal entity associated with the purchase order.
List of line items on the purchase order.
List of accounting fields selected for the line item.
Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.
Name of the accounting field value in the ERP.
External unique identifier of the accounting field value in the ERP.
Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.
Name of the accounting field value displayed in Airwallex.
Unique identifier of the line item.
Quantity of the line item.
Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.
Description of the line item.
Unique reference number for this purchase order.
Purchase order status. Possible values are OPEN, COMPLETED, ARCHIVED, CLOSED.
Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.
Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.
Timestamp for when the resource was updated in ISO8601 format.
Unique identifier of the vendor associated with the purchase order.
Purchase Order Contact Information.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Description of the purchase order.
External identifier for this purchase order in your system.
Net payment terms in days.
Additional note or instruction for the vendor regarding this purchase order.
Email of the internal owner responsible for managing this purchase order.
Expected delivery date for the goods or services, in ISO8601 format.
Defines the schedule and duration for a recurring purchase order.
Frequency for recurring purchase orders. Possible values are WEEKLY, MONTHLY, QUARTERLY, YEARLY.
Number of occurrences for recurring purchase orders.
Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.
Error message describing the sync failure reason, populated when the sync status is updated via the API. Null when no sync error has occurred.
A pointer to the end of the page list used in pagination to retrieve the next page of results.
A pointer to the start of the page list use in pagination to retrieve the previous page of results.
| Error status | Description |
|---|---|
| 400 | Invalid Request. |
| 404 | Not found. |
| 500 | Internal server error. |
$curl --request GET \> --url 'https://api.airwallex.com/api/v1/spend/purchase_orders' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
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": 1219 },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": [25 "[email protected]",26 "[email protected]"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}
Get purchase order
GET /api/v1/spend/purchase_orders/{id}
Retrieves the details of an existing purchase order.
Unique identifier of the purchase order.
List of user emails who can approve the purchase order.
List of file attachments associated with the purchase order.
MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.
Timestamp for when the resource was created in ISO8601 format.
Original filename of the uploaded attachment, including the file extension.
URL to access and download the attachment file. Authentication is required.
Unique identifier of the attachment.
Total tax-exclusive amount already billed against this purchase order.
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
List of comments on the purchase order.
Text body of the comment.
Timestamp for when the resource was created in ISO8601 format.
Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.
Purchase Order Contact Information.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Timestamp for when the resource was created in ISO8601 format.
Description of the purchase order.
External identifier for this purchase order in your system.
Unique identifier of the purchase order.
Unique identifier of the legal entity associated with the purchase order.
List of line items on the purchase order.
List of accounting fields selected for the line item.
Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.
Name of the accounting field value in the ERP.
External unique identifier of the accounting field value in the ERP.
Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.
Name of the accounting field value displayed in Airwallex.
Unique identifier of the line item.
Quantity of the line item.
Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.
Description of the line item.
Net payment terms in days.
Additional note or instruction for the vendor regarding this purchase order.
Email of the internal owner responsible for managing this purchase order.
Expected delivery date for the goods or services, in ISO8601 format.
Unique reference number for this purchase order.
Defines the schedule and duration for a recurring purchase order.
Frequency for recurring purchase orders. Possible values are WEEKLY, MONTHLY, QUARTERLY, YEARLY.
Number of occurrences for recurring purchase orders.
Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.
Purchase order status. Possible values are OPEN, COMPLETED, ARCHIVED, CLOSED.
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 status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.
Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.
Timestamp for when the resource was updated in ISO8601 format.
Unique identifier of the vendor associated with the purchase order.
| Error status | Description |
|---|---|
| 400 | Invalid Request. |
| 404 | Not found. |
| 500 | Internal server error. |
$curl --request GET \> --url 'https://api.airwallex.com/api/v1/spend/purchase_orders/purchase_order_id' \> --header 'Authorization: Bearer {{ACCESS_TOKEN}}' \> --header 'Content-Type: application/json'
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": 1217 },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": [23 "[email protected]",24 "[email protected]"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}
Update purchase order sync status
POST /api/v1/spend/purchase_orders/{id}/sync
Updates the sync status of a purchase order.
Unique identifier for the purchase order.
Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.
Error message for sync failures. Only applicable when sync_status is SYNC_FAILED.
List of user emails who can approve the purchase order.
List of file attachments associated with the purchase order.
MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.
Timestamp for when the resource was created in ISO8601 format.
Original filename of the uploaded attachment, including the file extension.
URL to access and download the attachment file. Authentication is required.
Unique identifier of the attachment.
Total tax-exclusive amount already billed against this purchase order.
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
List of comments on the purchase order.
Text body of the comment.
Timestamp for when the resource was created in ISO8601 format.
Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.
Purchase Order Contact Information.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Timestamp for when the resource was created in ISO8601 format.
Description of the purchase order.
External identifier for this purchase order in your system.
Unique identifier of the purchase order.
Unique identifier of the legal entity associated with the purchase order.
List of line items on the purchase order.
List of accounting fields selected for the line item.
Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.
Name of the accounting field value in the ERP.
External unique identifier of the accounting field value in the ERP.
Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.
Name of the accounting field value displayed in Airwallex.
Unique identifier of the line item.
Quantity of the line item.
Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.
Description of the line item.
Net payment terms in days.
Additional note or instruction for the vendor regarding this purchase order.
Email of the internal owner responsible for managing this purchase order.
Expected delivery date for the goods or services, in ISO8601 format.
Unique reference number for this purchase order.
Defines the schedule and duration for a recurring purchase order.
Frequency for recurring purchase orders. Possible values are WEEKLY, MONTHLY, QUARTERLY, YEARLY.
Number of occurrences for recurring purchase orders.
Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.
Purchase order status. Possible values are OPEN, COMPLETED, ARCHIVED, CLOSED.
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 status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.
Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.
Timestamp for when the resource was updated in ISO8601 format.
Unique identifier of the vendor associated with the purchase order.
| Error status | Description |
|---|---|
| 400 | Invalid Request. |
| 404 | Not found. |
| 500 | Internal server error. |
$curl --request POST \> --url 'https://api.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.">}'
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": 1217 },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": [23 "[email protected]",24 "[email protected]"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}
Create purchase order
POST /api/v1/spend/purchase_orders/create
Creates a new purchase order.
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 identifier for this purchase order in your system.
Unique identifier of the legal entity associated with the purchase order.
List of line items in the purchase order.
Unit quantity of the line item.
Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.
List of accounting fields selected for the line item.
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.
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.
Type of identifier used for accounting field references. Choose AIRWALLEX_ID to reference internal Airwallex UUIDs, or EXTERNAL_ID to reference identifiers from your integrated ERP system.
Description of the line item.
Unique reference number for the purchase order.
Unique identifier for this request to ensure idempotency. To prevent accidental duplication, clients should generate a random UUID.
Sync status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.
Unique identifier of the vendor associated with the purchase order.
Purchase Order Contact Information.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Description of the purchase order.
Net payment terms in days.
Note for the purchase order.
Email of the purchase order owner.
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.
Defines the schedule and duration for a recurring purchase order.
Frequency for recurring purchase orders. Possible values are WEEKLY, MONTHLY, QUARTERLY, YEARLY.
Number of occurrences for recurring purchase orders.
List of user emails who can approve the purchase order.
List of file attachments associated with the purchase order.
MIME type of the attached file. Common types include image/jpeg, image/png, and application/pdf.
Timestamp for when the resource was created in ISO8601 format.
Original filename of the uploaded attachment, including the file extension.
URL to access and download the attachment file. Authentication is required.
Unique identifier of the attachment.
Total tax-exclusive amount already billed against this purchase order.
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
List of comments on the purchase order.
Text body of the comment.
Timestamp for when the resource was created in ISO8601 format.
Email address of the user who created this comment. Used for attribution, notifications, and audit trail tracking.
Purchase Order Contact Information.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Purchase Order Contact Details.
Address.
City, district, suburb, or town.
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
Postal/ZIP code.
State, province, or region.
Street address line.
Name of the company.
Name of the contact person.
Email address.
Phone number in E.164 format.
Timestamp for when the resource was created in ISO8601 format.
Description of the purchase order.
External identifier for this purchase order in your system.
Unique identifier of the purchase order.
Unique identifier of the legal entity associated with the purchase order.
List of line items on the purchase order.
List of accounting fields selected for the line item.
Type of accounting field. Possible values are SUBSIDIARY, MERCHANT, GENERAL_LEDGER_ACCOUNT, TAX_CODE, CLASS, DEPARTMENT, LOCATION, PROJECT, OTHER.
Name of the accounting field value in the ERP.
External unique identifier of the accounting field value in the ERP.
Name of the accounting field in the ERP software. This field is populated only when type is set to OTHER.
Name of the accounting field value displayed in Airwallex.
Unique identifier of the line item.
Quantity of the line item.
Unit price of the line item (tax-exclusive). Tax is applied separately based on the selected tax rate.
Description of the line item.
Net payment terms in days.
Additional note or instruction for the vendor regarding this purchase order.
Email of the internal owner responsible for managing this purchase order.
Expected delivery date for the goods or services, in ISO8601 format.
Unique reference number for this purchase order.
Defines the schedule and duration for a recurring purchase order.
Frequency for recurring purchase orders. Possible values are WEEKLY, MONTHLY, QUARTERLY, YEARLY.
Number of occurrences for recurring purchase orders.
Tax-exclusive amount per occurrence for recurring purchase orders. This field is null for one-time purchase orders.
Purchase order status. Possible values are OPEN, COMPLETED, ARCHIVED, CLOSED.
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 status for an accounting system. Possible values are NOT_SYNCED, SYNCED, SYNC_FAILED.
Total tax-exclusive amount of this purchase order. For recurring purchase orders, this is the cumulative amount across all occurrences.
Timestamp for when the resource was updated in ISO8601 format.
Unique identifier of the vendor associated with the purchase order.
| Error status | Description |
|---|---|
| 400 | Invalid Request. |
| 404 | Not found. |
| 500 | Internal server error. |
$curl --request POST \> --url 'https://api.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"> }> }> }>}'
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": 1217 },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": [23 "[email protected]",24 "[email protected]"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}