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

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

Create customer

POST/admin/v1/stores/{store_id}/customers
  • customers:write
  • يدعم Idempotency-Key

Add a customer (without a storefront account).

معاملات المسار

  • store_idstringمطلوب

    معرّف من نوع store، مثل store_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • emailstringمطلوب
  • phonestring · أو null
  • first_namestring · أو null
  • last_namestring · أو null
  • localestring · أو null

    BCP 47, e.g. ar or en-US.

  • tagsarray of strings
  • notestring · أو null
  • email_marketingboolean

    Record that the customer agreed to marketing emails. Default false.

  • sms_marketingboolean

    Record that the customer agreed to marketing SMS. Default false.

  • whatsapp_marketingboolean

    Record that the customer agreed to marketing on WhatsApp. Default false.

ما يُرجعه

201 Customer created.

الأخطاء

  • 403forbiddenMissing permission.
  • 409Email already used by another customer.
  • 422validation_failedValidation failed.