Invoices

The Invoice object is used to represent a company's invoices.

The Invoice object

Properties


idString
Required

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

typeEnum
Optional
The invoice's type. Possible values include: ACCOUNTS_RECEIVABLE, ACCOUNTS_PAYABLE, or - in cases where there is no clear mapping - the original value passed through.

contactString
Optional

numberString
Optional
The invoice's number.

issue_dateString
Optional
The invoice's issue date.

due_dateString
Optional
The invoice's due date.

paid_on_dateString
Optional
The invoice's paid date.

memoString
Optional
The invoice's private note.

currencyEnum
Optional
The invoice's currency. Possible values include: XUA, AFN, AFA, ALL, ALK, DZD, ADP, AOA, AOK, AON, AOR, ARA, ARS, ARM, ARP, ARL, AMD, AWG, AUD, ATS, AZN, AZM, BSD, BHD, BDT, BBD, BYN, BYB, BYR, BEF, BEC, BEL, BZD, BMD, BTN, BOB, BOL, BOV, BOP, BAM, BAD, BAN, BWP, BRC, BRZ, BRE, BRR, BRN, BRB, BRL, GBP, BND, BGL, BGN, BGO, BGM, BUK, BIF, XPF, KHR, CAD, CVE, KYD, XAF, CLE, CLP, CLF, CNX, CNY, CNH, COP, COU, KMF, CDF, CRC, HRD, HRK, CUC, CUP, CYP, CZK, CSK, DKK, DJF, DOP, NLG, XCD, DDM, ECS, ECV, EGP, GQE, ERN, EEK, ETB, EUR, XBA, XEU, XBB, XBC, XBD, FKP, FJD, FIM, FRF, XFO, XFU, GMD, GEK, GEL, DEM, GHS, GHC, GIP, XAU, GRD, GTQ, GWP, GNF, GNS, GYD, HTG, HNL, HKD, HUF, IMP, ISK, ISJ, INR, IDR, IRR, IQD, IEP, ILS, ILP, ILR, ITL, JMD, JPY, JOD, KZT, KES, KWD, KGS, LAK, LVL, LVR, LBP, LSL, LRD, LYD, LTL, LTT, LUL, LUC, LUF, MOP, MKD, MKN, MGA, MGF, MWK, MYR, MVR, MVP, MLF, MTL, MTP, MRU, MRO, MUR, MXV, MXN, MXP, MDC, MDL, MCF, MNT, MAD, MAF, MZE, MZN, MZM, MMK, NAD, NPR, ANG, TWD, NZD, NIO, NIC, NGN, KPW, NOK, OMR, PKR, XPD, PAB, PGK, PYG, PEI, PEN, PES, PHP, XPT, PLN, PLZ, PTE, GWE, QAR, XRE, RHD, RON, ROL, RUB, RUR, RWF, SVC, WST, SAR, RSD, CSD, SCR, SLL, XAG, SGD, SKK, SIT, SBD, SOS, ZAR, ZAL, KRH, KRW, KRO, SSP, SUR, ESP, ESA, ESB, XDR, LKR, SHP, XSU, SDD, SDG, SDP, SRD, SRG, SZL, SEK, CHF, SYP, STN, STD, TVD, TJR, TJS, TZS, XTS, THB, XXX, TPE, TOP, TTD, TND, TRY, TRL, TMT, TMM, USD, USN, USS, UGX, UGS, UAH, UAK, AED, UYW, UYU, UYP, UYI, UZS, VUV, VES, VEB, VEF, VND, VNN, CHE, CHW, XOF, YDD, YER, YUN, YUD, YUM, YUR, ZWN, ZRN, ZRZ, ZMW, ZMK, ZWD, ZWR, ZWL, or - in cases where there is no clear mapping - the original value passed through.

total_discountNumber
Optional
The invoice's total discount.

sub_totalNumber
Optional
The invoice's sub-total.

total_tax_amountNumber
Optional
The invoice's total tax amount.

total_amountNumber
Optional
The invoice's total amount.

balanceNumber
Optional
The invoice's remaining balance.

remote_updated_atString
Optional
When the third party's invoice entry was updated.

paymentsArray
Required
Array of Payment object IDs.

line_itemsInvoiceLineItem[]
Required

The InvoiceLineItem object

