partner
POST /v1/partner/customers/{externalId}/sites/{siteId}/wp-login
One-click WordPress admin for your customer's site.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу partner.domains; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X POST https://api.zinndigital.com/v1/partner/customers/{externalId}/sites/{siteId}/wp-login \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ }'Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
Mints the same short-lived, single-use, site-bound WordPress sign-in as the customer's own "WordPress admin" button (wpLogin) — same preflight, same token, same audit row (site.wp_login.issued, recording the partner and external_id; the token and URL are never audited). Send the customer's browser to url at once: the token expires in about two minutes and works once. Only for a customer whose organization YOU created (created_org); one who linked an account they already had is refused 422 not_delegable. A site outside the customer's organization, or an unknown customer, is 404. 422 for a site that is not WordPress/WooCommerce, 409 for one that is not serving or not reachable, and 409 with details[].code move_in_progress (a move into the site is not live yet, so its domain still opens the original copy) or import_in_progress (an import into it has not finished); 503 when one-click login is not configured. Requires partner.domains.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
externalId (path) | string | Да | YOUR id for that customer — whatever your own system calls them. It is what makes linking idempotent, and it is scoped to your partner programme: another partner's id is a 404… |
siteId (path) | Uuid | Да | Site ID (UUIDv7). |
Тело захтева
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
wp_username | string | Не | The WordPress user to sign in as. Omit or leave blank for the site's primary administrator (the plugin resolves it). |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
url | string | Да | The site URL carrying the token — send the customer's browser here to complete one-click login, unchanged. The token is single-use and short-lived. When the site's plugin has the… |
token | string | Да | The signed SSO token (also embedded in url). Never put it in a query string yourself — follow url as given. |
wp_username | string | Да | The target WordPress user ("" = the site's primary administrator). |
expires_at | string | Да | When the token expires (UTC). |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 409 · 422 · 429 · 503