Skip to main content

Verify a manager PIN

POST 

/approvals/pin

Checks a manager PIN for one paid order and returns an approval_token to send with the return, refund or exchange. This call takes no Idempotency-Key.

Before you call​

  • The acting user needs an open shift.
  • Never store or log the PIN.

Request​

  • Leave approver_id out to accept any approver of the outlet whose PIN matches.

Behaviour​

  • The token is valid for 5 minutes, for this order_id and the acting user only, covers the listed cancellation_types, and works once.
  • After 3 wrong PINs for the same order and gate_reason at the outlet, by any user, the check is locked for 15 minutes.

Errors​

StatusCodeWhen
400VALIDATION_FAILEDThe body is not valid.
400USER_ID_REQUIREDX-User-ID is missing.
403PIN_INVALIDA wrong PIN; see data.attempts_remaining.
403OTP_REQUIREDThe outlet needs a one-time code and no PIN fallback is open.
403PERMISSION_DENIEDThe acting user may not do this.
403OUTLET_FORBIDDENThe outlet is not allowed.
404NOT_FOUNDThe order_id is not an order of the outlet in X-Outlet-ID.
409PIN_LOCKEDThe check is locked; see data.unlock_at.
409SHIFT_NOT_OPENThe acting user has no open shift.
422INVALID_USERThe acting user is not valid.

Request​

Responses​

The approval grant