Provision a shop
- Path
/partners/domains- Auth
- Partner token · partner server only
# $SIGNED_PAYLOAD: the request claims as a JWT signed with your private key, see https://releva.ai/documentation/reference/partners/overview/#authenticationcurl --request POST \ --url 'https://releva.ai/api/v0/partners/domains' \ --header 'content-type: application/json' \ --header "x-rlv-partner-token: $RELEVA_PARTNER_TOKEN" \ --data "{\"payload\": \"$SIGNED_PAYLOAD\"}"Creates the merchant’s account and domain, or updates them if this partner already provisioned the same name
and url. The account is found by name (account names are unique across Releva) and the domain by url within
that account: sending a different name for an existing shop creates a second account and domain, so always send
the exact name you used first. url is stored as https://<host> (protocol and trailing slash are removed
first). A new domain starts with email and SMS sending disabled, subscription management internal and quiet hours
22:00 to 09:00 in timezoneOffset. Save domain.accessToken, domain.secretKey and the page tokens
(domain.pages[].token by name) for the standard integration.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
The request fields as JWT claims, signed with your RSA private key (RS512 recommended; RS256/384 and PS256/384/512
are also accepted) with a short expiry (expiresIn: '1h'). The operation’s x-signed-claims schema lists the
claims.
Example generated
{ "payload": "example"}Responses
Section titled “Responses”The shop already existed for this partner and was updated.
object
The shop’s full domain record (about 100 fields; only the ones partners need are listed). On PUT and uninstall it
also contains account.
object
Public token for the browser and the SDKs.
Secret key for server-to-server calls. Keep it on your server.
Returned by POST only. Store token by name for the standard integration.
object
Example
{ "domain": { "url": "https://demo-partner-shop.example.com", "runningSuspendedReason": "appUninstalled", "disabledServices": [ "email", "textMessage" ] }}Account and domain were created.
object
The shop’s full domain record (about 100 fields; only the ones partners need are listed). On PUT and uninstall it
also contains account.
object
Public token for the browser and the SDKs.
Secret key for server-to-server calls. Keep it on your server.
Returned by POST only. Store token by name for the standard integration.
object
Example
{ "domain": { "url": "https://demo-partner-shop.example.com", "runningSuspendedReason": "appUninstalled", "disabledServices": [ "email", "textMessage" ] }}Partner token, shop field or validation error.
object
Human-readable error. Several validation errors are joined with a space.
Examples
{ "message": "Partner identification is missing!"}{ "message": "Partner identification is invalid!"}{ "message": "url is required"}{ "message": "name is required"}{ "message": "platform is required"}{ "message": "Unsupported platform \"bigcommerce\". Supported platforms: magento1, magento2, opencart, cloudcart, woocommerce, shopify, cscart, merchantpro, gombashop, prestashop, valival, custom, shopiko, gomag, xxsale."}Request body larger than 800 KB.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "request entity too large"}The account name belongs to an account that is not yours.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "An account named \"Demo Partner Internal Shop (demo-partner-internal.example.com)\" already exists. Account names are unique across Releva - send a name that includes the shop domain."}The payload could not be verified (missing, not a JWT, signed with another key, or expired), or another unexpected error.
object
Human-readable error. Several validation errors are joined with a space.
Example
{ "message": "An internal error occurred."}