انتقل إلى المحتوى

لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.

Verify sign in code

POST/store/v1/customers/sign-in-codes/verify
  • يدعم Idempotency-Key

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.

الترويسات

  • Idempotency-Keystring

    أرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.

  • shop-api-versionYYYY-MM

    الإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.

الجسم

  • codestringمطلوب

    The six digits. Spaces, dashes and Arabic-Indic digits are accepted.

  • emailstring · أو null

    The email the code went to; with phone, the email of a new account.

  • phonestring · أو null
  • first_namestring · أو null

    For a new account.

  • last_namestring · أو null
  • email_marketingboolean

    For a new account: agreed to marketing emails.

  • localestring · أو null

    For a new account (BCP 47).

ما يُرجعه

200 Signed in.

الأخطاء

  • 401unauthenticatedThe account is disabled.
  • 409email_taken (the email belongs to another account), account_pending (the account waits for approval), accounts_off or sign_up_invite_only.
  • 422validation_failedWrong or expired code, or a new account's email is missing.
  • 429rate_limitedToo many attempts.