احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز reseller.manage باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد میشود، نه 404.
جایی که شناسه سازمان شما قرار میگیرد
این نقطه پایانی org_id را به عنوان یک پارامتر پرسوجو میپذیرد. آن را رها کنید تا فراخوانی کل زیردرخت اجارهای شما را پوشش دهد؛ آن را ارسال کنید تا فراخوانی به یک سازمان محدود شود.
شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواستهایی که ارسال میکنید یکسان است.
امتحان کنید
هر چیزی را که داخل براکتهای زاویهدار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.
curl -X PUT https://api.zinndigital.com/v1/reseller/prices \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "plan_id": <Uuid>, "interval": <string>, "currency": <string>, "amount_minor": <integer> }'وارد شدهاید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر میکند و درخواست را روی API زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید
جزئیات
Upserts one row of your price list, keyed on (plan, interval, currency). Editing it never re-prices a client already sold — their subscription captured the price at purchase. Requires `reseller.manage`.
پارامترها
| نام | نوع | الزامی | چیست |
|---|---|---|---|
org_id (query) | Uuid | خیر | Which of your organizations this applies to. Required only when you belong to more than one here — otherwise it is inferred, and an id outside your direct memberships is a 404 r… |
بدنه درخواست
| نام | نوع | الزامی | چیست |
|---|---|---|---|
plan_id | Uuid | بله | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
interval | string | بله | — |
currency | string | بله | — |
amount_minor | integer | بله | — |
is_active | boolean | خیر | — |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
id | Uuid | null | خیر | Null when you have not authored this row yet. |
plan_id | Uuid | بله | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
plan_code | string | بله | — |
plan_name | string | بله | — |
interval | string | بله | — |
currency | string | بله | — |
amount_minor | integer | بله | What YOUR client pays, in minor units. |
is_active | boolean | بله | — |
list_amount_minor | object | خیر | Zinn®'s list price for the same plan. |
wholesale_amount_minor | object | خیر | What the plan costs YOU after your wholesale discount. |
wholesale_discount_bps | integer | خیر | — |
price_source | string<price_list, markup, unpriced> | بله | Whether the price is one you set, one derived from list by your default markup, or absent because the catalogue holds no price in this currency. |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 404 · 422 · 429