Customer referral links

A referral link is a unique, trackable URL provided to customers to share with their audience.

Get the list of links that belong to a certain customer.

GET https://api.partnero.com/v1/customers/(:id)/referral_links

Request parameters

ParametersTypeRequiredDetails
limitintegernoA limit on the number of items to be returned. Limits can range between 1 and 250, and the default is 15.
pageintegernoThe 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 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

ParametersTypeRequiredDetails
keystringyesKey will be used to generate an unique referral link. Key should be unique.
customerobject[]yesCustomer data.
customer.idstringyes if customer.key or customer.email is not provided
customer.keystringyes if customer.id or customer.email is not provided
customer.emailstringyes 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
}

Get the details about specific customer referral link.

GET https://api.partnero.com/v1/customer_referral_links/(:id)

Request parameters

ParametersTypeRequiredDetails
idstringyesLink 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 links.

GET https://api.partnero.com/v1/customer_referral_links:search

Available search query parameters

ParametersTypeRequiredDetails
idstringoptional
keystringoptional
customerobject[]optionalCustomer data.
customer.idstringyes if customer.key or customer.email is not provided
customer.keystringyes if customer.id or customer.email is not provided
customer.emailstringyes if customer.id or customer.key is not provided

Update an existing link.

PUT https://api.partnero.com/v1/customer_referral_links/(:id)

Request example

{
  "key": "UPDATED_LINK_KEY"
}

Request parameters

ParametersTypeRequiredDetails
keystringyesLink 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 an existing link.

DELETE https://api.partnero.com/v1/customer_referral_links/(:id)

Request parameters

ParametersTypeRequiredDetails
idstringyes

Valid

Response Code: 200 OK
Response Headers:
    Content-Type: application/json
{
  "status": 1
}