Post the exact mirror, linked and once-only
Posts the exact mirror of a transaction - same accounts, same amounts, opposite directions - and links the two, so the original stays in the books and the correction is visible as a correction.
/v1/ledgers/{ledgerId}/transactions/{txnId}/reversePosts the exact mirror of a transaction - same accounts, same amounts, opposite directions - and links the two, so the original stays in the books and the correction is visible as a correction. Once only: a second attempt refuses with conflict (409), backstopped by a partial unique index against a concurrent race. Requires an Idempotency-Key. effective_at defaults to now, so a reversal lands in today's period unless you say otherwise, and a date inside a closed period refuses with period_closed. A transaction belonging to an exchange group refuses as invalid.
Authorization
bearerAuth In: header
Path Parameters
uuiduuidHeader 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/transactions/497f6eca-6276-4993-bfeb-53cbbbba6f08/reverse" \ -H "Idempotency-Key: string" \ -H "Content-Type: application/json" \ -d '{}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "string", "status": "string", "reference_id": "97c1ff22-6e4f-4821-b1d3-5236781d37b8", "metadata": { "property1": "string", "property2": "string" }, "exchange_id": "6e73ee7b-fdf3-44c2-947d-260c3ee72506", "reverses_txn_id": "5b70dad8-f43f-45eb-afbd-821f57facc93", "reversed_by": "69b6d93a-63e5-4842-b5ef-0ace8f62b2a4", "legs": [ { "owner_type": "string", "owner_id": "8826ee2e-7933-4665-aef2-2393f84a0d05", "purpose": "string", "direction": "credit", "amount": 0, "commodity": "string" } ], "effective_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z"}