Your store's APIApps referenceAffiliates
Create Affiliate
POST
/admin/affiliatesRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
name*string
email*string|null
Response Body
application/json
application/json
application/json
curl -X POST "https://example.com/admin/affiliates" \ -H "Content-Type: application/json" \ -d '{ "name": "string", "email": "string" }'{ "id": "string", "storeId": "string", "name": "string", "email": "string", "createdAt": "string", "updatedAt": "string"}Archive Link PUT
Archives a link for good: nothing unarchives it. Its URL still sends visitors to its page, but their arrivals are no longer recorded, so they earn it no clicks and no orders. What earlier arrivals earned stays credited to it.
Create Link POST
A new link of an affiliate. Its code is case-sensitive and stays taken in the store for good, archived links included. A link is shared on the store's own domain as /r/<code>, and as /r/<code>?to=<destinationPath>, URL-encoded, when its destination is not /: a visitor lands on the page the URL names, or on / when it names none, whatever the link's destinationPath.
