Skip to content

Request sign in code

POST/store/v1/customers/sign-in-codes
  • Idempotency-Key supported

Send a six-digit sign-in code (valid 10 minutes) to an email address, or by SMS or WhatsApp to a mobile number. Answers alike whether or not the address belongs to a customer: new ones get an account when they sign in. Limited to three codes per address per ten minutes.

Headers

  • Idempotency-Keystring

    Send the same key to retry safely: the first answer is replayed for 24 hours.

  • shop-api-versionYYYY-MM

    The version to answer in. Without it, your app’s pinned version, else the newest.

Body

  • emailstring · or null
  • phonestring · or null

    Any usual form (0501234567, +966 50 123 4567), read in the store's country.

  • channelenum · or null

    For a phone: sms or whatsapp; the first the store offers when absent.

    • email
    • sms
    • whatsapp
  • localestring · or null

    Language of the message when the customer has none on file (BCP 47).

Returns

202 The code is on its way.

Errors

  • 409The store does not send codes on this channel.
  • 422validation_failedMalformed email or phone number.
  • 429rate_limitedToo many requests.