Customer referral links
A referral link is a unique, trackable URL provided to customers to share with their audience.
Get all links
Get the list of links that belong to a certain customer.
GET https://api.partnero.com/v1/customers/(: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": "DHjU0cGYxMUG",
"key": "DHjU0cGYxMUG",
"url": "https://test-referral-program.com?ref=DHjU0cGYxMUG",
"default": true,
"is_additional": false,
"direct_tracking": false,
"direct_tracking_redirect": false,
"direct_tracking_redirect_url": null
},
...
]
}
Invalid
Response Code: 404 Not Found
Create a link
Create a new customer referral link.
The data payload should contain two data objects, customer
(with id or key or email) and link
.
POST https://api.partnero.com/v1/customer_referral_links
Request example
{
"customer": {
"id": "CUSTOMER_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. |
customer | object[] | yes | Customer data. |
customer.id | string | yes if customer.key or customer.email is not provided | |
customer.key | string | yes if customer.id or customer.email is not provided | |
customer.email | string | yes if customer.id or customer.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 customer link
Get the details about specific customer referral link.
GET https://api.partnero.com/v1/customer_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-raf-key",
"key": "my-custom-raf-key",
"url": "https://test-referral-program.com?ref=my-custom-raf-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/customer_referral_links:search
Available search query parameters
Parameters | Type | Required | Details |
---|---|---|---|
id | string | optional | |
key | string | optional | |
customer | object[] | optional | Customer data. |
customer.id | string | yes if customer.key or customer.email is not provided | |
customer.key | string | yes if customer.id or customer.email is not provided | |
customer.email | string | yes if customer.id or customer.key is not provided |
Update a link
Update an existing link.
PUT https://api.partnero.com/v1/customer_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-raf-key-updated",
"key": "my-custom-raf-key-updated",
"url": "https://test-referral-program.com?ref=my-custom-raf-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/customer_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
}