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

Beta
PATCH
/accounting/v1/invoices/:id
PATCH
/api/accounting/v1/invoices/:id
$curl -X PATCH https://api.merge.dev/api/accounting/v1/invoices/id \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {}
>}'
200Updated
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 "remote_data": [
70 {
71 "path": "/actions",
72 "data": [
73 "Varies by platform"
74 ]
75 }
76 ]
77 }
78 ],
79 "applied_credit_notes": [
80 {
81 "credit_note": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
82 "applied_date": "2020-03-31T00:00:00Z",
83 "applied_amount": "2.9"
84 }
85 ],
86 "applied_vendor_credits": [
87 {
88 "vendor_credit": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
89 "applied_date": "2020-03-31T00:00:00Z",
90 "applied_amount": "2.9"
91 }
92 ],
93 "inclusive_of_tax": true,
94 "remote_was_deleted": true,
95 "field_mappings": {
96 "organization_defined_targets": {
97 "custom_key": "custom_value"
98 },
99 "linked_account_defined_targets": {
100 "custom_key": "custom_value"
101 }
102 },
103 "remote_data": [
104 {
105 "path": "/actions",
106 "data": null
107 }
108 ],
109 "remote_fields": [
110 {
111 "remote_field_class": {
112 "id": "string",
113 "display_name": "string",
114 "remote_key_name": "string",
115 "description": "string",
116 "is_custom": true,
117 "is_common_model_field": true,
118 "is_required": true,
119 "field_type": "string",
120 "field_format": "string",
121 "field_choices": [
122 "string"
123 ],
124 "item_schema": {
125 "item_type": "string",
126 "item_format": "string",
127 "item_choices": [
128 "string"
129 ]
130 }
131 },
132 "value": "string"
133 }
134 ]
135 },
136 "warnings": [
137 {
138 "title": "Unrecognized Field",
139 "detail": "An unrecognized field, age, was passed in with request data.",
140 "problem_type": "UNRECOGNIZED_FIELD",
141 "source": {
142 "pointer": "/age"
143 },
144 "block_merge_link": true,
145 "raw_error": "string",
146 "error_code": 1
147 }
148 ],
149 "errors": [
150 {
151 "title": "Missing Required Field",
152 "detail": "custom_fields is a required field on model.",
153 "problem_type": "MISSING_REQUIRED_FIELD",
154 "source": {
155 "pointer": "/model/custom_fields"
156 },
157 "block_merge_link": true,
158 "raw_error": "string",
159 "error_code": 1
160 }
161 ],
162 "logs": [
163 {
164 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
165 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
166 "log_summary": {
167 "url": "www.exampleintegration.com/api/v1/exampleapi",
168 "method": "POST",
169 "status_code": 200
170 }
171 }
172 ]
173}

Updates an Invoice 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

/invoices/{id}

Next

/invoices/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

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