Expenses

The Expense object is used to represent a direct purchase by a business, typically made with a check, credit card, or cash. Each Expense object is dedicated to a grouping of expenses, with each expense recorded in the lines object.

The Expense object is used also used to represent refunds to direct purchases. Refunds can be distinguished from purchases by the amount sign of the records. Expense objects with a negative amount are purchases and Expense objects with a positive amount are refunds to those purchases.

Properties

idUUID
Required

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

created_atDateTime (ISO 8601)
Required
The datetime that this object was created by Merge.

modified_atDateTime (ISO 8601)
Required
The datetime that this object was modified by Merge.

transaction_dateDateTime (ISO 8601)
Optional
When the transaction occurred.

remote_created_atDateTime (ISO 8601)
Optional
When the expense was created.

accountUUID
Optional
The expense's payment account.

contactUUID
Optional
The expense's contact.

total_amountNumber
Optional
The expense's total amount.

sub_totalNumber
Optional
The expense's total amount before tax.

total_tax_amountNumber
Optional
The expense's total tax amount.

currencyEnum
Optional
The expense'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. In cases where there is no clear mapping, the original value passed through will be returned.

exchange_rateString
Optional
The expense's exchange rate.

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

companyUUID
Optional
The company the expense belongs to.

memoString
Optional
The expense's private note.

linesExpenseLine[]
Required
The ExpenseLine object
The ExpenseLine object is used to represent an expense's line items.
Properties

idUUID
Required

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

created_atDateTime (ISO 8601)
Required
The datetime that this object was created by Merge.

modified_atDateTime (ISO 8601)
Required
The datetime that this object was modified by Merge.

itemUUID
Optional
The line's item.

net_amountNumber
Optional
The line's net amount.

tracking_categoriesArray
Required
The expense line item's associated tracking categories.

companyUUID
Optional
The company the line belongs to.

currencyEnum
Optional
The expense line item'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. In cases where there is no clear mapping, the original value passed through will be returned.

accountUUID
Optional
The expense's payment account.

contactUUID
Optional
The expense's contact.

descriptionString
Optional
The description of the item that was purchased by the company.

exchange_rateString
Optional
The expense line item's exchange rate.

tax_rateUUID
Optional
The tax rate that applies to this line item.

remote_was_deletedBoolean
Required
Indicates whether or not this object has been deleted in the third party platform.

tracking_categoriesArray
Required

remote_was_deletedBoolean
Required
Indicates whether or not this object has been deleted in the third party platform.

accounting_periodUUID
Optional
The accounting period that the Expense was generated in.

field_mappingsObject
Optional

remote_dataRemoteData[]
Optional

remote_fieldsRemoteField[]
Required


GET
/expenses

https://api.merge.dev/api/accounting/v1/expenses

US
EU
APAC

Returns a list of Expense objects.


Query & Path Parameters

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

created_afterDateTime (ISO 8601)
Optional
If provided, will only return objects created after this datetime.

created_beforeDateTime (ISO 8601)
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 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.

include_remote_fieldsBoolean
Optional
Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

modified_afterDateTime (ISO 8601)
Optional
If provided, only objects synced by Merge after this date time will be returned.

modified_beforeDateTime (ISO 8601)
Optional
If provided, only objects synced by Merge before this date time will be returned.

page_sizeInteger
Optional
Number of results to return per page.

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

transaction_date_afterDateTime (ISO 8601)
Optional
If provided, will only return objects created after this datetime.

transaction_date_beforeDateTime (ISO 8601)
Optional
If provided, will only return objects created before this datetime.

Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
FreeAgent
FreeAgent
NetSuite
NetSuite
QuickBooks Online
QuickBooks Online
Sage Intacct
Sage Intacct
Xero
Xero
Zoho Books
Zoho Books
FreshBooks
FreshBooks
Coming soon
POST
/expenses

https://api.merge.dev/api/accounting/v1/expenses

US
EU
APAC

Creates an Expense object with the given values.


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
View app-specific writable fields under “Field support by platform” in this section.

transaction_dateDateTime (ISO 8601)
When the transaction occurred.

accountUUID
The expense's payment account. Must pass in a valid Merge ID, which can be obtained from the id field in the Account object.

contactUUID
The expense's contact. Must pass in a valid Merge ID, which can be obtained from the id field in the Contact object.

total_amountNumber
The expense's total amount.

sub_totalNumber
The expense's total amount before tax.

total_tax_amountNumber
The expense's total tax amount.

currencyEnum
The expense'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.

exchange_rateString
The expense's exchange rate.

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

companyUUID
The company the expense belongs to. Must pass in a valid Merge ID, which can be obtained from the id field in the CompanyInfo object.

memoString
The expense's private note.

linesArray

tracking_categoriesArray

accounting_periodUUID
The accounting period that the Expense was generated in. Must pass in a valid Merge ID, which can be obtained from the id field in the AccountingPeriod object.

integration_paramsObject

linked_account_paramsObject

remote_fieldsArray

Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
NetSuite
NetSuite
QuickBooks Online
QuickBooks Online
Sage Intacct
Sage Intacct
Xero
Xero
FreshBooks
FreshBooks
Coming soon
To include the correct model fields when making POST requests, use the GET /expenses/meta/post endpoint. Learn more in our /meta guide.
GET
/expenses/{id}

https://api.merge.dev/api/accounting/v1/expenses/{id}

US
EU
APAC

Returns an Expense object with the given id.


Query & Path Parameters

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

idUUID
Required

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

include_remote_fieldsBoolean
Optional
Whether to include all remote fields, including fields that Merge did not map to common models, in a normalized format.

Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
FreeAgent
FreeAgent
NetSuite
NetSuite
QuickBooks Online
QuickBooks Online
Sage Intacct
Sage Intacct
Xero
Xero
Zoho Books
Zoho Books
FreshBooks
FreshBooks
Coming soon
GET
/expenses/lines/remote-field-classes
Beta

https://api.merge.dev/api/accounting/v1/expenses/lines/remote-field-classes

US
EU
APAC

Returns a list of RemoteFieldClass objects.


Query & Path Parameters

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.

is_common_model_fieldBoolean
Optional
If provided, will only return remote field classes with this is_common_model_field value

page_sizeInteger
Optional
Number of results to return per page.

GET
/expenses/meta/post

https://api.merge.dev/api/accounting/v1/expenses/meta/post

US
EU
APAC

Returns metadata for Expense POSTs.


Field support by integration
See all supported fields
Use the /linked-accounts endpoint to pull platform support information
NetSuite
NetSuite
QuickBooks Online
QuickBooks Online
Sage Intacct
Sage Intacct
Xero
Xero
FreshBooks
FreshBooks
Coming soon
GET
/expenses/remote-field-classes
Beta

https://api.merge.dev/api/accounting/v1/expenses/remote-field-classes

US
EU
APAC

Returns a list of RemoteFieldClass objects.


Query & Path Parameters

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.

is_common_model_fieldBoolean
Optional
If provided, will only return remote field classes with this is_common_model_field value

page_sizeInteger
Optional
Number of results to return per page.