curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/{customAccountId}/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transactions": [
{
"external_id": "custom-transaction-id-1234",
"amount": 123,
"direction": "CREDIT",
"date": "2023-11-07T05:31:56Z",
"merchant_name": "My example merchant",
"merchant_category_code": "4072",
"description": "Original description",
"display_description": "Current description to display with details",
"currency_code": "USD",
"balance": 123,
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
],
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>"
}
]
}
'{
"type": "{}"
}Imports transactions for a custom account. This action will import transactions from the specified start date to the present. If the account has already been imported, this action will overwrite the existing transactions.
curl --request POST \
--url https://sandbox.layerfi.com/v1/businesses/{businessId}/custom-accounts/{customAccountId}/transactions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"transactions": [
{
"external_id": "custom-transaction-id-1234",
"amount": 123,
"direction": "CREDIT",
"date": "2023-11-07T05:31:56Z",
"merchant_name": "My example merchant",
"merchant_category_code": "4072",
"description": "Original description",
"display_description": "Current description to display with details",
"currency_code": "USD",
"balance": 123,
"tags": [
{
"key": "department",
"value": "sales",
"dimension_display_name": "Department",
"value_display_name": "Sales Department"
}
],
"memo": "<string>",
"metadata": {
"custom_field": "value",
"any valid json": "below 1kb",
"nested": {
"meaning of life": 42,
"array": []
}
},
"reference_number": "<string>"
}
]
}
'{
"type": "{}"
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Content-Type must be set to application/json
The UUID of the business to import transactions for.
The UUID of the custom account to import transactions for.
List of new transactions to import
Show child attributes
Unique ID of the custom transaction in an external system for linking and idempotency.
"custom-transaction-id-1234"
Amount of the external transaction, in cents.
Direction of the custom transaction
CREDIT, DEBIT The date that the custom transaction occurred. ISO 8601 format required.
Counterparty name for the custom transaction
"My example merchant"
MCC for the custom transaction
"4072"
Original description for the custom transaction
"Original description"
Description to display to users which can include enrichment beyond.
"Current description to display with details"
Currency code that the custom transaction's amount is denominated in
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYR, BZD, CAD, CDF, CHF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GGP, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, IMP, INR, IQD, IRR, ISK, JEP, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRO, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLL, SOS, SPL, SRD, STD, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TVD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VEF, VND, VUV, WST, XAF, XCD, XDR, XOF, XPF, YER, ZAR, ZMW, ZWD "USD"
Balance for the custom account after the transaction in cents.
Show child attributes
The tag dimension key (e.g., "department", "project", "location")
"department"
The tag value (e.g., "sales", "marketing", "engineering")
"sales"
If the TagDimension doesn't exist, providing this value specifies the display name upon database insertion. Otherwise, it is left as null on the TagDimension.
"Department"
If the TagValueDefinition doesn't exist, providing this value specifies the display name upon database insertion. Otherwise, it is left as null on the TagValueDefinition.
"Sales Department"
Memo for any text you would like to associate with the transaction (for example, to display to end users).
Arbitrary custom metadata in JSON format with a size limit of 1KB
{
"custom_field": "value",
"any valid json": "below 1kb",
"nested": { "meaning of life": 42, "array": [] }
}Any (typically user-visible) identifier you would like to associate with the custom transaction. Can be used to filter when listing bank transactions.
Resource type. Value will be 'com.layerfi.controllers.EmptyResponse'.
"{}"