API Documentation
Purchase Orders ¶
Purchase Orders ¶
In Productive purchase orders are documents that serve as a buyer’s request to a seller to order goods or services. You can find out more about purchase orders in our Help documentation: Purchase Orders
Purchase Orders always belong to a budget and a vendor (seller). They can have multiple expenses, bills and bill items.
Following diagram shows services in our data hierarchy:
The enumeration status_id can be:
-
1 (Draft)
-
2 (Finalized)
The enumeration payment_status_id can be:
-
1 (Not received)
-
2 (Partially received)
-
3 (Fully received)
Supported filter params
-
deal_id (array)
-
vendor_id (array)
-
id
-
deal_id
-
vendor_id
-
status_id
-
issued_on
-
delivery_on
-
sent_on
-
received_on
-
created_at
-
total_cost
-
total_cost_with_tax
-
total_received
Supported sort params
-
deal_id
-
vendor_id
-
deal_id
-
vendor_id
-
status_id
-
issued_on
-
delivery_on
-
sent_on
-
received_on
-
created_at
-
total_cost
-
total_cost_with_tax
-
total_received
GET /api/v2/purchase_orders/22
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "22",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:49.033+01:00",
"number": "1",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "4851d36a8731bf7240b65a92870b8d46",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1075"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Gets a purchase orderGET/api/v2/purchase_orders/{id}
- id
number(required) Example: 1purchase order id
POST /api/v2/purchase_orders
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_orders",
"attributes": {
"currency": "EUR",
"issued_on": "2026-01-15"
},
"relationships": {
"deal": {
"data": {
"type": "quotes",
"id": "729"
}
},
"vendor": {
"data": {
"type": "clients",
"id": "2701"
}
}
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "24",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:49.161+01:00",
"number": "2",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "0f84887fb7081f81149887230fa1e554",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1076"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/purchase_orders
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_orders",
"attributes": {
"currency": "EUR",
"issued_on": "2026-01-15"
},
"relationships": {
"deal": {
"data": {
"type": "quotes",
"id": "0"
}
},
"vendor": {
"data": {
"type": "clients",
"id": "2704"
}
}
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "attribute is invalid",
"source": {
"pointer": "data/attributes/deal"
}
}
]
}Create a purchase orderPOST/api/v2/purchase_orders
PATCH /api/v2/purchase_orders/28
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_orders",
"attributes": {
"currency": "EUR",
"issued_on": "2026-01-15"
},
"relationships": {
"deal": {
"data": {
"type": "quotes",
"id": "734"
}
},
"vendor": {
"data": {
"type": "clients",
"id": "2716"
}
},
"subscribers": {
"data": [
{
"type": "people",
"id": "3793"
},
{
"type": "people",
"id": "3794"
}
]
}
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "28",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:49.635+01:00",
"number": "1",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "4519d335c14b82f60a0f2296c97b27ed",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1080"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/purchase_orders/29
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_order",
"attributes": {
"currency": "EUR",
"issued_on": "2026-01-15"
},
"relationships": {
"deal": {
"data": {
"type": "quotes",
"id": "0"
}
}
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "attribute is invalid",
"source": {
"pointer": "data/attributes/deal"
}
}
]
}PATCH /api/v2/purchase_orders/30
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_order",
"attributes": {},
"relationships": {
"deal": {
"vendor": {
"type": "clients",
"id": "0"
}
}
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/deal"
}
}
]
}Update a purchase orderPATCH/api/v2/purchase_orders/{id}
- id
number(required) Example: 1purchase order id
DELETE /api/v2/purchase_orders/31
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonDeletes a purchase orderDELETE/api/v2/purchase_orders/{id}
- id
number(required) Example: 1purchase order id
POST /api/v2/purchase_orders/copy
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_order",
"attributes": {
"template_id": 32,
"deal_id": 738
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "33",
"type": "purchase_orders",
"attributes": {
"subject": "template",
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:50.268+01:00",
"number": "2",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "0f0677861fd53a4a5032c0f56d56210a",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1084"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/purchase_orders/copy
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_order",
"attributes": {
"template_id": 34,
"deal_id": 740
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "35",
"type": "purchase_orders",
"attributes": {
"subject": "template",
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:50.444+01:00",
"number": "2",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "b45bfabb84d7a0a8864fde304deb024b",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1085"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}POST /api/v2/purchase_orders/copy
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_order",
"attributes": {
"template_id": 36,
"deal_id": 742
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "37",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:50.744+01:00",
"number": "2",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "59c768e1a380362c67ee0042850dfeba",
"payment_status_id": 1,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 10000,
"total_cost_default": 12500,
"total_cost_normalized": 10000,
"total_cost_with_tax": 10000,
"total_cost_with_tax_default": 12500,
"total_cost_with_tax_normalized": 10000,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1086"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Copies a purchase orderPOST/api/v2/purchase_orders/copy
- id
number(required) Example: 1purchase order id
PATCH /api/v2/purchase_orders/38/send
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_orders",
"attributes": {
"to": [
"test@email.com"
],
"cc": [
"test@productive.io",
"test-2@productive.io"
],
"bcc": [
"mail@something.com"
],
"subject": "Mail title",
"body": "Lorem ipsum dolor si amet"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "38",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": "2026-01-15",
"received_on": null,
"created_at": "2026-01-15T05:07:50.894+01:00",
"number": "1",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "f4cd2a9ff1e1bb2cf847beb7a9c80821",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1087"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/purchase_orders/42/send
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_orders",
"attributes": {
"to": [
"invalid mail"
]
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"errors": [
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "invalid mail is not an email",
"source": {
"pointer": "data/attributes/to"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/subject"
}
},
{
"status": "422",
"code": "invalid_attribute",
"title": "Invalid Attribute",
"detail": "can't be blank",
"source": {
"pointer": "data/attributes/body"
}
}
]
}PATCH /api/v2/purchase_orders/43/send
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"type": "purchase_orders",
"attributes": {
"to": [
"test@email.com"
],
"cc": [
"test@productive.io",
"test-2@productive.io"
],
"bcc": [
"mail@something.com"
],
"subject": "Mail title",
"body": "Lorem ipsum dolor si amet"
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "43",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": null,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": "2026-01-15",
"received_on": null,
"created_at": "2026-01-15T05:07:52.259+01:00",
"number": "1",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "c1aa948839ab25c4ebfb9803d31f0dcb",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": false,
"exported_at": null,
"export_integration_type_id": null,
"export_id": null,
"export_url": null,
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1092"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Sends a purchase orderPATCH/api/v2/purchase_orders/{id}/send
- id
number(required) Example: 1purchase order id
PATCH /api/v2/purchase_orders/47/export
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"id": 47,
"type": "purchase_orders",
"attributes": {
"company_reference_id": "1234",
"xero_status_id": 3
}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "47",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": 2,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:53.598+01:00",
"number": "XERO-123",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "46e8290282b399b7ca42c45fe0306ddf",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": true,
"exported_at": "2026-01-15T05:07:53.000+01:00",
"export_integration_type_id": 3,
"export_id": "test-id",
"export_url": "https://go.xero.com/Accounts/Payable/PurchaseOrders/View/test-id",
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1096"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}PATCH /api/v2/purchase_orders/48/export
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonBody
{
"data": {
"id": 48,
"type": "purchase_orders",
"attributes": {}
}
}Headers
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "48",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": 2,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:53.736+01:00",
"number": "XERO-123",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "0caae17ff44f45febf1fc2d286b8e66b",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": true,
"exported_at": "2026-01-15T05:07:53.000+01:00",
"export_integration_type_id": 3,
"export_id": "test-id",
"export_url": "https://go.xero.com/Accounts/Payable/PurchaseOrders/View/test-id",
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1097"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Exports a purchase orderPATCH/api/v2/purchase_orders/{id}/export
- id
number(required) Example: 1purchase order id
- company_reference_id
string(optional) Example: 123company reference id
PATCH /api/v2/purchase_orders/49/export_update
Headers
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Content-Type: application/vnd.api+jsonHeaders
Content-Type: application/vnd.api+json; charset=utf-8Body
{
"data": {
"id": "49",
"type": "purchase_orders",
"attributes": {
"subject": null,
"status_id": 2,
"issued_on": "2026-01-15",
"delivery_on": null,
"sent_on": null,
"received_on": null,
"created_at": "2026-01-15T05:07:53.869+01:00",
"number": "XERO-123",
"note": null,
"footer": null,
"note_interpolated": null,
"footer_interpolated": null,
"email_key": "db79d45de0f530249f7e06e1c94127b2",
"payment_status_id": 3,
"exchange_rate": "1.25",
"exchange_date": "2026-01-15",
"exported": true,
"exported_at": "2026-01-15T05:07:53.000+01:00",
"export_integration_type_id": 3,
"export_id": "test-id",
"export_url": "https://go.xero.com/Accounts/Payable/PurchaseOrders/View/test-id",
"currency": "EUR",
"currency_default": "USD",
"currency_normalized": "EUR",
"total_cost": 0,
"total_cost_default": 0,
"total_cost_normalized": 0,
"total_cost_with_tax": 0,
"total_cost_with_tax_default": 0,
"total_cost_with_tax_normalized": 0,
"total_received": 0,
"total_received_default": 0,
"total_received_normalized": 0
},
"relationships": {
"organization": {
"data": {
"type": "organizations",
"id": "1098"
}
},
"vendor": {
"meta": {
"included": false
}
},
"deal": {
"meta": {
"included": false
}
},
"creator": {
"meta": {
"included": false
}
},
"document_type": {
"meta": {
"included": false
}
},
"attachment": {
"meta": {
"included": false
}
},
"bill_to": {
"meta": {
"included": false
}
},
"bill_from": {
"meta": {
"included": false
}
}
}
},
"meta": {}
}Updates exported purchase orderPATCH/api/v2/purchase_orders/{id}/export_update
- id
number(required) Example: 1purchase order id
- company_reference_id
string(optional) Example: 123company reference id
Generated by aglio on 15 Jan 2026