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

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

Create custom report

POST/admin/v1/stores/{store_id}/analytics/custom-reports
  • analytics:read
  • يدعم Idempotency-Key

Save a custom report: measures over the sales, items or profit facts, up to two groupings, five filters and an order. A store keeps up to 100.

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

  • store_idstringمطلوب

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

الترويسات

  • Idempotency-Keystring

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

  • shop-api-versionYYYY-MM

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

الجسم

  • namestringمطلوب

    1–80 characters, unique in the store.

  • definitionobjectمطلوب

    What a custom report asks.

ما يُرجعه

201 The report.

الأخطاء

  • 403forbiddenMissing permission.
  • 409Another report has this name, or the store has 100.
  • 422validation_failedThe definition doesn't fit its data set.