The InvoiceLineItem object is used to represent an invoice's line items.
{
"id": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"remote_id": "8765432",
"description": "Pickleball lessons",
"unit_price": 50,
"quantity": 1,
"total_amount": 50,
"item": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
"account": "cd0f32d4-a493-11ec-b909-0242ac120002",
"tracking_category": "b38c59b0-a9d7-4740-b1ee-5436c6751e3d"
}

Properties


idString
Required

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

descriptionString
Optional
The line item's description.

unit_priceNumber
Optional
The line item's unit price.

quantityNumber
Optional
The line item's quantity.

total_amountNumber
Optional
The line item's total amount.

itemString
Optional

accountString
Optional

tracking_categoryString
Optional

remote_was_deletedBoolean
Required

The Invoice object
JSON
{
"id": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46",
"remote_id": "990110",
"type": "ACCOUNTS_RECEIVABLE",
"contact": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"number": "AIQ12546",
"issue_date": "2020-03-31T00:00:00Z",
"due_date": "2020-04-15T00:00:00Z",
"paid_on_date": "2020-04-01T00:00:00Z",
"memo": "Weekly Payment",
"currency": "USD",
"total_discount": 0,
"sub_total": 100,
"total_tax_amount": 5,
"total_amount": 105,
"balance": 105,
"remote_updated_at": "2020-04-01T00:00:00Z",
"payments": [
"b26fd49a-cbae-470a-a8f8-bcbc119e0390"
],
"line_items": [
{
"id": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"remote_id": "8765432",
"description": "Pickleball lessons",
"unit_price": 50,
"quantity": 2,
"total_amount": 100,
"item": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
]
}
],
"remote_was_deleted": true
}

GET

/invoices

Returns a list of Invoice objects.


Header Parameters


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

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

Query & Path Parameters


contact_idString
Optional
If provided, will only return invoices for this contact.

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.

expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

include_deleted_dataBoolean
Optional
Whether to include data that was deleted in the third-party service.

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.

typeString
Optional
If provided, will only return Invoices with this type

Response
JSON
{
"next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
"previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
"results": [
{
"id": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46",
"remote_id": "990110",
"type": "ACCOUNTS_RECEIVABLE",
"contact": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"number": "AIQ12546",
"issue_date": "2020-03-31T00:00:00Z",
"due_date": "2020-04-15T00:00:00Z",
"paid_on_date": "2020-04-01T00:00:00Z",
"memo": "Weekly Payment",
"currency": "USD",
"total_discount": 0,
"sub_total": 100,
"total_tax_amount": 5,
"total_amount": 105,
"balance": 105,
"remote_updated_at": "2020-04-01T00:00:00Z",
"payments": [
"b26fd49a-cbae-470a-a8f8-bcbc119e0390"
],
"line_items": [
{
"id": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"remote_id": "8765432",
"description": "Pickleball lessons",
"unit_price": 50,
"quantity": 2,
"total_amount": 100,
"item": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
]
}
],
"remote_was_deleted": true
}
]
}
Field support by platform

FreshBooks

FreshBooks

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

due_dateString

issue_dateString

numberString

paid_on_dateString

remote_idString

contactString

total_amountNumber

Zoho Books

Zoho Books

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

due_dateString

issue_dateString

sub_totalNumber

paid_on_dateString

remote_idString

numberString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Sage Business Cloud Accounting

Sage Business Cloud Accounting

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

typeEnum

due_dateString

issue_dateString

sub_totalNumber

numberString

remote_idString

paid_on_dateString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Xero

Xero

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

typeEnum

due_dateString

issue_dateString

sub_totalNumber

numberString

remote_idString

paid_on_dateString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Quickbooks Online

Quickbooks Online

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

typeEnum

due_dateString

issue_dateString

paid_on_dateString

remote_idString

numberString

memoString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Clear Books

Clear Books

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

typeEnum

due_dateString

issue_dateString

numberString

remote_idString

total_tax_amountNumber

remote_updated_atString

total_amountNumber

Netsuite

Netsuite

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


balanceNumber

typeEnum

due_dateString

issue_dateString

sub_totalNumber

numberString

remote_idString

paid_on_dateString

memoString

remote_updated_atString

contactString

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

/invoices

Creates an Invoice 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


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

