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 Invoice object
          • GET/invoices
          • POST/invoices
          • GET/invoices/{id}
          • PATCH/invoices/{id}
          • GET/invoices/line-items/remote-field-classes
          • GET/invoices/meta/patch/{id}
          • GET/invoices/meta/post
          • GET/invoices/remote-field-classes
          • POST/invoices/bulk
          • GET/invoices/bulk/{batch_id}
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsInvoices

/invoices

GET
/accounting/v1/invoices
GET
/api/accounting/v1/invoices
$curl -G https://api.merge.dev/api/accounting/v1/invoices \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -d company_id=company_id \
> -d contact_id=contact_id \
> -d cursor=cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw \
> --data-urlencode expand=payments,applied_payments,line_items,tracking_categories,purchase_orders,sales_orders,applied_credit_notes,applied_vendor_credits,contact,company,employee,accounting_period,payment_term \
> -d remote_fields=type \
> -d show_enum_origins=type
200Retrieved
1{
2 "next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
3 "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
4 "results": [
5 {
6 "id": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46",
7 "remote_id": "990110",
8 "created_at": "2021-09-15T00:00:00Z",
9 "modified_at": "2021-10-16T00:00:00Z",
10 "type": "ACCOUNTS_RECEIVABLE",
11 "contact": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
12 "number": "AIQ12546",
13 "issue_date": "2020-03-31T00:00:00Z",
14 "due_date": "2020-04-15T00:00:00Z",
15 "paid_on_date": "2020-04-01T00:00:00Z",
16 "memo": "Weekly Payment",
17 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
18 "employee": "7442f0d5-722d-45bd-b807-6e38489d37fe",
19 "currency": "USD",
20 "exchange_rate": "2.9",
21 "payment_term": "89d329de-825f-4ac6-8369-3c58b4e68bee",
22 "total_discount": 1.1,
23 "sub_total": 100,
24 "status": "DRAFT",
25 "total_tax_amount": 5,
26 "total_amount": 105,
27 "balance": 105,
28 "remote_updated_at": "2020-04-01T00:00:00Z",
29 "tracking_categories": [
30 "7dc5ca17-d311-44cd-9ce0-333080367a18",
31 "6aa0700c-48e1-4c4a-8162-02e6a582df05",
32 "8c933d61-8f5b-4360-ac0c-c9dc87bee763"
33 ],
34 "accounting_period": "7dc5ca17-d311-44cd-9ce0-333080367a18",
35 "purchase_orders": [
36 "e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7",
37 "dd70ca2f-b120-46fa-889a-9604037f45fd",
38 "889b281d-739c-4759-95b8-0aedb3947131"
39 ],
40 "sales_orders": [
41 "e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7",
42 "dd70ca2f-b120-46fa-889a-9604037f45fd",
43 "889b281d-739c-4759-95b8-0aedb3947131"
44 ],
45 "payments": [
46 "b26fd49a-cbae-470a-a8f8-bcbc119e0390"
47 ],
48 "applied_payments": [
49 "9017594e-dc33-4113-a5d2-b0f928e34fdd"
50 ],
51 "line_items": [
52 {
53 "remote_id": "8765432",
54 "description": "Pickleball lessons",
55 "unit_price": 50,
56 "quantity": 1,
57 "total_amount": 50,
58 "employee": "7442f0d5-722d-45bd-b807-6e38489d37fe",
59 "project": "22e65a5d-2df5-4e6e-884a-e538d0339000",
60 "contact": "908934-49j9-093f-0989-908923908",
61 "currency": "USD",
62 "exchange_rate": "2.9",
63 "item": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
64 "account": "cd0f32d4-a493-11ec-b909-0242ac120002",
65 "tax_rate": "a12e7c20-1922-9df7-s75n-edfeewnn7384",
66 "tracking_categories": [
67 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
68 "9b840d2-686a-465a-8a8e-7b028498f8e4",
69 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
70 ],
71 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
72 "remote_data": [
73 {
74 "path": "/actions",
75 "data": [
76 "Varies by platform"
77 ]
78 }
79 ]
80 }
81 ],
82 "applied_credit_notes": [
83 {
84 "credit_note": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
85 "applied_date": "2020-03-31T00:00:00Z",
86 "applied_amount": "2.9"
87 }
88 ],
89 "applied_vendor_credits": [
90 {
91 "vendor_credit": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
92 "applied_date": "2020-03-31T00:00:00Z",
93 "applied_amount": "2.9"
94 }
95 ],
96 "inclusive_of_tax": true,
97 "remote_was_deleted": true,
98 "field_mappings": {
99 "organization_defined_targets": {
100 "custom_key": "custom_value"
101 },
102 "linked_account_defined_targets": {
103 "custom_key": "custom_value"
104 }
105 },
106 "remote_data": [
107 {
108 "path": "/actions",
109 "data": null
110 }
111 ],
112 "remote_fields": [
113 {
114 "remote_field_class": {
115 "id": "string",
116 "display_name": "string",
117 "remote_key_name": "string",
118 "description": "string",
119 "is_custom": true,
120 "is_common_model_field": true,
121 "is_required": true,
122 "field_type": "string",
123 "field_format": "string",
124 "field_choices": [
125 "string"
126 ],
127 "item_schema": {
128 "item_type": "string",
129 "item_format": "string",
130 "item_choices": [
131 "string"
132 ]
133 }
134 },
135 "value": "string"
136 }
137 ]
138 }
139 ]
140}

