Skip to main content
POST
/
v1
/
businesses
/
{businessId}
/
ledger
/
journal-entries
Create journal entry
curl --request POST \
  --url https://sandbox.layerfi.com/v1/businesses/{businessId}/ledger/journal-entries \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "external_id": "example-external-id",
  "entry_at": "2023-11-07T05:31:56Z",
  "created_by": "jsmith",
  "memo": "Example debit/credit entry",
  "line_items": [
    {
      "account_identifier": {
        "type": "AccountId",
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      },
      "amount": 123,
      "direction": "CREDIT",
      "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "customer_external_id": null,
      "tags": [
        {
          "key": "Location",
          "value": "MainStreet"
        }
      ]
    },
    {
      "account_identifier": {
        "type": "AccountId",
        "id": "db7fb036-5691-4354-a057-cba1836c042a"
      },
      "amount": 123,
      "direction": "DEBIT",
      "customer_id": null,
      "customer_external_id": null,
      "tags": []
    }
  ],
  "customer_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customer_external_id": "customer-1",
  "tags": [
    {
      "key": "Location",
      "value": "MainStreet"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_by": "<string>",
  "memo": "<string>",
  "entry_id": "<string>",
  "customer": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "31415926535",
    "individual_name": "<string>",
    "company_name": "<string>",
    "email": "<string>",
    "mobile_phone": "<string>",
    "office_phone": "<string>",
    "address_string": "<string>",
    "memo": "<string>",
    "status": "ACTIVE",
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "value": "ExampleTagValue",
        "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "dimension_display_name": "<string>",
        "value_display_name": "<string>",
        "archived_at": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "vendor": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "external_id": "<string>",
    "individual_name": "<string>",
    "company_name": "<string>",
    "email": "<string>",
    "mobile_phone": "<string>",
    "office_phone": "<string>",
    "address_string": "<string>",
    "memo": "<string>",
    "status": "ACTIVE",
    "transaction_tags": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "ExampleTagKey",
        "value": "ExampleTagValue",
        "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "dimension_display_name": "<string>",
        "value_display_name": "<string>",
        "archived_at": "2023-11-07T05:31:56Z"
      }
    ]
  },
  "transaction_tags": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "key": "ExampleTagKey",
      "value": "ExampleTagValue",
      "dimension_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "definition_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "dimension_display_name": "<string>",
      "value_display_name": "<string>",
      "archived_at": "2023-11-07T05:31:56Z"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.layerfi.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Content-Type
string

Content-Type must be set to application/json.

Path Parameters

businessId
string
required

The UUID of the business to create the journal entry for.

Body

application/json
entry_at
string<date-time>
required

The date and time when the entry should be recorded effective in the ledger, in ISO 8601 format.

created_by
string
required

Identifier of the user or system that created the manual entry.

memo
string
required

Description or memo of the manual entry.

line_items
object[]
required
external_id
string

Unique ID of the ledger entry in your system. Idempotency key..

customer_id
string<uuid>

Layer customer ID to associate with the ledger entry. Customer IDs can be specified on the entry or on individual line items, but not both.

customer_external_id
string

External ID of the Layer customer to associate with the ledger entry. Can be specified in place of the Layer customer ID. Customer IDs can be specified on the entry or on individual line items, but not both.

Example:

"customer-1"

vendor_id
string<uuid>

Layer vendor ID to associate with the ledger entry. Vendor IDs can be specified on the entry or on individual line items, but not both.

vendor_external_id
string

External ID of the Layer vendor to associate with the ledger entry. Can be specified in place of the Layer vendor ID. Vendor IDs can be specified on the entry or on individual line items, but not both.

Example:

"vendor-1"

tags
object[]

Response

id
string<uuid>

Universally unique identifier of the manual ledger entry.

created_by
string

Name of the user who created the manual ledger entry.

memo
string

Memo or description for the manual ledger entry.

entry_id
string

ID of the associated ledger entry.

customer
object
vendor
object
transaction_tags
object[]