novinzodevelopers
Your store's APIApps referenceAffiliates

Create Link

POST/admin/links

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/, and as /r/?to=, 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.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

affiliateId*string
Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$
code*AffiliateCode

case-sensitive base62 (A-Z, a-z, 0-9)

Length2 <= length <= 32
destinationPath*AffiliateDestinationPath

a storefront path, such as /products/widget

Match^\/([\x20-\x2E\x30-\x5B\x5D-\x7E\u0080-\uD7FF\uE000-\uFFFF][\x20-\x5B\x5D-\x7E\u0080-\uD7FF\uE000-\uFFFF]*)?$
Lengthlength <= 2048

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/admin/links" \  -H "Content-Type: application/json" \  -d '{    "affiliateId": "string",    "code": "string",    "destinationPath": "string"  }'
{  "id": "string",  "storeId": "string",  "affiliateId": "string",  "code": "string",  "destinationPath": "string",  "createdAt": "string",  "updatedAt": "string",  "archivedAt": "string"}