reseller
POST /v1/reseller/brand/font
Install a Google font into our own origin.
احراز هویت
یک کلید API را به عنوان یک توکن حامل ارسال کنید. این کلید باید دارای مجوز reseller.manage باشد؛ کلیدی که فاقد آن باشد با خطای 403 رد میشود، نه 404.
جایی که شناسه سازمان شما قرار میگیرد
این نقطه پایانی org_id را به عنوان یک پارامتر پرسوجو میپذیرد. آن را رها کنید تا فراخوانی کل زیردرخت اجارهای شما را پوشش دهد؛ آن را ارسال کنید تا فراخوانی به یک سازمان محدود شود.
شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواستهایی که ارسال میکنید یکسان است.
امتحان کنید
هر چیزی را که داخل براکتهای زاویهدار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.
curl -X POST https://api.zinndigital.com/v1/reseller/brand/font \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "family": <string> }'وارد شدهاید؟ کنسول API در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر میکند و درخواست را روی API زنده اجرا میکند تا بتوانید پاسخ واقعی را ببینید. این نقطه پایانی را در کنسول API باز کنید
جزئیات
Send a Google family **name**; we fetch it once, store the woff2 files and serve them from our own hostname. Requires `reseller.manage` and the `white_label` entitlement. ⛔ A separate door from `PUT /v1/reseller/brand`, deliberately: this is the only part of a brand save that makes a network call to a third party, and folding it in would make a typo in a font name refuse a change to your company name. ⭐ Idempotent and shared across the platform. The bytes of *Inter Regular* are the same for everybody and the rows are content-addressed, so the second reseller to install a family costs one query and no egress. ⭐ Four weights are installed — the ones the design system uses. A family can ship eighteen across two axes, and storing all of them would be half a megabyte of rows for weights no component references.
پارامترها
| نام | نوع | الزامی | چیست |
|---|---|---|---|
org_id (query) | Uuid | خیر | The organization this call acts on. Optional for a caller with exactly one direct membership; **required** for anyone with more than one — which is every reseller and every agen… |
بدنه درخواست
| نام | نوع | الزامی | چیست |
|---|---|---|---|
family | string | بله | — |
پاسخ
| نام | نوع | الزامی | چیست |
|---|---|---|---|
family | string | بله | — |
faces | integer | بله | How many `@font-face` files were stored. ⛔ Never zero on success — a family that returns no usable files is a refusal, because "installed 0 faces" and "this family does not exis… |
css_url | string | بله | The stylesheet, served from our origin. |
خطاهایی که این نقطه پایانی میتواند برگرداند
401 · 403 · 422 · 429