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 the list of links that belong to a certain partner.

GET https://api.partnero.com/v1/partners/(: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": "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

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

ParametersTypeRequiredDetails
keystringyesKey will be used to generate an unique referral link. Key should be unique.
domain_idstringoptionalThe list of program domains are available with GET request on https://api.partnero.com/v1/links
is_additionalboolno *Required when domain_id is present
partnerobject[]yesPartner data.
partner.idstringyes if partner.key or partner.email is not provided
partner.keystringyes if partner.id or partner.email is not provided
partner.emailstringyes 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
}

Get the details about specific partner link.

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

Request parameters

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

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

Available search query parameters

ParametersTypeRequiredDetails
idstringoptional
keystringoptional
partnerobject[]optionalPartner data.
partner.idstringyes if partner.key or partner.email is not provided
partner.keystringyes if partner.id or partner.email is not provided
partner.emailstringyes if partner.id or partner.key is not provided

Update an existing link.

PUT https://api.partnero.com/v1/partner_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-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 an existing link.

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

Request parameters

ParametersTypeRequiredDetails
idstringyes

Valid

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