PaidGoods
API referenceAffiliates

Make a customer (or a new email) an affiliate

POST
/v1/stores/{storeId}/affiliates/invite

Authorization

AuthorizationBearer <token>

API key from Settings → API keys

In: header

Path Parameters

storeId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/v1/stores/string/affiliates/invite" \  -H "Content-Type: application/json" \  -d '{    "email": "user@example.com"  }'
{  "affiliate": {    "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"  },  "created": true,  "emailed": true}