لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
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 · أو nullfirst_namestring · أو nulllast_namestring · أو nulllocalestring · أو nullBCP 47, e.g.
aroren-US.tagsarray of stringsnotestring · أو nullemail_marketingbooleanRecord that the customer agreed to marketing emails. Default
false.sms_marketingbooleanRecord that the customer agreed to marketing SMS. Default
false.whatsapp_marketingbooleanRecord that the customer agreed to marketing on WhatsApp. Default
false.
ما يُرجعه
201 Customer created.
الأخطاء
- 403
forbiddenMissing permission. - 409Email already used by another customer.
- 422
validation_failedValidation failed.