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

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

Preview pricing

POST/admin/v1/stores/{store_id}/pricing/preview
  • يدعم Idempotency-Key

Price a cart exactly as checkout will: catalog prices, entered codes and automatic discounts, taxes for the destination and the chosen delivery option. Nothing is saved. and products:read.

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

  • store_idstringمطلوب

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

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • linesarray of objectsمطلوب

    1–50 lines.

  • discount_codesarray of strings
  • customerobject · أو null

    Price for a signed-in customer; omit for a guest.

  • destinationobject · أو null

    Where the order ships. Without it no tax rate or shipping applies.

  • shipping_rate_idstring · أو null

    One of the returned delivery_options. Without it shipping isn't charged.

ما يُرجعه

200 The priced cart.

الأخطاء

  • 403forbiddenMissing permission.
  • 409Store data in another currency.
  • 422validation_failedValidation failed.