Partner referral links
A referral link is a unique, trackable URL provided to partners to share with their audience. It allows the system to attribute sign-ups and purchases to the partner, ensuring they receive rewards or commissions when someone uses their link.
Get all links
Get the list of links that belong to a certain partner.
GET https://api.partnero.com/v1/partners/(:id)/referral_links
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
limit | integer | no | A limit on the number of items to be returned. Limits can range between 1 and 250, and the default is 15. |
page | integer | no | The default is 1. |
Response
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": [
{
"id": "myzencode",
"key": "myzencode",
"url": "http://crm-zen-app.localhost:8085?link=myzencode",
"default": false,
"is_additional": false,
"direct_tracking": false,
"direct_tracking_redirect": false,
"direct_tracking_redirect_url": null
},
...
]
}
Invalid
Response Code: 404 Not Found
Get domains
Get the list of domains that you can use when creating a link.
GET https://api.partnero.com/v1/partner_referral_links:domains
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
limit | integer | no | A limit on the number of items to be returned. Limits can range between 1 and 250, and the default is 10. |
page | integer | no | The default is 1. |
Response
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": [
{
"id": 8,
"domain": "mmc.test/profile",
"url": "http://mmc.test/profile?link=",
"is_additional": true
},
...
]
}
Invalid
Response Code: 404 Not Found
Create a link
Create a new partner referral link.
The data payload should contain two data objects, partner
(with id or key or email) and link
.
POST https://api.partnero.com/v1/partner_referral_links
Request example
{
"partner": {
"id": "PARTNER_ID"
},
"key": "LINK_KEY"
}
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | yes | Key will be used to generate an unique referral link. Key should be unique. |
domain_id | string | optional | The list of program domains are available with GET request on https://api.partnero.com/v1/links |
is_additional | bool | no * | Required when domain_id is present |
partner | object[] | yes | Partner data. |
partner.id | string | yes if partner.key or partner.email is not provided | |
partner.key | string | yes if partner.id or partner.email is not provided | |
partner.email | string | yes if partner.id or partner.key is not provided |
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": {
"id": "my-custom-affiliate-key",
"key": "my-custom-affiliate-key",
"url": "http://crm-zen-app.localhost:8085?link=my-custom-affiliate-key",
"default": false,
"is_additional": false,
"direct_tracking": false,
"direct_tracking_redirect": false,
"direct_tracking_redirect_url": null
},
"status": 1
}
Fetch a partner link
Get the details about specific partner link.
GET https://api.partnero.com/v1/partner_referral_links/(:id)
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
id | string | yes | Link ID. |
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": {
"id": "my-custom-affiliate-key",
"key": "my-custom-affiliate-key",
"url": "http://crm-zen-app.localhost:8085?link=my-custom-affiliate-key",
"default": false,
"is_additional": false,
"direct_tracking": false,
"direct_tracking_redirect": false,
"direct_tracking_redirect_url": null
},
"status": 1
}
Search for a link
Search for links.
GET https://api.partnero.com/v1/partner_referral_links:search
Available search query parameters
Parameters | Type | Required | Details |
---|---|---|---|
id | string | optional | |
key | string | optional | |
partner | object[] | optional | Partner data. |
partner.id | string | yes if partner.key or partner.email is not provided | |
partner.key | string | yes if partner.id or partner.email is not provided | |
partner.email | string | yes if partner.id or partner.key is not provided |
Update a link
Update an existing link.
PUT https://api.partnero.com/v1/partner_referral_links/(:id)
Request example
{
"key": "UPDATED_LINK_KEY"
}
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
key | string | yes | Link key to be updated. |
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"data": {
"id": "my-custom-affiliate-key-updated",
"key": "my-custom-affiliate-key-updated",
"url": "http://crm-zen-app.localhost:8085?link=my-custom-affiliate-key-updated",
"default": false,
"is_additional": false,
"direct_tracking": false,
"direct_tracking_redirect": false,
"direct_tracking_redirect_url": null
},
"status": 1
}
Delete a link
Delete an existing link.
DELETE https://api.partnero.com/v1/partner_referral_links/(:id)
Request parameters
Parameters | Type | Required | Details |
---|---|---|---|
id | string | yes |
Valid
Response Code: 200 OK
Response Headers:
Content-Type: application/json
{
"status": 1
}