affiliates

Embed
Preview of the card
<a href="https://linkyhub.net/docs/ref-affiliates"><img src="https://linkyhub.net/docs/_api/public/orgs/2fd2a4b7-b627-4925-af1e-1c51bf890403/spaces/c4b920fb-a433-40b5-b354-ff84bf0c3eb1/pages/9d3f1685-c5f9-4171-abae-e0a0e5e4c86f/social-card.svg?v=3e7ae33eec8b" alt="affiliates" width="600" height="315"></a>
GEThttps://linkyhub.net/api/v3/affiliatesScope affiliates:read

People promoting the creator, their sales and what they are owed.

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/affiliates" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
Example
{
  "data": [
    {}
  ]
}
Schema
dataobject[]required
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.
Example
{
  "error": "string",
  "message": "string"
}
Schema
errorstringrequired
A stable code to branch on, e.g. insufficient_scope.
messagestringrequired
A sentence to show a person.
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
PATCHhttps://linkyhub.net/api/v3/affiliates/{affiliateId}Scope affiliates:write

Approve, reject or suspend an affiliate.

Parameters

affiliateIdstringpathrequired

Request body

application/json
statusstringrequired
APPROVED | REJECTED | SUSPENDED
{
  "status": "APPROVED"
}

Code samples

cURL
curl -X PATCH "https://linkyhub.net/api/v3/affiliates/{affiliateId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"status":"APPROVED"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /affiliates

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/affiliates/{affiliateId}/mark-paidScope affiliates:write

Record that what an affiliate is owed has been paid. A bookkeeping mark; no money moves.

Parameters

affiliateIdstringpathrequired

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/affiliates/{affiliateId}/mark-paid" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /affiliates

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
GEThttps://linkyhub.net/api/v3/affiliates/programScope affiliates:read

The creator’s affiliate programme terms, or null if they have never run one.

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/affiliates/program" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /affiliates

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
PUThttps://linkyhub.net/api/v3/affiliates/programScope affiliates:write

Start, change or pause the affiliate programme. Past sales keep the rate they earned at.

Request body

application/json
commissionPercentintegerrequired
cookieDaysintegerrequired
How long a click keeps counting.
requiresApprovalbooleanrequired
Approve each affiliate yourself, rather than anyone who applies.
termsstring
isActivebooleanrequired
{
  "commissionPercent": 0,
  "cookieDays": 0,
  "requiresApproval": true,
  "terms": "string",
  "isActive": true
}

Code samples

cURL
curl -X PUT "https://linkyhub.net/api/v3/affiliates/program" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"commissionPercent":0,"cookieDays":0,"requiresApproval":true,"terms":"string","isActive":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /affiliates

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
Updated