zinn-campaigns
POST /v1/store-connect/token
The store plugin exchanges the one-time code and its PKCE verifier for a store token.
Authentication
This endpoint is public. It takes no credential and no organisation — it is what our own marketing site and AI answer engines read.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
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/token \
-H "Content-Type: application/json" \
-d '{ "code": <string>, "code_verifier": <string>, "site_url": <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
⛔ No session: server to server from the store. The code is claimed with one conditional write before anything else is checked, so it works once; a wrong verifier or another site burns it. Unknown, used, expired and mismatched codes are one answer (422 codeInvalid). Re-connecting a store retires its old token in the same step. The token (zou_…) is returned ONCE; we keep its SHA-256. Audit action store_connect.connected.
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
code | string | Yes | — |
code_verifier | string | Yes | — |
site_url | string | Yes | — |
site_uuid | string | No | — |
plugin_version | string | No | — |
wp_version | string | No | — |
integrations | string[] | No | — |
platform | object | No | Reported facts such as the WooCommerce version; scalars only. |
client | string<zinn-order-updates, zinn-campaigns> | No | Must match the client the code was approved for. 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 |
|---|---|---|---|
token | string | Yes | zou_… — store it; it is never shown again. |
connection | StoreConnectStatus | Yes | — |
Errors this endpoint can return
422 · 429