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 CreditNote object
          • GET/credit-notes
          • POST/credit-notes
          • GET/credit-notes/{id}
          • PATCH/credit-notes/{id}
          • POST/credit-notes/{id}/application
          • GET/credit-notes/meta/patch/{id}
          • GET/credit-notes/meta/post
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsCredit Notes

/credit-notes/{id}

PATCH
/accounting/v1/credit-notes/:id
PATCH
/api/accounting/v1/credit-notes/:id
$curl -X PATCH https://api.merge.dev/api/accounting/v1/credit-notes/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": "8d9fd929-436c-4fd4-a48b-0c61f68d6178",
4 "remote_id": "123877",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "transaction_date": "2020-03-31T00:00:00Z",
8 "status": "PAID",
9 "number": "CN-29",
10 "contact": "c6c7b870-bb4d-489a-921e-2f0ee4192ff9",
11 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
12 "exchange_rate": "2.9",
13 "total_amount": 50,
14 "remaining_credit": 20,
15 "inclusive_of_tax": true,
16 "line_items": [
17 {
18 "remote_id": "121222",
19 "item": "0e3fd929-436c-4fd4-a48b-0c61f68d6178",
20 "name": "Basic Monthly",
21 "description": "prorated amount for items",
22 "quantity": "1",
23 "memo": "privNote",
24 "unit_price": "5.0",
25 "tax_rate": "8d9fd929-436c-4fd4-a48b-0c61f68d6178",
26 "total_line_amount": "5.0",
27 "tracking_categories": [
28 "8d9fd929-436c-4fd4-a48b-0c61f68d6178",
29 "9b840d2-686a-465a-8a8e-7b028498f8e4",
30 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
31 ],
32 "account": "8d9fd929-436c-4fd4-a48b-0c61f68d6178",
33 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
34 "contact": "908934-49j9-093f-0989-908923908",
35 "project": "22e65a5d-2df5-4e6e-884a-e538d0339000",
36 "remote_was_deleted": true
37 }
38 ],
39 "tracking_categories": [
40 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
41 "9b840d2-686a-465a-8a8e-7b028498f8e4",
42 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
43 ],
44 "currency": "USD",
45 "remote_created_at": "2020-03-31T00:00:00Z",
46 "remote_updated_at": "2020-03-31T00:00:00Z",
47 "payments": [
48 "b26fd49a-cbae-470a-a8f8-bcbc119e0390"
49 ],
50 "applied_payments": [
51 "a9a94a75-19c1-41fe-90d8-d9ba959c38e5"
52 ],
53 "accounting_period": "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
54 "applied_to_lines": [
55 {
56 "invoice": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
57 "applied_date": "2020-03-31T00:00:00Z",
58 "applied_amount": "2.9"
59 }
60 ],
61 "remote_was_deleted": true,
62 "field_mappings": {
63 "organization_defined_targets": {
64 "custom_key": "custom_value"
65 },
66 "linked_account_defined_targets": {
67 "custom_key": "custom_value"
68 }
69 },
70 "remote_data": [
71 {
72 "path": "/actions",
73 "data": null
74 }
75 ]
76 },
77 "warnings": [
78 {
79 "title": "Unrecognized Field",
80 "detail": "An unrecognized field, age, was passed in with request data.",
81 "problem_type": "UNRECOGNIZED_FIELD",
82 "source": {
83 "pointer": "/age"
84 },
85 "block_merge_link": true,
86 "raw_error": "string",
87 "error_code": 1
88 }
89 ],
90 "errors": [
91 {
92 "title": "Missing Required Field",
93 "detail": "custom_fields is a required field on model.",
94 "problem_type": "MISSING_REQUIRED_FIELD",
95 "source": {
96 "pointer": "/model/custom_fields"
97 },
98 "block_merge_link": true,
99 "raw_error": "string",
100 "error_code": 1
101 }
102 ],
103 "logs": [
104 {
105 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
106 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
107 "log_summary": {
108 "url": "www.exampleintegration.com/api/v1/exampleapi",
109 "method": "POST",
110 "status_code": 200
111 }
112 }
113 ]
114}

Updates a CreditNote 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

/credit-notes/{id}

Next

/credit-notes/{id}/application

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

A CreditNote is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A CreditNote can be applied to Accounts Receivable Invoices to decrease the overall amount of the Invoice.

Usage Example

Fetch from the LIST CreditNotes endpoint and view a company’s credit notes.

Response

modelobject

Description

A CreditNote is transaction issued to a customer, indicating a reduction or cancellation of the amount owed by the customer. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a sales transaction. A CreditNote can be applied to Accounts Receivable Invoices to decrease the overall amount of the Invoice.

Usage Example

Fetch from the LIST CreditNotes endpoint and view a company’s credit notes.

warningslist of objects
errorslist of objects
logslist of objects