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 SalesOrder object
          • GET/sales-orders
          • POST/sales-orders
          • GET/sales-orders/{id}
          • GET/sales-orders/lines/remote-field-classes
          • GET/sales-orders/meta/post
          • GET/sales-orders/remote-field-classes
          • POST/sales-orders/bulk
          • GET/sales-orders/bulk/{batch_id}
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsSales Orders

/sales-orders/{id}

Beta
GET
/accounting/v1/sales-orders/:id
GET
/api/accounting/v1/sales-orders/:id
$curl -G https://api.merge.dev/api/accounting/v1/sales-orders/id \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> --data-urlencode expand=lines,tracking_categories,customer,company,payment_term,shipping_address \
> -d remote_fields=status \
> -d show_enum_origins=status
200Retrieved
1{
2 "id": "0048ea5b-911e-4dff-9364-92070dea62ff",
3 "remote_id": "SO-12345",
4 "created_at": "2021-09-15T00:00:00Z",
5 "modified_at": "2021-10-16T00:00:00Z",
6 "customer": "3e442c5d-8f51-4103-b5c9-dcee39c30a08",
7 "currency": "USD",
8 "exchange_rate": "1.0",
9 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
10 "status": "DRAFT",
11 "payment_term": "89d329de-825f-4ac6-8369-3c58b4e68bee",
12 "memo": "Quarterly subscription order",
13 "shipping_address": "b0a1e9a5-8f51-4103-b5c9-dcee39c30a08",
14 "tracking_categories": [
15 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
16 "9b840d2-686a-465a-8a8e-7b028498f8e4"
17 ],
18 "issue_date": "2020-03-31T00:00:00Z",
19 "transaction_number": "SO-12345",
20 "total": 495,
21 "lines": [
22 {
23 "remote_id": "121222",
24 "description": "Premium subscription",
25 "unit_price": "99",
26 "quantity": "5",
27 "item": "0958cbc6-6040-430a-848e-aafacbadf4ae",
28 "tax_rate": "a12e7c20-1922-9df7-s75n-edfeewnn7384",
29 "tracking_categories": [
30 "f1214c24-2702-4617-b74b-3ddecfc0d384",
31 "9b840d2-686a-465a-8a8e-7b028498f8e4"
32 ],
33 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
34 "remote_was_deleted": false
35 },
36 {
37 "description": "Basic subscription",
38 "unit_price": "50",
39 "quantity": "2",
40 "item": "249c9faa-3045-4a31-953b-8f22d3613301",
41 "tracking_categories": [
42 "f1214c24-2702-4617-b74b-3ddecfc0d384"
43 ]
44 }
45 ],
46 "remote_created_at": "2020-03-31T00:00:00Z",
47 "remote_updated_at": "2020-03-31T00:00:00Z",
48 "remote_was_deleted": true,
49 "field_mappings": {
50 "organization_defined_targets": {
51 "custom_key": "custom_value"
52 },
53 "linked_account_defined_targets": {
54 "custom_key": "custom_value"
55 }
56 },
57 "remote_data": [
58 {
59 "path": "/actions",
60 "data": null
61 }
62 ],
63 "remote_fields": [
64 {
65 "remote_field_class": {
66 "id": "string",
67 "display_name": "string",
68 "remote_key_name": "string",
69 "description": "string",
70 "is_custom": true,
71 "is_common_model_field": true,
72 "is_required": true,
73 "field_type": "string",
74 "field_format": "string",
75 "field_choices": [
76 "string"
77 ],
78 "item_schema": {
79 "item_type": "string",
80 "item_format": "string",
81 "item_choices": [
82 "string"
83 ]
84 }
85 },
86 "value": "string"
87 }
88 ]
89}

Returns a SalesOrder 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

/sales-orders

Next

/sales-orders/lines/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.
customerstring or nullformat: "uuid"
The customer associated with the sales order.
currencyenum or null
The currency code for the order. The currency code in ISO 4217 format.
exchange_ratestring or nullformat: "decimal"
The exchange rate applied if the order currency differs from the base currency.
companystring or nullformat: "uuid"
The subsidiary associated with the order.
statusenum or null

The status of the sales order.

  • DRAFT - DRAFT
  • PENDING_APPROVAL - PENDING_APPROVAL
  • OPEN - OPEN
  • PARTIALLY_COMPLETED - PARTIALLY_COMPLETED
  • COMPLETED - COMPLETED
  • CLOSED - CLOSED
payment_termstring or nullformat: "uuid"
The payment terms applied to this order.
memostring or null
Notes or comments attached to the order.
shipping_addressstring or nullformat: "uuid"
The shipping address for the order.
tracking_categorieslist of strings
issue_datedatetime or null
The date the sales order was issued.
transaction_numberstring or null

The human-readable sales order number or transaction reference.

totaldouble or null
Total amount of order.
lineslist of objectsRead-only
remote_created_atdatetime or null
When the third party's sales order was created.
remote_updated_atdatetime or null
When the third party's sales order 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