typeEnum
Optional
The invoice's type. Must pass in one of the following choices: ACCOUNTS_RECEIVABLE, ACCOUNTS_PAYABLE.

contactString
Optional
Must pass in a valid Merge ID, which can be obtained from the id field in the Contact table.

numberString
Optional
The invoice's number.

issue_dateString
Optional
The invoice's issue date.

due_dateString
Optional
The invoice's due date.

paid_on_dateString
Optional
The invoice's paid date.

memoString
Optional
The invoice's private note.

currencyEnum
Optional
The invoice's currency. Must pass in one of the following choices: XUA, AFN, AFA, ALL, ALK, DZD, ADP, AOA, AOK, AON, AOR, ARA, ARS, ARM, ARP, ARL, AMD, AWG, AUD, ATS, AZN, AZM, BSD, BHD, BDT, BBD, BYN, BYB, BYR, BEF, BEC, BEL, BZD, BMD, BTN, BOB, BOL, BOV, BOP, BAM, BAD, BAN, BWP, BRC, BRZ, BRE, BRR, BRN, BRB, BRL, GBP, BND, BGL, BGN, BGO, BGM, BUK, BIF, XPF, KHR, CAD, CVE, KYD, XAF, CLE, CLP, CLF, CNX, CNY, CNH, COP, COU, KMF, CDF, CRC, HRD, HRK, CUC, CUP, CYP, CZK, CSK, DKK, DJF, DOP, NLG, XCD, DDM, ECS, ECV, EGP, GQE, ERN, EEK, ETB, EUR, XBA, XEU, XBB, XBC, XBD, FKP, FJD, FIM, FRF, XFO, XFU, GMD, GEK, GEL, DEM, GHS, GHC, GIP, XAU, GRD, GTQ, GWP, GNF, GNS, GYD, HTG, HNL, HKD, HUF, IMP, ISK, ISJ, INR, IDR, IRR, IQD, IEP, ILS, ILP, ILR, ITL, JMD, JPY, JOD, KZT, KES, KWD, KGS, LAK, LVL, LVR, LBP, LSL, LRD, LYD, LTL, LTT, LUL, LUC, LUF, MOP, MKD, MKN, MGA, MGF, MWK, MYR, MVR, MVP, MLF, MTL, MTP, MRU, MRO, MUR, MXV, MXN, MXP, MDC, MDL, MCF, MNT, MAD, MAF, MZE, MZN, MZM, MMK, NAD, NPR, ANG, TWD, NZD, NIO, NIC, NGN, KPW, NOK, OMR, PKR, XPD, PAB, PGK, PYG, PEI, PEN, PES, PHP, XPT, PLN, PLZ, PTE, GWE, QAR, XRE, RHD, RON, ROL, RUB, RUR, RWF, SVC, WST, SAR, RSD, CSD, SCR, SLL, XAG, SGD, SKK, SIT, SBD, SOS, ZAR, ZAL, KRH, KRW, KRO, SSP, SUR, ESP, ESA, ESB, XDR, LKR, SHP, XSU, SDD, SDG, SDP, SRD, SRG, SZL, SEK, CHF, SYP, STN, STD, TVD, TJR, TJS, TZS, XTS, THB, XXX, TPE, TOP, TTD, TND, TRY, TRL, TMT, TMM, USD, USN, USS, UGX, UGS, UAH, UAK, AED, UYW, UYU, UYP, UYI, UZS, VUV, VES, VEB, VEF, VND, VNN, CHE, CHW, XOF, YDD, YER, YUN, YUD, YUM, YUR, ZWN, ZRN, ZRZ, ZMW, ZMK, ZWD, ZWR, ZWL.

total_discountNumber
Optional
The invoice's total discount.

sub_totalNumber
Optional
The invoice's sub-total.

total_tax_amountNumber
Optional
The invoice's total tax amount.

total_amountNumber
Optional
The invoice's total amount.

balanceNumber
Optional
The invoice's remaining balance.

remote_updated_atString
Optional
When the third party's invoice entry was updated.

paymentsArray
Required
Array of Payment object IDs.

