Retrieve an Affiliate
GET
/v1/affiliates/:id
Retrieves the affiliate with the given ID.
curl "https://api.lemonsqueezy.com/v1/affiliates/1" \
-H 'Accept: application/vnd.api+json' \
-H 'Content-Type: application/vnd.api+json' \
-H 'Authorization: Bearer {api_key}'
Returns
Returns an Affiliate object.
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": "https://api.lemonsqueezy.com/v1/affiliates/1"
},
"data": {
"type": "affiliates",
"id": "1",
"attributes": {
"store_id": 1,
"user_id": 2,
"user_name": "John Doe",
"user_email": "[email protected]",
"share_domain": "example.com",
"status": "active",
"products": null,
"application_note": "I'm a digital content creator and marketer promoting B2B solutions via my newsletter",
"total_earnings": 169550,
"unpaid_earnings": 132000,
"created_at": "2023-11-22T04:12:50.000000Z",
"updated_at": "2023-11-22T04:12:50.000000Z"
},
"relationships": {
"store": {
"links": {
"related": "https://api.lemonsqueezy.com/v1/affiliates/1/store",
"self": "https://api.lemonsqueezy.com/v1/affiliates/1/relationships/store"
}
},
"user": {
"links": {
"related": "https://api.lemonsqueezy.com/v1/affiliates/1/user",
"self": "https://api.lemonsqueezy.com/v1/affiliates/1/relationships/user"
}
}
},
"links": {
"self": "https://api.lemonsqueezy.com/v1/affiliates/1"
}
}
}