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 Expense object
          • GET/expenses
          • POST/expenses
          • GET/expenses/{id}
          • GET/expenses/lines/remote-field-classes
          • GET/expenses/meta/post
          • GET/expenses/remote-field-classes
          • POST/expenses/bulk
          • GET/expenses/bulk/{batch_id}
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsExpenses

/expenses/{id}

GET
/accounting/v1/expenses/:id
GET
/api/accounting/v1/expenses/:id
$curl -G https://api.merge.dev/api/accounting/v1/expenses/id \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> --data-urlencode expand=tracking_categories,account,contact,company,employee,accounting_period
200Retrieved
1{
2 "id": "ecbe05ac-62a3-46c5-ab31-4b478b37d1b4",
3 "remote_id": "088899",
4 "created_at": "2021-09-15T00:00:00Z",
5 "modified_at": "2021-10-16T00:00:00Z",
6 "transaction_date": "2024-01-15T09:30:00Z",
7 "remote_created_at": "2020-03-31T00:00:00Z",
8 "account": "9d892439-5fab-4dbb-8bd8-34f7f96c7912",
9 "contact": "3d263469-51a1-4766-9205-f6c997826be1",
10 "total_amount": 10000,
11 "sub_total": 1.1,
12 "total_tax_amount": 1.1,
13 "currency": "USD",
14 "exchange_rate": "2.9",
15 "inclusive_of_tax": true,
16 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
17 "employee": "7442f0d5-722d-45bd-b807-6e38489d37fe",
18 "memo": "New employee supplies",
19 "lines": [
20 {
21 "remote_id": "121222",
22 "item": "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
23 "net_amount": 25.54,
24 "tracking_categories": [
25 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
26 "9b840d2-686a-465a-8a8e-7b028498f8e4",
27 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
28 ],
29 "company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
30 "employee": "7442f0d5-722d-45bd-b807-6e38489d37fe",
31 "account": "2a56344a-a491-11ec-b909-0242ac120002",
32 "contact": "c640b80b-fac9-409f-aa19-1f9221aec445",
33 "project": "22e65a5d-2df5-4e6e-884a-e538d0339000",
34 "description": "MacBook Pro",
35 "exchange_rate": "2.9",
36 "tax_rate": "a12e7c20-1922-9df7-s75n-edfeewnn7384",
37 "quantity": "1",
38 "unit_price": "25.54",
39 "remote_was_deleted": false
40 },
41 {
42 "remote_id": "121223",
43 "item": "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
44 "net_amount": 10,
45 "tracking_categories": [
46 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
47 "9b840d2-686a-465a-8a8e-7b028498f8e4",
48 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
49 ],
50 "account": "2a56344a-a491-11ec-b909-0242ac120002",
51 "description": "Desk Lamp"
52 }
53 ],
54 "tracking_categories": [
55 "b38c59b0-a9d7-4740-b1ee-5436c6751e3d",
56 "9b840d2-686a-465a-8a8e-7b028498f8e4",
57 "a47e11b6-c73b-4a0c-be31-130fc48177fa"
58 ],
59 "remote_was_deleted": true,
60 "accounting_period": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
61 "field_mappings": {
62 "organization_defined_targets": {
63 "custom_key": "custom_value"
64 },
65 "linked_account_defined_targets": {
66 "custom_key": "custom_value"
67 }
68 },
69 "remote_data": [
70 {
71 "path": "/actions",
72 "data": null
73 }
74 ],
75 "remote_fields": [
76 {
77 "remote_field_class": {
78 "id": "string",
79 "display_name": "string",
80 "remote_key_name": "string",
81 "description": "string",
82 "is_custom": true,
83 "is_common_model_field": true,
84 "is_required": true,
85 "field_type": "string",
86 "field_format": "string",
87 "field_choices": [
88 "string"
89 ],
90 "item_schema": {
91 "item_type": "string",
92 "item_format": "string",
93 "item_choices": [
94 "string"
95 ]
96 }
97 },
98 "value": "string"
99 }
100 ]
101}

Returns an Expense 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

/expenses

Next

/expenses/lines/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

expandenumOptional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
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).

Response

idstringRead-onlyformat: "uuid"
remote_idstring or null

The third-party API ID of the matching object.

created_atdatetimeRead-only
The datetime that this object was created by Merge.
modified_atdatetimeRead-only
The datetime that this object was modified by Merge.
transaction_datedatetime or null
When the transaction occurred.
remote_created_atdatetime or null
When the expense was created.
accountstring or nullformat: "uuid"
The expense's payment account.
contactstring or nullformat: "uuid"
The expense's contact.
total_amountdouble or null
The expense's total amount.
sub_totaldouble or null
The expense's total amount before tax.
total_tax_amountdouble or null
The expense's total tax amount.
currencyenum or null
The expense's currency. The currency code in ISO 4217 format.
exchange_ratestring or nullformat: "decimal"
The expense's exchange rate.
inclusive_of_taxboolean or null

If the transaction is inclusive or exclusive of tax. True if inclusive, False if exclusive.

companystring or nullformat: "uuid"
The company the expense belongs to.
employeestring or nullformat: "uuid"
The employee this overall transaction relates to.
memostring or null
The expense's private note.
lineslist of objects
tracking_categorieslist of strings
remote_was_deletedbooleanRead-only

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.

accounting_periodstring or nullformat: "uuid"
The accounting period that the Expense was generated in.
field_mappingsobject or nullRead-only
remote_datalist of objects or nullRead-only
remote_fieldslist of objectsRead-only