Mint a 30 minute read-only token for one store
const url = 'https://data.creatorain.com/partner/v1/locations/store_123/dashboard-token';const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://data.creatorain.com/partner/v1/locations/store_123/dashboard-token \ --header 'Authorization: Bearer <token>'Issues a credential whose entire authority is ONE store, for 30 minutes, read only. This is what makes the embedded merchant dashboard possible: the merchant’s browser holds this token and never your master key.
Mint one when you render the embed. It cannot be refreshed and it cannot mint another one: this route requires the PARTNER KEY, so a leaked merchant URL expires rather than renewing.
The token is accepted by the three GET /locations/{partner_location_id}... routes and
nowhere else, as Authorization: Bearer <token> or ?token=<token>.
dashboard_url is omitted when this deployment hosts no embedded dashboard.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”YOUR id for the store, as you sent it to POST /locations.
Example
store_123Responses
Section titled “Responses”A fresh token.
object
A read-only credential for ONE store. Send it as a Bearer header or as ?token=.
30 minutes from minting, in UTC. This is a fact about the credential, not a time at the store.
The embeddable dashboard for this store with the token already in it. OMITTED entirely when this deployment hosts no embedded dashboard.
Example generated
{ "token": "example", "expires_at": "2026-04-15T12:00:00Z", "dashboard_url": "example"}unauthorized. A missing, malformed, unknown or revoked key; or an invalid, expired or
wrong-store dashboard token. One answer for every case on purpose: the holder of a bad
credential learns nothing from the difference.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}location_not_found. No store of this key carries that partner_location_id.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}location_terminated. No token is minted for a store with no contract.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}rate_limited. Over this key’s requests-per-minute ceiling.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}internal_error. The store token feature is not enabled on this deployment. A
configuration state, not a fault: tell us and we will switch it on.
object
object
The stable value to branch on.
A human sentence. Copy, not contract; it may be reworded.
The request field at fault, dotted for a nested one (plan.term_months).
Example
{ "error": { "code": "unauthorized" }}