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 ExpenseReport object
          • GET/expense-reports
          • POST/expense-reports
          • GET/expense-reports/{expense_report_id}/lines
          • GET/expense-reports/{id}
          • GET/expense-reports/lines/remote-field-classes
          • GET/expense-reports/meta/post
          • GET/expense-reports/remote-field-classes
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsExpense Reports

/expense-reports

Beta
POST
/accounting/v1/expense-reports
POST
/api/accounting/v1/expense-reports
$curl -X POST https://api.merge.dev/api/accounting/v1/expense-reports \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {
> "tracking_categories": [
> "a1b2c3d4-e5f6-4a5b-9c3d-2e1f0a9b8c7d",
> "d4c3b2a1-9e8f-7g6h-5i4j-3k2l1m0n9o8p"
> ]
> }
>}'
201Created
1{
2 "model": {
3 "tracking_categories": [
4 "a1b2c3d4-e5f6-4a5b-9c3d-2e1f0a9b8c7d",
5 "d4c3b2a1-9e8f-7g6h-5i4j-3k2l1m0n9o8p"
6 ],
7 "id": "123e4567-e89b-12d3-a456-426614174000",
8 "remote_id": "exp_123e4567-e89b-12d3-a456-426614174000",
9 "created_at": "2024-01-31T12:00:00Z",
10 "modified_at": "2024-01-31T14:30:00Z",
11 "report_date": "2024-01-31T00:00:00Z",
12 "report_identifier": "EXP-2024-001",
13 "employee": "b9a9b824-6172-4d63-9d90-1c8a86c4f3b1",
14 "status": "SUBMITTED",
15 "total_amount": 150,
16 "lines": [
17 {
18 "tracking_categories": [
19 "cat-1",
20 "cat-2"
21 ],
22 "id": "1234",
23 "remote_id": "abcd-1234",
24 "created_at": "2021-09-15T00:00:00Z",
25 "modified_at": "2021-10-16T00:00:00Z",
26 "account": "acc-1234",
27 "description": "Client lunch meeting",
28 "expense_date": "2024-01-15T00:00:00Z",
29 "amount": 50,
30 "currency": "USD",
31 "exchange_rate": "1",
32 "is_billable": true,
33 "employee": "emp-1234",
34 "project": "proj-5678",
35 "company": "comp-1234",
36 "contact": "cont-5678",
37 "quantity": 1,
38 "unit_price": 50,
39 "non_reimbursable": false,
40 "tax_amount": 5,
41 "inclusive_of_tax": false,
42 "tax_rate": "tax-1234",
43 "remote_was_deleted": false,
44 "integration_params": {
45 "unique_integration_field": "unique_integration_field_value"
46 },
47 "linked_account_params": {
48 "unique_linked_account_field": "unique_linked_account_field_value"
49 },
50 "field_mappings": {
51 "organization_defined_targets": {
52 "custom_key": "custom_value"
53 },
54 "linked_account_defined_targets": {
55 "custom_key": "custom_value"
56 }
57 }
58 }
59 ],
60 "currency": "USD",
61 "description": "January 2024 Travel Expenses",
62 "accounting_period": "7d793c67-9f72-4a6b-9256-3936f237b0d9",
63 "company": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
64 "remote_was_deleted": true,
65 "field_mappings": {
66 "organization_defined_targets": {
67 "custom_key": "custom_value"
68 },
69 "linked_account_defined_targets": {
70 "custom_key": "custom_value"
71 }
72 },
73 "remote_data": [
74 {
75 "path": "/actions",
76 "data": null
77 }
78 ],
79 "remote_fields": [
80 {
81 "remote_field_class": {
82 "id": "string",
83 "display_name": "string",
84 "remote_key_name": "string",
85 "description": "string",
86 "is_custom": true,
87 "is_common_model_field": true,
88 "is_required": true,
89 "field_type": "string",
90 "field_format": "string",
91 "field_choices": [
92 "string"
93 ],
94 "item_schema": {
95 "item_type": "string",
96 "item_format": "string",
97 "item_choices": [
98 "string"
99 ]
100 }
101 },
102 "value": "string"
103 }
104 ]
105 },
106 "warnings": [
107 {
108 "title": "Unrecognized Field",
109 "detail": "An unrecognized field, age, was passed in with request data.",
110 "problem_type": "UNRECOGNIZED_FIELD",
111 "source": {
112 "pointer": "/age"
113 },
114 "block_merge_link": true,
115 "raw_error": "string",
116 "error_code": 1
117 }
118 ],
119 "errors": [
120 {
121 "title": "Missing Required Field",
122 "detail": "custom_fields is a required field on model.",
123 "problem_type": "MISSING_REQUIRED_FIELD",
124 "source": {
125 "pointer": "/model/custom_fields"
126 },
127 "block_merge_link": true,
128 "raw_error": "string",
129 "error_code": 1
130 }
131 ],
132 "logs": [
133 {
134 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
135 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
136 "log_summary": {
137 "url": "www.exampleintegration.com/api/v1/exampleapi",
138 "method": "POST",
139 "status_code": 200
140 }
141 }
142 ]
143}

Creates an ExpenseReport object with the given values.

Field support by integration

See all supported fields

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

Was this page helpful?
Previous

/expense-reports

Next

/expense-reports/{expense_report_id}/lines

Built with

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 ExpenseReport object represents a collection of expenses submitted for review and reimbursement. It includes details about the submitter, status, amounts, and associated metadata.

Usage Example

Fetch from the GET ExpenseReport endpoint to view details of expense reports and their line items.

Response

modelobject

Description

The ExpenseReport object represents a collection of expenses submitted for review and reimbursement. It includes details about the submitter, status, amounts, and associated metadata.

Usage Example

Fetch from the GET ExpenseReport endpoint to view details of expense reports and their line items.

warningslist of objects
errorslist of objects
logslist of objects