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 VendorCredit object
          • GET/vendor-credits
          • POST/vendor-credits
          • GET/vendor-credits/{id}
          • PATCH/vendor-credits/{id}
          • POST/vendor-credits/{id}/application
          • GET/vendor-credits/meta/patch/{id}
          • GET/vendor-credits/meta/post
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsVendor Credits

/vendor-credits/{id}/application

POST
/accounting/v1/vendor-credits/:id/application
POST
/api/accounting/v1/vendor-credits/:id/application
$curl -X POST https://api.merge.dev/api/accounting/v1/vendor-credits/id/application \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "invoice": "string",
> "applied_date": "2024-01-15T09:30:00Z",
> "applied_amount": "string"
>}'
201Created
1{
2 "model": {
3 "id": "ecbe05ac-62a3-46c5-ab31-4b478b37d1b4",
4 "remote_id": "088899",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "number": "6",
8 "transaction_date": "2020-03-31T00:00:00Z",
9 "vendor": "3d263469-51a1-4766-9205-f6c997826be1",
10 "total_amount": 10000,
11 "currency": "USD",
12 "exchange_rate": "2.9",
13 "inclusive_of_tax": true,
14 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
15 "lines": [
16 {
17 "remote_id": "121222",
18 "net_amount": 25.54,
19 "tracking_categories": [
20 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
21 "9b840d2-686a-465a-8a8e-7b028498f8e4",
22 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
23 ],
24 "description": "Gifted Merge Credit",
25 "account": "9d892439-5fab-4dbb-8bd8-34f7f96c7912",
26 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
27 "project": "22e65a5d-2df5-4e6e-884a-e538d0339000",
28 "contact": "908934-49j9-093f-0989-908923908",
29 "tax_rate": "a12e7c20-1922-9df7-s75n-edfeewnn7384",
30 "exchange_rate": "2.9",
31 "remote_was_deleted": false
32 },
33 {
34 "remote_id": "121223",
35 "net_amount": 10,
36 "tracking_categories": [
37 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
38 "9b840d2-686a-465a-8a8e-7b028498f8e4",
39 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
40 ],
41 "description": "Refund for overpayment",
42 "account": "9d892439-5fab-4dbb-8bd8-34f7f96c7912"
43 }
44 ],
45 "tracking_categories": [
46 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
47 "9b840d2-686a-465a-8a8e-7b028498f8e4",
48 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
49 ],
50 "applied_to_lines": [
51 {
52 "invoice": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
53 "applied_date": "2020-03-31T00:00:00Z",
54 "applied_amount": "2.9"
55 }
56 ],
57 "remote_was_deleted": true,
58 "accounting_period": "9b840d2-686a-465a-8a8e-7b028498f8e4",
59 "field_mappings": {
60 "organization_defined_targets": {
61 "custom_key": "custom_value"
62 },
63 "linked_account_defined_targets": {
64 "custom_key": "custom_value"
65 }
66 },
67 "remote_data": [
68 {
69 "path": "/actions",
70 "data": null
71 }
72 ]
73 },
74 "warnings": [
75 {
76 "title": "Unrecognized Field",
77 "detail": "An unrecognized field, age, was passed in with request data.",
78 "problem_type": "UNRECOGNIZED_FIELD",
79 "source": {
80 "pointer": "/age"
81 },
82 "block_merge_link": true,
83 "raw_error": "string",
84 "error_code": 1
85 }
86 ],
87 "errors": [
88 {
89 "title": "Missing Required Field",
90 "detail": "custom_fields is a required field on model.",
91 "problem_type": "MISSING_REQUIRED_FIELD",
92 "source": {
93 "pointer": "/model/custom_fields"
94 },
95 "block_merge_link": true,
96 "raw_error": "string",
97 "error_code": 1
98 }
99 ],
100 "logs": [
101 {
102 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
103 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
104 "log_summary": {
105 "url": "www.exampleintegration.com/api/v1/exampleapi",
106 "method": "POST",
107 "status_code": 200
108 }
109 }
110 ]
111}

Creates a new VendorCreditApplyLine to apply a vendor credit to an invoice

Field support by integration

See all supported fields

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

Was this page helpful?
Previous

/vendor-credits/{id}

Next

/vendor-credits/meta/patch/{id}

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.
invoicestring or nullRequiredformat: "uuid"
The invoice to apply the vendor credit to.
applied_datedatetimeRequired
Date that the vendor credit is applied to the invoice.
applied_amountstringRequiredformat: "decimal"
The amount of vendor credit applied to the invoice.

Response

modelobject

Description

A VendorCredit is transaction issued by a vendor to the accounting company, indicating a reduction or cancellation of the amount owed to the vendor. It is most generally used as an adjustment note used to rectify errors, returns, or overpayments related to a purchasing transaction. A VendorCredit can be applied to Accounts Payable Invoices to decrease the overall amount of the Invoice.

Usage Example

Fetch from the GET VendorCredit endpoint and view a company’s vendor credits.

warningslist of objects
errorslist of objects
logslist of objects