لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Create a cart (optionally with lines)
/ store/ v1/ carts- يدعم Idempotency-Key
Create a cart (optionally with lines). Send X-Customer-Token to link a signed-in customer. The response carries the cart token: send it as X-Cart-Token on every cart request; and the cart's checkout_url, the hosted checkout to send the shopper to.
الترويسات
X-Customer-Tokenstring · أو nullCustomer session token
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
linesarray of objectsemailstring · أو nulllocalestring · أو nullThe shopper's language for emails, e.g.
aroren. Defaults to the store's.countrystring · أو nullThe country the storefront shows, e.g.
AE: the cart prices in its market (currency and prices) until it has a shipping address. Defaults to the primary market.
ما يُرجعه
201 Cart created.
الأخطاء
- 401
unauthenticatedInvalid customer session. - 422
validation_failedInvalid lines, email or locale.