auto_write
general

Undo a declaration: put the field back to the value it had before this app wrote it.

Changed on

The declaration lapses now instead of at its expires_at, and the reconciler writes back the value it read from the platform before this app's write. will_restore says whether such a value was captured: a declaration that was never applied has nothing to undo and closes without a write. The declaration's status reads state reverted once the restore is written, and last_error says if the platform refused it. A declaration mid-write answers 409 in_flight; retry shortly. If someone else has changed the field since it was applied and the merchant has not settled it, the answer is 409 overwritten_externally and nothing is reverted: release instead to leave their change. Only the declaring app can revert.

post/api/v1/intent/revert

Request

  • Base URL
    https://app.magistry.io
  • Auth
    • HTTP bearer
    • or OAuth 2
      Authorization codehttps://app.magistry.io/api/oauth/authorize
      Token URLhttps://app.magistry.io/api/oauth/token
      Scopeswrite

Headers

Idempotency-Key, string

Optional; honoured when sent. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.

Request body

object required
intent_id, string uuid required

The id intent_declare returned.

reason, string
idempotency_key, string

Optional. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.

Response

Result

object required
ok, boolean required
result, unknown required

Changes

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    • warning

      added the new method_not_allowed enum value to the error response property for the response status

    11 more changes in this revision