PaidGoods
API referenceAffiliates

Change an affiliate’s code (old links keep working)

PUT
/v1/stores/{storeId}/affiliates/{affiliateId}/code

Authorization

AuthorizationBearer <token>

API key from Settings → API keys

In: header

Path Parameters

storeId*string
affiliateId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://example.com/v1/stores/string/affiliates/string/code" \  -H "Content-Type: application/json" \  -d '{    "code": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "customerId": "87d8e330-2878-4742-a86f-dbbb3bf522ac",  "email": "string",  "code": "string",  "referralUrl": "string",  "status": "applied",  "tierId": "fc392c40-3620-4503-8c0d-7df4d7876c3d",  "tierName": "string",  "commissionBp": -9007199254740991,  "commissionOverrideBp": -9007199254740991,  "referrals": -9007199254740991,  "earnedMinor": -9007199254740991,  "balanceMinor": -9007199254740991,  "currency": "string",  "applicationAnswer": "string",  "statusReason": "string",  "source": "string",  "createdAt": "string",  "approvedAt": "string"}