WalletD developers
Scheduled postings

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.

POST/v1/ledgers/{ledgerId}/scheduled-postings

Stores 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
AuthorizationBearer <token>

In: header

Path Parameters

ledgerId*string
Formatuuid

Header Parameters

Idempotency-Key*string

Replays return the original response byte-identically within the retention window.

Length1 <= length <= 255

Request 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"}