Smileline
ReferenceLedgerLedgerPatientidAllocate

Allocate money already on the account

Spends the account's free money — payments and credits not held for anything: never a booking deposit, an insurer's money or a credit held for a plan or named treatment, never a row the practice management system synced — on its open charges and carried balances, oldest first, credit moved out of the account counting as spent first. With `invoiceId` only that issued invoice's charges are paid, with `chargeEntryIds` only those; a charge the practice management system synced is never paid. Money pays only charges of its own legal entity and currency; in a US practice the insurer's expected part of a treatment is left for the insurer, and a treatment whose insurer part is unknown, or a carried balance, is not paid. Each allocation is dated today at the money's own site. No money comes in or goes out, so a retry pays only what is still open with what is still free: `allocatedCents` 0 means nothing was left to allocate and nothing was written. A patient who has moved to another account since `expectedAccountId` answers 409 ACCOUNT_CHANGED and nothing is written. With `fromEntryId` only that payment pays — what it has left once credit moved out of the account is netted over all the account's free money, at most `amountCents` — and `note` is kept on what it pays: a payment that is not live, free, native and on this account, or that may not pay a named charge (another legal entity's), is 409 ALLOCATE_SOURCE_REFUSED; a day inside a period the payment's site closed is 409 PERIOD_CLOSED. `amountCents` needs `fromEntryId` and `requestId`. Under one `requestId` the same request answers what it paid and writes nothing; a different request is 409 REQUEST_REUSED.

Loading the API reference…