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

POST
/accounting/v1/purchase-orders
POST
/api/accounting/v1/purchase-orders
$curl -X POST https://api.merge.dev/api/accounting/v1/purchase-orders \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {}
>}'
201Created
1{
2 "model": {
3 "id": "0048ea5b-911e-4dff-9364-92070dea62ff",
4 "remote_id": "239741",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "status": "SUBMITTED",
8 "issue_date": "2020-03-31T00:00:00Z",
9 "purchase_order_number": "PO1234",
10 "delivery_date": "2020-04-15T00:00:00Z",
11 "delivery_address": {
12 "street_1": "2920 Broadway",
13 "street_2": "2nd Floor",
14 "city": "New York",
15 "state": "NY",
16 "country": "US",
17 "zip_code": "10027"
18 },
19 "customer": "3e442c5d-8f51-4103-b5c9-dcee39c30a08",
20 "vendor": "2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b",
21 "memo": "private note",
22 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
23 "total_amount": 260,
24 "currency": "USD",
25 "exchange_rate": "2.9",
26 "payment_term": "89d329de-825f-4ac6-8369-3c58b4e68bee",
27 "line_items": [
28 {
29 "remote_id": "121222",
30 "description": "Pickleball paddles",
31 "unit_price": 25,
32 "quantity": 10,
33 "item": "0958cbc6-6040-430a-848e-aafacbadf4ae",
34 "tracking_categories": [
35 "f1214c24-2702-4617-b74b-3ddecfc0d384",
36 "9b840d2-686a-465a-8a8e-7b028498f8e4",
37 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
38 ],
39 "tax_amount": "10",
40 "total_line_amount": "260",
41 "currency": "USD",
42 "tax_rate": "a12e7c20-1922-9df7-s75n-edfeewnn7384",
43 "exchange_rate": "2.9",
44 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
45 "remote_was_deleted": false
46 },
47 {
48 "description": "Pickleball Balls",
49 "unit_price": 1,
50 "quantity": 10,
51 "item": "249c9faa-3045-4a31-953b-8f22d3613301",
52 "tracking_categories": [
53 "f1214c24-2702-4617-b74b-3ddecfc0d384",
54 "9b840d2-686a-465a-8a8e-7b028498f8e4",
55 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
56 ],
57 "tax_amount": "10",
58 "total_line_amount": "20"
59 }
60 ],
61 "inclusive_of_tax": true,
62 "tracking_categories": [
63 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
64 "9b840d2-686a-465a-8a8e-7b028498f8e4",
65 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
66 ],
67 "accounting_period": "2c22ce34-5c6e-4fc7-a594-7f26bb4cf78b",
68 "remote_created_at": "2020-03-31T00:00:00Z",
69 "remote_updated_at": "2020-03-31T00:00:00Z",
70 "remote_was_deleted": true,
71 "field_mappings": {
72 "organization_defined_targets": {
73 "custom_key": "custom_value"
74 },
75 "linked_account_defined_targets": {
76 "custom_key": "custom_value"
77 }
78 },
79 "remote_data": [
80 {
81 "path": "/actions",
82 "data": null
83 }
84 ],
85 "remote_fields": [
86 {
87 "remote_field_class": {
88 "id": "string",
89 "display_name": "string",
90 "remote_key_name": "string",
91 "description": "string",
92 "is_custom": true,
93 "is_common_model_field": true,
94 "is_required": true,
95 "field_type": "string",
96 "field_format": "string",
97 "field_choices": [
98 "string"
99 ],
100 "item_schema": {
101 "item_type": "string",
102 "item_format": "string",
103 "item_choices": [
104 "string"
105 ]
106 }
107 },
108 "value": "string"
109 }
110 ]
111 },
112 "warnings": [
113 {
114 "title": "Unrecognized Field",
115 "detail": "An unrecognized field, age, was passed in with request data.",
116 "problem_type": "UNRECOGNIZED_FIELD",
117 "source": {
118 "pointer": "/age"
119 },
120 "block_merge_link": true,
121 "raw_error": "string",
122 "error_code": 1
123 }
124 ],
125 "errors": [
126 {
127 "title": "Missing Required Field",
128 "detail": "custom_fields is a required field on model.",
129 "problem_type": "MISSING_REQUIRED_FIELD",
130 "source": {
131 "pointer": "/model/custom_fields"
132 },
133 "block_merge_link": true,
134 "raw_error": "string",
135 "error_code": 1
136 }
137 ],
138 "logs": [
139 {
140 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
141 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
142 "log_summary": {
143 "url": "www.exampleintegration.com/api/v1/exampleapi",
144 "method": "POST",
145 "status_code": 200
146 }
147 }
148 ]
149}

Creates a PurchaseOrder object with the given values.

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/{id}

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

is_debug_modebooleanOptional

Whether to include debug fields (such as log file links) in the response.

run_asyncbooleanOptional

Whether or not third-party updates should be run asynchronously.

Request

This endpoint expects an object.
modelobjectRequired

Description

The PurchaseOrder object is a record of request for a product or service between a buyer and seller.

Usage Example

Fetch from the LIST PurchaseOrders endpoint and view a company’s purchase orders.

Response

modelobject

Description

A PurchaseOrder represents a request to purchase goods or services from a vendor. It outlines the details of the purchase, such as the items or services requested, quantities, prices, and delivery details.

A PurchaseOrder is a crucial component of the procurement process, but does not typically result in any impact on the company’s general ledger. The general ledger is typically only affected when the PurchaseOrder is fulfilled as an Accounts Payable Invoice object (also known as a Bill).

Usage Example

Fetch from the LIST PurchaseOrders endpoint and view a company’s purchase orders.

warningslist of objects
errorslist of objects
logslist of objects