لم يُكتب وصف هذه العملية بالعربية بعد، فأوصافها بالإنجليزية.
Create usage record
POST
/ admin/ v1/ stores/ {store_id}/ apps/ current/ usage-records- يدعم Idempotency-Key
Charge metered use, within the cap of the store's plan for this period. Sending a record again with the same idempotency_key returns it without charging twice. App tokens only.
معاملات المسار
store_idstringمطلوبمعرّف من نوع
store، مثلstore_01k8qs5s…. يصل إلى التطبيق مع التثبيت، في رابط OAuth وفي رد رمز الوصول.
الترويسات
Idempotency-Keystringأرسل المفتاح نفسه لإعادة المحاولة بأمان: تُعاد الإجابة الأولى لمدة ٢٤ ساعة.
shop-api-versionYYYY-MMالإصدار الذي تُكتب به الإجابة. بدونه يُستخدم الإصدار المثبّت لتطبيقك، وإلا الأحدث.
الجسم
descriptionstringمطلوبpriceobjectمطلوبIn the subscription's currency.
idempotency_keystringمطلوبUnique per record: sending it again returns the first record and charges nothing.
ما يُرجعه
201 Recorded (or recorded before).
الأخطاء
- 409No subscription with usage terms (
no_subscription,no_usage_terms), or the cap would be exceeded (usage_cap_exceeded).