Returns a list of Invoice objects.

Field support by integration

See all supported fields

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

Was this page helpful?
Previous

The Invoice object

Next

/invoices

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

company_idstringOptional
If provided, will only return invoices for this company.
contact_idstringOptional
If provided, will only return invoices for this contact.
created_afterdatetimeOptional
If provided, will only return objects created after this datetime.
created_beforedatetimeOptional
If provided, will only return objects created before this datetime.
cursorstringOptional
The pagination cursor value.
expandenumOptional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_databooleanOptional
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](https://docs.merge.dev/integrations/hris/supported-features/).
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).

issue_date_afterdatetimeOptional
If provided, will only return objects created after this datetime.
issue_date_beforedatetimeOptional
If provided, will only return objects created before this datetime.
modified_afterdatetimeOptional
If provided, only objects synced by Merge after this date time will be returned.
modified_beforedatetimeOptional
If provided, only objects synced by Merge before this date time will be returned.
numberstringOptional
If provided, will only return Invoices with this number.
page_sizeintegerOptional
Number of results to return per page. The maximum limit is 100.
remote_fieldsenumOptional

Deprecated. Use show_enum_origins.

Allowed values:
remote_idstringOptional
The API provider's ID for the given object.
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:
statusenumOptional
If provided, will only return Invoices with this status. * `PAID` - PAID * `DRAFT` - DRAFT * `SUBMITTED` - SUBMITTED * `PARTIALLY_PAID` - PARTIALLY_PAID * `OPEN` - OPEN * `VOID` - VOID
typeenumOptional
If provided, will only return Invoices with this type. * `ACCOUNTS_RECEIVABLE` - ACCOUNTS_RECEIVABLE * `ACCOUNTS_PAYABLE` - ACCOUNTS_PAYABLE
Allowed values:

Response

nextstring or null
previousstring or null
resultslist of objects

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.

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

If provided, will only return Invoices with this status.

  • PAID - PAID
  • DRAFT - DRAFT
  • SUBMITTED - SUBMITTED
  • PARTIALLY_PAID - PARTIALLY_PAID
  • OPEN - OPEN
  • VOID - VOID

If provided, will only return Invoices with this type.

  • ACCOUNTS_RECEIVABLE - ACCOUNTS_RECEIVABLE
  • ACCOUNTS_PAYABLE - ACCOUNTS_PAYABLE