Skip to Content
Ledger opening balances

Create Ledger Opening Balance

Access

Member of the organization with this permission:

  • invoicing:manage-opening-balances

An API key with scopes also needs the permission among its scopes.

POST
/orgs/{organizationId}/customers/{customerId}/ledger-opening-balances

Adds an opening balance on a ledger for a customer. A negative amount that takes a guarded ledger below zero is refused (409, INVOICE_LEDGER_BALANCE_EXCEEDED); a reference the customer already has on that ledger is refused (409, LEDGER_OPENING_BALANCE_REFERENCE_EXISTS). With ledgerBalanceOverride, users with invoicing:override-ledger-balance may take a guarded ledger below zero; the motivation and the violations are recorded on the customer's timeline.

Authorization

ApiKeyAuth
headerx-api-key<token>

API key for authentication

Path Parameters

organizationId*string

The ID or slug of the organization

customerId*string

Request Body

application/json
  1. body
ledger*integer
Range-9007199254740991 <= value <= 9007199254740991
amount*number
asOfDate*string
Formatdate
reference*string
Length1 <= length <= 120
note?|null
ledgerBalanceOverride?

Response Body

OK

application/json
  1. response
Example Request
curl -X POST 'https://api.tillor.eu/orgs//customers/string/ledger-opening-balances' \  -H 'Content-Type: application/json' \  -d '{  "ledger": -9007199254740991,  "amount": 0,  "asOfDate": "2019-08-24",  "reference": "string"}'
Example Response
null