Attachments

The AccountingAttachment object is used to represent a company's attachments.

The AccountingAttachment object

Properties


idString
Required

remote_idString
Optional
The third-party API ID of the matching object.

remote_dataRemoteData[]
Optional

file_nameString
Optional
The attachment's name.

file_urlString
Optional
The attachment's url.

companyString
Optional
The company the accounting attachment belongs to.

remote_was_deletedBoolean
Required
Indicates whether or not this object has been deleted by third party webhooks.

field_mappingsObject
Optional

The AccountingAttachment object
JSON
{
"id": "ecbe05ac-62a3-46c5-ab31-4b478b37d1b4",
"remote_id": "1018270",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
],
"file_name": "invoice.png",
"file_url": "https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png",
"company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
"remote_was_deleted": true,
"field_mappings": {
"organization_defined_targets": {
"custom_key": "custom_value"
},
"linked_account_defined_targets": {
"custom_key": "custom_value"
}
}
}

GET

/attachments

Returns a list of AccountingAttachment objects.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


company_idString
Optional
If provided, will only return accounting attachments for this company.

created_afterString
Optional
If provided, will only return objects created after this datetime.

created_beforeString
Optional
If provided, will only return objects created before this datetime.

cursorString
Optional
The pagination cursor value.

include_deleted_dataBoolean
Optional
Whether to include data that was marked as deleted by third party webhooks.

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.

modified_afterString
Optional
If provided, will only return objects modified after this datetime.

modified_beforeString
Optional
If provided, will only return objects modified before this datetime.

page_sizeInteger
Optional
Number of results to return per page.

remote_idString
Optional
The API provider's ID for the given object.

Response
JSON
{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"id": "ecbe05ac-62a3-46c5-ab31-4b478b37d1b4",
"remote_id": "1018270",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
],
"file_name": "invoice.png",
"file_url": "https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png",
"company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
"remote_was_deleted": true,
"field_mappings": {
"organization_defined_targets": {
"custom_key": "custom_value"
},
"linked_account_defined_targets": {
"custom_key": "custom_value"
}
}
}
]
}
Field support by platform

QuickBooks Online

QuickBooks Online

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

file_urlString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

Sage Business Cloud Accounting

Sage Business Cloud Accounting

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

Xero

Xero

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

file_urlString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString
Hint: Use the /linked-accounts endpoint to pull platform support information.
POST

/attachments

Creates an AccountingAttachment object with the given values.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


is_debug_modeBoolean
Optional
Whether to include debug fields (such as log file links) in the response.

run_asyncBoolean
Optional
Whether or not third-party updates should be run asynchronously.

Body Parameters


modelObject
Required
Find available fields below under “Model Parameters”.

Model Parameters


file_nameString
Optional
The attachment's name.

file_urlString
Optional
The attachment's url.

companyString
Optional
The company the accounting attachment belongs to. Must pass in a valid Merge ID, which can be obtained from the id field in the Company table.

integration_paramsObject
Optional

linked_account_paramsObject
Optional

POST v1/attachments
JSON
{
"model": {
"file_name": "invoice.png",
"file_url": "https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png",
"company": "595c8f97-2ac4-45b7-b000-41bdf43240b5"
}
}
Response
JSON
{
"model": {
"id": "ecbe05ac-62a3-46c5-ab31-4b478b37d1b4",
"remote_id": "1018270",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
],
"file_name": "invoice.png",
"file_url": "https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png",
"company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
"remote_was_deleted": true,
"field_mappings": {
"organization_defined_targets": {
"custom_key": "custom_value"
},
"linked_account_defined_targets": {
"custom_key": "custom_value"
}
}
},
"warnings": [
{
"source": {
"pointer": "/age"
},
"title": "Unrecognized Field",
"detail": "An unrecognized field, age, was passed in with request data.",
"problem_type": "UNRECOGNIZED_FIELD"
}
],
"errors": [
{
"source": {
"pointer": "/model/custom_fields"
},
"title": "Missing Required Field",
"detail": "custom_fields is a required field on model.",
"problem_type": "MISSING_REQUIRED_FIELD"
}
],
"logs": [
{
"log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
"dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
"log_summary": {
"url": "https://harvest.greenhouse.io/v1/candidates/",
"method": "POST",
"status_code": 200
}
}
]
}
Field support by platform

Xero

Xero

Merge supports Passthrough Requests to this platform's API

Supported POST Body Parameters


file_nameString
Required

file_urlString
Required

remote_idString
Optional

Additional POST Parameters


integration_paramsObject
Required
transactionString
Required
transaction_nameString
Required
FreshBooks

FreshBooks

Coming Soon
NetSuite

NetSuite

Coming Soon
QuickBooks Online

QuickBooks Online

Coming Soon
Sage Intacct

Sage Intacct

Coming Soon
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET

/attachments/{id}

Returns an AccountingAttachment object with the given id.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.

Query & Path Parameters


idString
Required

include_remote_dataBoolean
Optional
Whether to include the original data Merge fetched from the third-party to produce these models.
Response
JSON
{
"id": "ecbe05ac-62a3-46c5-ab31-4b478b37d1b4",
"remote_id": "1018270",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
],
"file_name": "invoice.png",
"file_url": "https://merge-brand.s3.amazonaws.com/20210315/rect-logo-270x80%402x.png",
"company": "595c8f97-2ac4-45b7-b000-41bdf43240b5",
"remote_was_deleted": true,
"field_mappings": {
"organization_defined_targets": {
"custom_key": "custom_value"
},
"linked_account_defined_targets": {
"custom_key": "custom_value"
}
}
}
Field support by platform

QuickBooks Online

QuickBooks Online

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

file_urlString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

Sage Business Cloud Accounting

Sage Business Cloud Accounting

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

Xero

Xero

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

file_urlString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString
Hint: Use the /linked-accounts endpoint to pull platform support information.
GET

/attachments/meta/post

Returns metadata for AccountingAttachment POSTs.


Header Parameters


AuthorizationString
Required
Token-based authentication with required prefix "Bearer"

X-Account-TokenString
Required
Token identifying the end user.
Response
JSON
{
"request_schema": {},
"status": {
"linked_account_status": "string",
"can_make_request": true
},
"has_conditional_params": true,
"has_required_linked_account_params": true
}
Field support by platform

QuickBooks Online

QuickBooks Online

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

file_urlString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

Sage Business Cloud Accounting

Sage Business Cloud Accounting

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString

Xero

Xero

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


file_nameString

file_urlString

remote_dataRemoteData[]
pathstring
dataobject

remote_idString
Hint: Use the /linked-accounts endpoint to pull platform support information.