Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsCreate Ledger Entry
Search the full API reference Esc to close

Create Ledger Entry

Ledgers · REST API reference

Get support
POST/v1/ledgers/{ledger_id}/entries

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request POST \
  --url 'https://api.staging.facily.ai/v1/ledgers/<LEDGER_ID>/entries' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "string",
  "effective_date": "2026-10-29",
  "entry_type": "charge",
  "subtotal": 0,
  "discount_amount": "0.00",
  "due_date": "2026-10-29",
  "override_soft_closed": false,
  "period_end": "2026-10-29",
  "period_start": "2026-10-29",
  "reference_id": "00000000-0000-4000-8000-000000000001",
  "reference_type": "string",
  "tax_amount": "0.00"
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

ledger_idpath · stringrequired

Format: uuid

Request body

application/json · Required

descriptionstringrequired

Max length: 255

discount_amountnumber | string

Default: "0.00" · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)

Show discount_amount schema
number | string
Variant 1: number
number
Variant 2: string
string
due_datestring | null

Format: date

Show due_date schema
string | null
Variant 1: string
string
Variant 2: null
null
effective_datestringrequired

Format: date

entry_typestringrequired

Values: "charge", "credit", "adjustment", "write_off"

override_soft_closedboolean

Default: false

period_endstring | null

Format: date

Show period_end schema
string | null
Variant 1: string
string
Variant 2: null
null
period_startstring | null

Format: date

Show period_start schema
string | null
Variant 1: string
string
Variant 2: null
null
reference_idstring | null

Format: uuid

Show reference_id schema
string | null
Variant 1: string
string
Variant 2: null
null
reference_typestring | null

Max length: 30

Show reference_type schema
string | null
Variant 1: string
string
Variant 2: null
null
subtotalnumber | stringrequired

Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)

Show subtotal schema
number | string
Variant 1: number
number
Variant 2: string
string
tax_amountnumber | string

Default: "0.00" · Pattern: ^(?!^[-+.]*$)[+-]?0*(?:\d{0,8}|(?=[\d.]{1,11}0*$)\d{0,8}\.\d{0,2}0*$)

Show tax_amount schema
number | string
Variant 1: number
number
Variant 2: string
string

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

200Successful Response
JSON · generated example
{
  "data": {
    "amount": "<VALUE_MATCHING_PATTERN>",
    "created_at": "2026-10-29T12:00:00Z",
    "description": "string",
    "discount_amount": "<VALUE_MATCHING_PATTERN>",
    "effective_date": "2026-10-29",
    "entry_type": "string",
    "id": "00000000-0000-4000-8000-000000000001",
    "running_balance": "<VALUE_MATCHING_PATTERN>",
    "subtotal": "<VALUE_MATCHING_PATTERN>",
    "tax_amount": "<VALUE_MATCHING_PATTERN>",
    "created_by": {
      "display_name": "string",
      "email": "string",
      "id": "00000000-0000-4000-8000-000000000001"
    },
    "due_date": "2026-10-29"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataLedgerEntryResponserequired
Show data schema
amountstringrequired

Net amount of this entry, after discount and including tax. This is the figure that moves the balance.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

created_atstringrequired

When the entry was written.

Format: date-time

created_byUserCompactResponse | null

The user who caused the entry, where a person did.

Show created_by schema
UserCompactResponse | null

The user who caused the entry, where a person did.

Variant 1: UserCompactResponse
display_namestringrequired
emailstringrequired
idstringrequired

Format: uuid

Variant 2: null
null
descriptionstringrequired

Human-readable line description, as it appears on an invoice or statement.

discount_amountstringrequired

Discount applied to this line, as a positive number.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

due_datestring | null

Business date payment is due, for entries that are charges.

Format: date

Show due_date schema
string | null

Business date payment is due, for entries that are charges.

Variant 1: string
string
Variant 2: null
null
effective_datestringrequired

Business date the entry takes effect, in the facility's timezone. This drives period allocation, not created_at.

Format: date

entry_typestringrequired

What this entry represents, for example rent, fee, tax, payment, or credit.

idstringrequired

Unique identifier for this ledger entry.

Format: uuid

invoice_numberstring | null

The invoice this entry was billed on, where one has been issued.

Show invoice_number schema
string | null

The invoice this entry was billed on, where one has been issued.

Variant 1: string
string
Variant 2: null
null
period_endstring | null

Last day of the service period this entry covers.

Format: date

Show period_end schema
string | null

Last day of the service period this entry covers.

Variant 1: string
string
Variant 2: null
null
period_startstring | null

First day of the service period this entry covers.

Format: date

Show period_start schema
string | null

First day of the service period this entry covers.

Variant 1: string
string
Variant 2: null
null
reference_idstring | null

Identifier of the record named by reference_type.

Format: uuid

Show reference_id schema
string | null

Identifier of the record named by reference_type.

Variant 1: string
string
Variant 2: null
null
reference_typestring | null

The kind of record that produced this entry, for example a payment or a fee rule.

Show reference_type schema
string | null

The kind of record that produced this entry, for example a payment or a fee rule.

Variant 1: string
string
Variant 2: null
null
running_balancestringrequired

Account balance immediately after this entry was posted. Because entries are never modified, this lets a balance be reconstructed as at any point in time.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

sourcestring | null

What originated the entry, for example an automated billing run or a staff action.

Show source schema
string | null

What originated the entry, for example an automated billing run or a staff action.

Variant 1: string
string
Variant 2: null
null
subtotalstringrequired

Line amount before tax and discount.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

tax_amountstringrequired

Tax charged on this line.

Pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$

voided_entry_idstring | null

When this entry reverses another, the entry it reverses. Ledger entries are never edited or deleted: a correction is a void plus a replacement, so the history stays intact.

Format: uuid

Show voided_entry_id schema
string | null

When this entry reverses another, the entry it reverses. Ledger entries are never edited or deleted: a correction is a void plus a replacement, so the history stays intact.

Variant 1: string
string
Variant 2: null
null
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll ledgers operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Create Ledger Entry | Facily Developers