Skip to main content
POST
Set Affiliate Code

Authorizations

Authorization
string
header
required

Authenticate with a customer token, minted server-to-server with POST /v1/shops/{shopId}/customers/{customerId}/token and sent as a Bearer token. Reseller API keys are rejected with a 403 here.

Body

application/json
affiliate_code
string
required

3 to 16 characters, letters, digits, underscores and hyphens only. Must be unique within the shop.

Example:

"summer24"

Response

success
boolean
Example:

true

message
string
Example:

"Affiliate code updated successfully."

affiliate_code
string
Example:

"summer24"