Verify sign in code
/ store/ v1/ customers/ sign-in-codes/ verify- Idempotency-Key supported
Sign in with the code. An address the store does not know yet becomes a new account (201); a new mobile number also needs email (422 email_required until then, the code staying valid). Each code allows five wrong guesses. While the store approves new accounts, a new account waits instead (202), with the address proven, and nobody signs in.
Headers
Idempotency-KeystringSend the same key to retry safely: the first answer is replayed for 24 hours.
shop-api-versionYYYY-MMThe version to answer in. Without it, your app’s pinned version, else the newest.
Body
codestringrequiredThe six digits. Spaces, dashes and Arabic-Indic digits are accepted.
emailstring · or nullThe email the code went to; with
phone, the email of a new account.phonestring · or nullfirst_namestring · or nullFor a new account.
last_namestring · or nullemail_marketingbooleanFor a new account: agreed to marketing emails.
localestring · or nullFor a new account (BCP 47).
Returns
200 Signed in.
Errors
- 401
unauthenticatedThe account is disabled. - 409
email_taken(the email belongs to another account),account_pending(the account waits for approval),accounts_offorsign_up_invite_only. - 422
validation_failedWrong or expired code, or a new account's email is missing. - 429
rate_limitedToo many attempts.