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_idout to accept any approver of the outlet whose PIN matches.
Behaviour
- The token is valid for 5 minutes, for this
order_idand the acting user only, covers the listedcancellation_types, and works once. - After 3 wrong PINs for the same order and
gate_reasonat the outlet, by any user, the check is locked for 15 minutes.
Errors
| Status | Code | When |
|---|---|---|
| 400 | VALIDATION_FAILED | The body is not valid. |
| 400 | USER_ID_REQUIRED | X-User-ID is missing. |
| 403 | PIN_INVALID | A wrong PIN; see data.attempts_remaining. |
| 403 | OTP_REQUIRED | The outlet needs a one-time code and no PIN fallback is open. |
| 403 | PERMISSION_DENIED | The acting user may not do this. |
| 403 | OUTLET_FORBIDDEN | The outlet is not allowed. |
| 404 | NOT_FOUND | The order_id is not an order of the outlet in X-Outlet-ID. |
| 409 | PIN_LOCKED | The check is locked; see data.unlock_at. |
| 409 | SHIFT_NOT_OPEN | The acting user has no open shift. |
| 422 | INVALID_USER | The acting user is not valid. |
Request
Responses
- 200
- 400
- 401
- 403
- 404
- 409
- 422
The approval grant
Error envelope
Error envelope
Error envelope
Error envelope
Error envelope
Error envelope