Store a posting the service executes at its effective moment
Stores a posting the service will execute itself at post_at, rather than asking the caller to stay alive until then.
/v1/ledgers/{ledgerId}/scheduled-postingsStores a posting the service will execute itself at post_at, rather than asking the caller to stay alive until then. Requires an Idempotency-Key, which covers the scheduling, not the eventual execution. The sweeper running under ledgerd serve picks the row up on or after its moment and posts it through the ordinary posting path, so every refusal above applies then. A refusal the books will never take - unbalanced, frozen, a closed period, a failed precondition - is terminal and lands the schedule in failed with last_error set; infrastructure trouble is simply retried on the next sweep.
Authorization
bearerAuth In: header
Path Parameters
uuidHeader Parameters
Replays return the original response byte-identically within the retention window.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://example.com/v1/ledgers/497f6eca-6276-4993-bfeb-53cbbbba6f08/scheduled-postings" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{ "post_at": "2019-08-24T14:15:22Z", "posting": { "type": "string", "legs": [ { "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65", "direction": "credit", "amount": 1, "commodity": "string" }, { "account_id": "449e7a5c-69d3-4b8a-aaaf-5c9b713ebc65", "direction": "credit", "amount": 1, "commodity": "string" } ] } }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "post_at": "2019-08-24T14:15:22Z", "status": "scheduled", "txn_id": "3dd6ecc9-94bf-4fc7-98ae-cdbe5b6f62e4", "last_error": "string", "created_at": "2019-08-24T14:15:22Z", "ended_at": "2019-08-24T14:15:22Z"}Opening, movement, and closing per account for one period
Opening balance, movement and closing balance per account for one closed period, computed from that period's checkpoints.
Read one schedule, whatever its state
Reads one schedule in any state - scheduled, posted, failed or cancelled - with txn_id once it has posted and last_error when it failed.