Response
JSON
{
"model": {
"id": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46",
"remote_id": "990110",
"type": "ACCOUNTS_RECEIVABLE",
"contact": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"number": "AIQ12546",
"issue_date": "2020-03-31T00:00:00Z",
"due_date": "2020-04-15T00:00:00Z",
"paid_on_date": "2020-04-01T00:00:00Z",
"memo": "Weekly Payment",
"currency": "USD",
"total_discount": 0,
"sub_total": 100,
"total_tax_amount": 5,
"total_amount": 105,
"balance": 105,
"remote_updated_at": "2020-04-01T00:00:00Z",
"payments": [
"b26fd49a-cbae-470a-a8f8-bcbc119e0390"
],
"line_items": [
{
"id": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"remote_id": "8765432",
"description": "Pickleball lessons",
"unit_price": 50,
"quantity": 2,
"total_amount": 100,
"item": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
]
}
],
"remote_was_deleted": true
},
"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


currencyEnum
Optional

balanceNumber
Optional

typeEnum
Required

due_dateString
Optional

issue_dateString
Optional

sub_totalNumber
Optional

numberString
Optional

remote_idString
Optional

total_tax_amountNumber
Optional

remote_updated_atString
Optional

contactString
Required

total_amountNumber
Optional

Quickbooks Online

Quickbooks Online

Merge supports Passthrough Requests to this platform's API

Supported POST Body Parameters


currencyEnum
Optional

balanceNumber
Optional

typeEnum
Optional

due_dateString
Optional

issue_dateString
Optional

numberString
Optional

remote_idString
Optional

paid_on_dateString
Optional

remote_updated_atString
Optional

contactString
Required

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

/invoices/{id}

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


expandString
Optional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.

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": "9871b4a9-f5d2-4f3b-a66b-dfedbed42c46",
"remote_id": "990110",
"type": "ACCOUNTS_RECEIVABLE",
"contact": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"number": "AIQ12546",
"issue_date": "2020-03-31T00:00:00Z",
"due_date": "2020-04-15T00:00:00Z",
"paid_on_date": "2020-04-01T00:00:00Z",
"memo": "Weekly Payment",
"currency": "USD",
"total_discount": 0,
"sub_total": 100,
"total_tax_amount": 5,
"total_amount": 105,
"balance": 105,
"remote_updated_at": "2020-04-01T00:00:00Z",
"payments": [
"b26fd49a-cbae-470a-a8f8-bcbc119e0390"
],
"line_items": [
{
"id": "022a2bef-57e5-4def-8ed2-7c41bd9a5ed8",
"remote_id": "8765432",
"description": "Pickleball lessons",
"unit_price": 50,
"quantity": 2,
"total_amount": 100,
"item": "5b3c1341-a20f-4e51-b72c-f3830a16c97b",
"remote_data": [
{
"path": "/actions",
"data": [
"Varies by platform"
]
}
]
}
],
"remote_was_deleted": true
}
Field support by platform

FreshBooks

FreshBooks

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

due_dateString

issue_dateString

numberString

paid_on_dateString

remote_idString

contactString

total_amountNumber

Zoho Books

Zoho Books

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

due_dateString

issue_dateString

sub_totalNumber

paid_on_dateString

remote_idString

numberString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Sage Business Cloud Accounting

Sage Business Cloud Accounting

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

typeEnum

due_dateString

issue_dateString

sub_totalNumber

numberString

remote_idString

paid_on_dateString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Xero

Xero

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

total_discountNumber

typeEnum

due_dateString

issue_dateString

sub_totalNumber

numberString

remote_idString

paid_on_dateString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Quickbooks Online

Quickbooks Online

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

typeEnum

due_dateString

issue_dateString

paid_on_dateString

remote_idString

numberString

memoString

total_tax_amountNumber

remote_updated_atString

contactString

total_amountNumber

Clear Books

Clear Books

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


currencyEnum

balanceNumber

typeEnum

due_dateString

issue_dateString

numberString

remote_idString

total_tax_amountNumber

remote_updated_atString

total_amountNumber

Netsuite

Netsuite

Merge supports Passthrough Requests to this platform's API

Supported Response Fields


balanceNumber

typeEnum

due_dateString

issue_dateString

sub_totalNumber

numberString

remote_idString

paid_on_dateString

memoString

remote_updated_atString

contactString

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

/invoices/meta/post

Returns metadata for Invoice POSTs.


Header Parameters


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

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