For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
Get startedAPI referenceImplementation
Get startedAPI referenceImplementation
    • Overview
          • The PurchaseOrder object
          • GET/purchase-orders
          • POST/purchase-orders
          • GET/purchase-orders/{id}
          • GET/purchase-orders/line-items/remote-field-classes
          • GET/purchase-orders/meta/post
          • GET/purchase-orders/remote-field-classes
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsPurchase Orders

/purchase-orders/{id}

GET
/accounting/v1/purchase-orders/:id
GET
/api/accounting/v1/purchase-orders/:id
$curl -G https://api.merge.dev/api/accounting/v1/purchase-orders/id \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> --data-urlencode expand=line_items,tracking_categories,delivery_address,vendor,company,accounting_period,payment_term \
> -d remote_fields=status \
> -d show_enum_origins=status
200Retrieved
1{
2 "id": "0048ea5b-911e-4dff-9364-92070dea62ff",
3 "remote_id": "239741",
4 "created_at": "2021-09-15T00:00:00Z",
5 "modified_at": "2021-10-16T00:00:00Z",
6 "status": "SUBMITTED",
7 "issue_date": "2020-03-31T00:00:00Z",
8 "purchase_order_number": "PO1234",
9 "delivery_date": "2020-04-15T00:00:00Z",
10 "delivery_address": {
11 "street_1": "2920 Broadway",
12 "street_2": "2nd Floor",
13 "city": "New York",
14 "state": "NY",
15 "country": "US",
16 "zip_code": "10027"
17 },
18 "customer": "3e442c5d-8f51-4103-b5c9-dcee39c30a08",
19 "vendor": "2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b",
20 "memo": "private note",
21 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
22 "total_amount": 260,
23 "currency": "USD",
24 "exchange_rate": "2.9",
25 "payment_term": "89d329de-825f-4ac6-8369-3c58b4e68bee",
26 "line_items": [
27 {
28 "remote_id": "121222",
29 "description": "Pickleball paddles",
30 "unit_price": 25,
31 "quantity": 10,
32 "item": "0958cbc6-6040-430a-848e-aafacbadf4ae",
33 "tracking_categories": [
34 "f1214c24-2702-4617-b74b-3ddecfc0d384",
35 "9b840d2-686a-465a-8a8e-7b028498f8e4",
36 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
37 ],
38 "tax_amount": "10",
39 "total_line_amount": "260",
40 "currency": "USD",
41 "tax_rate": "a12e7c20-1922-9df7-s75n-edfeewnn7384",
42 "exchange_rate": "2.9",
43 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
44 "remote_was_deleted": false
45 },
46 {
47 "description": "Pickleball Balls",
48 "unit_price": 1,
49 "quantity": 10,
50 "item": "249c9faa-3045-4a31-953b-8f22d3613301",
51 "tracking_categories": [
52 "f1214c24-2702-4617-b74b-3ddecfc0d384",
53 "9b840d2-686a-465a-8a8e-7b028498f8e4",
54 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
55 ],
56 "tax_amount": "10",
57 "total_line_amount": "20"
58 }
59 ],
60 "inclusive_of_tax": true,
61 "tracking_categories": [
62 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
63 "9b840d2-686a-465a-8a8e-7b028498f8e4",
64 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
65 ],
66 "accounting_period": "2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b",
67 "remote_created_at": "2020-03-31T00:00:00Z",
68 "remote_updated_at": "2020-03-31T00:00:00Z",
69 "remote_was_deleted": true,
70 "field_mappings": {
71 "organization_defined_targets": {
72 "custom_key": "custom_value"
73 },
74 "linked_account_defined_targets": {
75 "custom_key": "custom_value"
76 }
77 },
78 "remote_data": [
79 {
80 "path": "/actions",
81 "data": null
82 }
83 ],
84 "remote_fields": [
85 {
86 "remote_field_class": {
87 "id": "string",
88 "display_name": "string",
89 "remote_key_name": "string",
90 "description": "string",
91 "is_custom": true,
92 "is_common_model_field": true,
93 "is_required": true,
94 "field_type": "string",
95 "field_format": "string",
96 "field_choices": [
97 "string"
98 ],
99 "item_schema": {
100 "item_type": "string",
101 "item_format": "string",
102 "item_choices": [
103 "string"
104 ]
105 }
106 },
107 "value": "string"
108 }
109 ]
110}

Returns a PurchaseOrder object with the given id.

Field support by integration

See all supported fields

Use the /linked-accounts endpoint to pull platform support information

Was this page helpful?
Previous

/purchase-orders

Next

/purchase-orders/line-items/remote-field-classes

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Path parameters

idstringRequiredformat: "uuid"

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

expandenumOptional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_remote_databooleanOptional

Whether to include the original data Merge fetched from the third-party to produce these models.

include_remote_fieldsbooleanOptional
Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.
include_shell_databooleanOptional

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

remote_fieldsenumOptional

Deprecated. Use show_enum_origins.

Allowed values:
show_enum_originsenumOptional
A comma separated list of enum field names for which you'd like the original values to be returned, instead of Merge's normalized enum values. [Learn more](https://help.merge.dev/en/articles/8950958-show_enum_origins-query-parameter)
Allowed values:

Response

idstringRead-onlyformat: "uuid"
remote_idstring or null

The third-party API ID of the matching object.

created_atdatetimeRead-only
The datetime that this object was created by Merge.
modified_atdatetimeRead-only
The datetime that this object was modified by Merge.
statusenum or null

The purchase order’s status.

  • DRAFT - DRAFT
  • SUBMITTED - SUBMITTED
  • AUTHORIZED - AUTHORIZED
  • BILLED - BILLED
  • DELETED - DELETED
Allowed values:
issue_datedatetime or null
The purchase order's issue date.
purchase_order_numberstring or null<=100 characters

The human-readable number of the purchase order.

delivery_datedatetime or null
The purchase order's delivery date.
delivery_addressstring or nullformat: "uuid"
The purchase order's delivery address.
customerstring or nullformat: "uuid"
The contact making the purchase order.
vendorstring or nullformat: "uuid"
The party fulfilling the purchase order.
memostring or null
A memo attached to the purchase order.
companystring or nullformat: "uuid"
The company the purchase order belongs to.
total_amountdouble or null
The purchase order's total amount.
currencyenum or null
The purchase order's currency. The currency code in ISO 4217 format.
exchange_ratestring or nullformat: "decimal"
The purchase order's exchange rate.
payment_termstring or nullformat: "uuid"
The payment term that applies to this transaction.
line_itemslist of objectsRead-only
inclusive_of_taxboolean or null

If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

tracking_categorieslist of strings
accounting_periodstring or nullformat: "uuid"
The accounting period that the PurchaseOrder was generated in.
remote_created_atdatetime or null
When the third party's purchase order note was created.
remote_updated_atdatetime or null
When the third party's purchase order note was updated.
remote_was_deletedbooleanRead-only

Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. Learn more.

field_mappingsobject or nullRead-only
remote_datalist of objects or nullRead-only
remote_fieldslist of objectsRead-only

A comma separated list of enum field names for which you’d like the original values to be returned, instead of Merge’s normalized enum values. Learn more