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}

Get started

  • Overview
  • Introduction
  • Unified API
  • Linked Account
  • Merge Link
  • Use cases

Implementation

  • Sandboxes
  • SDKs
  • API access
  • Syncing data
  • Writing data
  • Data minimization
  • Supplemental data
  • Errors
  • Integration metadata

API reference

  • ATS
  • HRIS
  • Accounting
  • Ticketing
  • CRM
  • File Storage
  • Knowledge Base
  • Chat

Resources

  • Help Center
  • Merge.dev
  • Changelog
© Merge 2026Terms of usePrivacy policy
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsInvoices

/invoices

Beta
POST
/accounting/v1/invoices
POST
/api/accounting/v1/invoices
$curl -X POST https://api.merge.dev/api/accounting/v1/invoices \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {}
>}'
201Created
1{
2 "model": {
3 "id": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46",
4 "remote_id": "990110",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "type": "ACCOUNTS_RECEIVABLE",
8 "contact": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
9 "number": "AIQ12546",
10 "issue_date": "2020-03-31T00:00:00Z",
11 "due_date": "2020-04-15T00:00:00Z",
12 "paid_on_date": "2020-04-01T00:00:00Z",
13 "memo": "Weekly Payment",
14 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
15 "employee": "7442f0d5-722d-45bd-b807-6e38489d37fe",
16 "currency": "USD",
17 "exchange_rate": "2.9",
18 "payment_term": "89d329de-825f-4ac6-8369-3c58b4e68bee",
19 "total_discount": 1.1,
20 "sub_total": 100,
21 "status": "DRAFT",
22 "total_tax_amount": 5,
23 "total_amount": 105,
24 "balance": 105,
25 "remote_updated_at": "2020-04-01T00:00:00Z",
26 "tracking_categories": [
27 "7dc5ca17-d311-44cd-9ce0-333080367a18",
28 "6aa0700c-48e1-4c4a-8162-02e6a582df05",
29 "8c933d61-8f5b-4360-ac0c-c9dc87bee763"
30 ],
31 "accounting_period": "7dc5ca17-d311-44cd-9ce0-333080367a18",
32 "purchase_orders": [
33 "e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7",
34 "dd70ca2f-b120-46fa-889a-9604037f45fd",
35 "889b281d-739c-4759-95b8-0aedb3947131"
36 ],
37 "sales_orders": [
38 "e7378d8f-3992-4c2a-8417-ebdc4f2bfeb7",
39 "dd70ca2f-b120-46fa-889a-9604037f45fd",
40 "889b281d-739c-4759-95b8-0aedb3947131"
41 ],
42 "payments": [
43 "b26fd49a-cbae-470a-a8f8-bcbc119e0390"
44 ],
45 "applied_payments": [
46 "9017594e-dc33-4113-a5d2-b0f928e34fdd"
47 ],
48 "line_items": [
49 {
50 "remote_id": "8765432",
51 "description": "Pickleball lessons",
52 "unit_price": 50,
53 "quantity": 1,
54 "total_amount": 50,
55 "employee": "7442f0d5-722d-45bd-b807-6e38489d37fe",
56 "project": "22e65a5d-2df5-4e6e-884a-e538d0339000",
57 "contact": "908934-49j9-093f-0989-908923908",
58 "currency": "USD",
59 "exchange_rate": "2.9",
60 "item": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
61 "account": "cd0f32d4-a493-11ec-b909-0242ac120002",
62 "tax_rate": "a12e7c20-1922-9df7-s75n-edfeewnn7384",
63 "tracking_categories": [
64 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
65 "9b840d2-686a-465a-8a8e-7b028498f8e4",
66 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
67 ],
68 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
69 "is_billable": true,
70 "remote_data": [
71 {
72 "path": "/actions",
73 "data": [
74 "Varies by platform"
75 ]
76 }
77 ]
78 }
79 ],
80 "applied_credit_notes": [
81 {
82 "credit_note": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
83 "applied_date": "2020-03-31T00:00:00Z",
84 "applied_amount": "2.9"
85 }
86 ],
87 "applied_vendor_credits": [
88 {
89 "vendor_credit": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
90 "applied_date": "2020-03-31T00:00:00Z",
91 "applied_amount": "2.9"
92 }
93 ],
94 "inclusive_of_tax": true,
95 "remote_was_deleted": true,
96 "field_mappings": {
97 "organization_defined_targets": {
98 "custom_key": "custom_value"
99 },
100 "linked_account_defined_targets": {
101 "custom_key": "custom_value"
102 }
103 },
104 "remote_data": [
105 {
106 "path": "/actions",
107 "data": null
108 }
109 ],
110 "remote_fields": [
111 {
112 "remote_field_class": {
113 "id": "string",
114 "display_name": "string",
115 "remote_key_name": "string",
116 "description": "string",
117 "is_custom": true,
118 "is_common_model_field": true,
119 "is_required": true,
120 "field_type": "string",
121 "field_format": "string",
122 "field_choices": [
123 "string"
124 ],
125 "item_schema": {
126 "item_type": "string",
127 "item_format": "string",
128 "item_choices": [
129 "string"
130 ]
131 }
132 },
133 "value": "string"
134 }
135 ]
136 },
137 "warnings": [
138 {
139 "title": "Unrecognized Field",
140 "detail": "An unrecognized field, age, was passed in with request data.",
141 "problem_type": "UNRECOGNIZED_FIELD",
142 "source": {
143 "pointer": "/age"
144 },
145 "block_merge_link": true,
146 "raw_error": "string",
147 "error_code": 1
148 }
149 ],
150 "errors": [
151 {
152 "title": "Missing Required Field",
153 "detail": "custom_fields is a required field on model.",
154 "problem_type": "MISSING_REQUIRED_FIELD",
155 "source": {
156 "pointer": "/model/custom_fields"
157 },
158 "block_merge_link": true,
159 "raw_error": "string",
160 "error_code": 1
161 }
162 ],
163 "logs": [
164 {
165 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
166 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
167 "log_summary": {
168 "url": "www.exampleintegration.com/api/v1/exampleapi",
169 "method": "POST",
170 "status_code": 200
171 }
172 }
173 ]
174}

Creates an Invoice object with the given values. Including a PurchaseOrder id in the purchase_orders property will generate an Accounts Payable Invoice from the specified Purchase Order(s).

Field support by integration

See all supported fields

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

Was this page helpful?
Previous

/invoices

Next

/invoices/{id}

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 Invoice object represents an itemized record of goods and/or services sold to a customer or bought from a vendor.

Represents a Bill when the Invoice type is ACCOUNTS_PAYABLE. References an Invoice when the Invoice type is ACCOUNTS_RECEIVABLE.

Usage Example

Fetch from the LIST Invoices endpoint and view a company’s invoices.

Response

modelobject

Description

The Invoice object represents an itemized record of goods and/or services sold to a customer or bought from a vendor.

Represents a Bill when the Invoice type is ACCOUNTS_PAYABLE. References an Invoice when the Invoice type is ACCOUNTS_RECEIVABLE.

Usage Example

Fetch from the LIST Invoices endpoint and view a company’s invoices.

warningslist of objects
errorslist of objects
logslist of objects