zinn-campaigns
POST /v1/store-connect/authorize
A member approves a store's Zinn® Order Updates connection (the consent screen's Allow).
Authentication
Send an API key as a bearer token. The endpoint checks email_marketing.manage; a key without it is refused with 403, not 404.
Where your organisation id goes
This endpoint takes org_id as a field in the JSON body.
Your organisation id is on the API keys screen in your dashboard, beside the key itself. It is the same id in every call you make.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X POST https://api.zinndigital.com/v1/store-connect/authorize \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "site_url": <string>, "return_url": <string>, "code_challenge": <string> }'Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
docs/1297 §5. Needs email_marketing.manage in org_id (or the only org the member manages). Keeps a single-use grant for ten minutes holding the SHA-256 of a one-time code and the plugin's PKCE code_challenge (S256 only). ⛔ return_url must be the SAME ORIGIN as site_url; the dashboard sends the browser to redirect_to with code and the plugin's state. Audit action store_connect.authorized.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
org_id | string | No | — |
site_url | string | Yes | The store's home_url(). |
return_url | string | Yes | The plugin's admin page |
code_challenge | string | Yes | — |
code_challenge_method | string<S256> | No | — |
client | string<zinn-order-updates, zinn-campaigns> | No | Which of our plugins connects. A store holds one active token per plugin; re-connecting one plugin revokes only its own earlier token. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
code | string | Yes | zouc_… — single use, ten minutes. |
redirect_to | string | Yes | The plugin's return URL; add code and state. |
site_host | string | Yes | — |
expires_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 422