reseller
PUT /v1/reseller/brand/menu/{item_id}
Change one link.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу reseller.manage; кључ без ње се одбија уз 403, а не 404.
Где се уноси ID ваше организације
Ова крајња тачка прихвата org_id као параметар упита. Изоставите га и позив ће обухватити цело подстабло вашег закупа; пошаљите га да бисте сузили позив на једну организацију.
Идентификатор ваше организације се налази на екрану са API кључевима на вашој контролној табли, поред самог кључа. То је исти идентификатор у сваком позиву који упутите.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X PUT https://api.zinndigital.com/v1/reseller/brand/menu/{item_id} \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "label": <string>, "url": <string> }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Replaces one navigation link. Requires reseller.manage. ⛔ Scoped to your own organisation as well as to the id. A get(pk=…) would let any reseller edit any other reseller's link by guessing a uuid — and uuid7 is time-ordered, so guessing is less of a barrier than it sounds.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
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 agency… |
item_id (path) | string | Да | — |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
label | string | Да | — |
url | string | Да | — |
icon | string | Не | — |
position | integer | Не | — |
new_tab | boolean | Не | — |
visibility | string<both, client, staff> | Не | — |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
id | string | Да | — |
label | string | Да | — |
url | string | Да | — |
icon | string | Да | A design-system icon name from icons, or "" for a label-only item. |
position | integer | Да | Sort key. Ties break on the label, so the order is total and stable. |
new_tab | boolean | Да | Renders target="_blank". The panel pairs it with rel="noopener noreferrer" unconditionally — that is set on every external item, not only the new-tab ones, because… |
visibility | string<both, client, staff> | Да | Who sees it. Filtered server-side on GET /v1/branding: a payload carrying a staff-only link that the app hides has already disclosed it to anybody with a network tab, which… |
external | boolean | Да | Whether the link leaves the panel. Computed here so every renderer agrees. |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 422