Allows you to retrieve purchase orders
GET {{baseUrl}}/PurchaseOrders?Status=<string>&DateFrom=<string>&DateTo=<string>&order=<string>&page=<integer>
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
Status | string | Filter by purchase order status | |
DateFrom | string | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 | |
DateTo | string | Filter by purchase order date (e.g. GET https://.../PurchaseOrders?DateFrom=2015-12-01&DateTo=2015-12-31 | |
order | string | Order by an any element | |
page | string | To specify a page, append the page parameter to the URL e.g. ?page=1. If there are 100 records in the response you will need to check if there is any more data by fetching the next page e.g ?page=2 and continuing this process until no more results are returned. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
If-Modified-Since | string | Only records created or modified since this timestamp will be returned | |
xero-tenant-id | string | (Required) Xero identifier for Tenant |
RESPONSES
status: OK
{"Id":"66910bfc-15cc-4692-bd4c-cc8f671e653c","Status":"OK","ProviderName":"Provider Name Example","DateTimeUTC":"/Date(1552523977238)/","PurchaseOrders":[{"PurchaseOrderID":"f9627f0d-b715-4039-bb6a-96dc3eae5ec5","PurchaseOrderNumber":"PO-0001","DateString":"2019-03-12T00:00:00","Date":"/Date(1552348800000+0000)/","AttentionTo":"Jimmy","HasErrors":false,"IsDiscounted":false,"Type":"PURCHASEORDER","CurrencyRate":1.0,"CurrencyCode":"NZD","Contact":{"ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8","ContactStatus":"ACTIVE","Name":"Liam Gallagher","FirstName":"Liam","LastName":"Gallagher","Addresses":[{"AddressType":"POBOX","City":"Anytown","Region":"NY","PostalCode":"10101","Country":"USA","AttentionTo":""}],"Phones":[{"PhoneType":"DEFAULT","PhoneNumber":"222-2222","PhoneAreaCode":"212","PhoneCountryCode":""},{"PhoneType":"FAX","PhoneNumber":"333-2233","PhoneAreaCode":"212","PhoneCountryCode":""},{"PhoneType":"MOBILE","PhoneNumber":"444-3433","PhoneAreaCode":"212","PhoneCountryCode":""}],"UpdatedDateUTC":"/Date(1551747281053+0000)/","ContactGroups":[],"ContactPersons":[],"HasValidationErrors":false},"Status":"DELETED","LineAmountTypes":"Exclusive","LineItems":[{"Description":"Foobar","UnitAmount":20.0,"TaxAmount":0.0,"LineAmount":20.0,"Tracking":[],"Quantity":1.0,"LineItemID":"0f7b54b8-bfa4-4c5d-9c22-73dbd5796e54"}],"SubTotal":20.0,"TotalTax":0.0,"Total":20.0,"UpdatedDateUTC":"/Date(1552522703443+0000)/","HasAttachments":false},{"PurchaseOrderID":"6afa2e02-c514-4964-ab89-b5c0179b8c50","PurchaseOrderNumber":"PO-0002","DateString":"2019-03-12T00:00:00","Date":"/Date(1552348800000+0000)/","AttentionTo":"Jimmy","HasErrors":false,"IsDiscounted":false,"Type":"PURCHASEORDER","CurrencyRate":1.0,"CurrencyCode":"NZD","Contact":{"ContactID":"430fa14a-f945-44d3-9f97-5df5e28441b8","ContactStatus":"ACTIVE","Name":"Liam Gallagher","FirstName":"Liam","LastName":"Gallagher","Addresses":[{"AddressType":"POBOX","City":"Anytown","Region":"NY","PostalCode":"10101","Country":"USA","AttentionTo":""}],"Phones":[{"PhoneType":"DEFAULT","PhoneNumber":"222-2222","PhoneAreaCode":"212","PhoneCountryCode":""},{"PhoneType":"FAX","PhoneNumber":"333-2233","PhoneAreaCode":"212","PhoneCountryCode":""},{"PhoneType":"MOBILE","PhoneNumber":"444-3433","PhoneAreaCode":"212","PhoneCountryCode":""}],"UpdatedDateUTC":"/Date(1551747281053+0000)/","ContactGroups":[],"ContactPersons":[],"HasValidationErrors":false},"Status":"DELETED","LineAmountTypes":"Exclusive","LineItems":[{"Description":"Foobar","UnitAmount":20.0,"TaxAmount":0.0,"LineAmount":20.0,"Tracking":[],"Quantity":1.0,"LineItemID":"3e4ec232-32b9-491b-84dd-48fb9aa8916f"}],"SubTotal":20.0,"TotalTax":0.0,"Total":20.0,"UpdatedDateUTC":"/Date(1552522834733+0000)/","HasAttachments":false}]}