Offer URLs

Operations for offer URLs

Offer URLs allow you to add additional destinations on an existing offer. They are documented in detail on the Everflow Helpdesk.


Find All

GET /v1/networks/offerurls

This endpoint can be used to fetch all offer URLs. This endpoint is typically used with a filter on the network_offer_id field.

Paging

This endpoint supports paging. Refer to our User Guide for usage.

The maximum page size for this endpoint is set to 2000. Omitting to specify the page / page size will result in the first 2000 offer URLs being returned.

Filters

This endpoint supports the following API filters. Refer to our User Guide for usage.

Value Description
network_offer_id only fetch the offer URLs associated with the offer ID specified
url_status active, paused or deleted
time_created The time at which the offer url was created
time_saved The time at which the offer url was last modified

cURL
curl --request GET 'https://api.eflow.team/v1/networks/offerurls?filter=network_offer_id%3D6' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
  "urls": [
    {
      "network_offer_url_id": 1,
      "network_id": 1,
      "network_offer_id": 6,
      "name": "Offer Url Name A",
      "destination_url": "http://destination-url-a.com/?tid={transaction_id}",
      "preview_url": "http://preview-url-a.com",
      "url_status": "active",
      "network_affiliate_ids": [
        7,
        14
      ],
      "is_apply_specific_affiliates": true,
      "is_hidden_affiliate": true,
      "time_created": 1614284258,
      "time_saved": 1614285020
    },
    {
      "network_offer_url_id": 2,
      "network_id": 1,
      "network_offer_id": 6,
      "name": "Offer Url Name B",
      "destination_url": "http://destination-url-b.com/?tid={transaction_id}",
      "preview_url": "http://preview-url-b.com",
      "url_status": "paused",
      "network_affiliate_ids": [
        7,
        14
      ],
      "is_apply_specific_affiliates": true,
      "is_hidden_affiliate": true,
      "time_created": 1614285172,
      "time_saved": 1614286134
    }
  ]
}

Find By ID

GET /v1/networks/offerurls/:offerUrlId

Find an offer URL by its unique ID

Path Parameters

Parameter Description
offerUrlId The ID of the offer URL you want to fetch

cURL
curl --request GET 'https://api.eflow.team/v1/networks/offerurls/1' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
  "network_offer_url_id": 1,
  "network_id": 1,
  "network_offer_id": 6,
  "name": "Offer Url Name",
  "destination_url": "http://destination-url.com/?tid={transaction_id}",
  "preview_url": "http://preview-url.com",
  "url_status": "active",
  "network_affiliate_ids": [
    14,
    7
  ],
  "is_apply_specific_affiliates": true,
  "is_hidden_affiliate": true,
  "time_created": 1614284258,
  "time_saved": 1614285020
}

Create

POST /v1/networks/offerurls

Create a new Offer URL setting. All offer URL settings must be associated to one (and only one) offer.

If you have a large number of offer URLs to add, you can consider using the Create (Bulk) endpoint documented below.

Body Params

network_offer_id int

The ID of the offer to which this offer URL is associated.

name string

The name of the offer URL.

destination_url string

The URL the offer URL will redirect to.

preview_url string

A preview URL, if it exists

url_status string

Status of the offer URL setting. Can be one of : active, paused, deleted.

is_apply_specific_affiliates boolean

Determines whether this offer URL applies to all affiliates or only to a select few. When true, the network_affiliate_ids array must be filled

network_affiliate_ids int array

The IDs of the affiliates that are to be affected by the offer URL. Only relevant when is_apply_specific_affiliates is true.

is_hidden_affiliate boolean

Determines whether affiliates will see this offer URL or not in the affiliate UI / API.

Body Example
{
    "network_offer_id": 6,
    "name": "Offer Url Name",
    "destination_url": "http://destination-url.com/?tid={transaction_id}",
    "preview_url": "http://preview-url.com",
    "url_status": "active",
    "network_affiliate_ids": [
        7,
        14
    ],
    "is_apply_specific_affiliates": true,
    "is_hidden_affiliate": true
}

cURL
curl --request POST 'https://api.eflow.team/v1/networks/offerurls' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT BODY HERE>'
Response
{
  "network_id": 1,
  "network_offer_id": 6,
  "name": "Offer Url Name",
  "destination_url": "http://destination-url.com/?tid={transaction_id}",
  "preview_url": "http://preview-url.com",
  "url_status": "active",
  "network_affiliate_ids": [
    7,
    14
  ],
  "is_apply_specific_affiliates": true,
  "is_hidden_affiliate": true,
  "time_created": 1614285172,
  "time_saved": 1614285172
}

Create (Bulk)

POST /v1/networks/offerurls/bulk

Create multiple offer URL settings at the same time.

The endpoint takes an array of objects where each object is defined as :

network_offer_id int

The ID of the offer to which this offer URL is associated.

name string

The name of the offer URL.

destination_url string

The URL the offer URL will redirect to.

preview_url string

A preview URL, if it exists

url_status string

Status of the offer URL setting. Can be one of : active, paused, deleted.

is_apply_specific_affiliates boolean

Determines whether this offer URL applies to all affiliates or only to a select few. When true, the network_affiliate_ids array must be filled

network_affiliate_ids int array

The IDs of the affiliates that are to be affected by the offer URL. Only relevant when is_apply_specific_affiliates is true.

is_hidden_affiliate boolean

Determines whether affiliates will see this offer URL or not in the affiliate UI / API.

Body Example
[
  {
    "network_offer_id": 15,
    "name": "Offer Url A",
    "destination_url": "http://destination-url-a.com?tid={transaction_id}",
    "preview_url": "http://preview-url-a.com",
    "url_status": "active",
    "is_apply_specific_affiliates": false,
    "is_hidden_affiliate": false
  },
  {
    "network_offer_id": 15,
    "name": "Offer Url B",
    "destination_url": "http://destination-url-b.com?tid={transaction_id}",
    "preview_url": "http://preview-url-b.com",
    "url_status": "active",
    "is_apply_specific_affiliates": true,
    "network_affiliate_ids": [
	    7,
	    14
    ],
    "is_hidden_affiliate": false
  },
  {
    "network_offer_id": 16,
    "name": "Offer Url C",
    "destination_url": "http://destination-url-c.com?tid={transaction_id}",
    "preview_url": "http://preview-url-c.com",
    "url_status": "active",
    "is_apply_specific_affiliates": true,
    "network_affiliate_ids": [
    	14
    ],
    "is_hidden_affiliate": true
  }
]

cURL
curl --request POST 'https://api.eflow.team/v1/networks/offerurls/bulk' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT BODY HERE>'
Response
{
  "urls": [
    {
      "network_offer_url_id": 6,
      "network_id": 1,
      "network_offer_id": 15,
      "name": "Offer Url A",
      "destination_url": "http://destination-url-a.com?tid={transaction_id}",
      "preview_url": "http://preview-url-a.com",
      "url_status": "active",
      "network_affiliate_ids": null,
      "is_apply_specific_affiliates": false,
      "is_hidden_affiliate": false,
      "time_created": 1614285696,
      "time_saved": 1614285696
    },
    {
      "network_offer_url_id": 7,
      "network_id": 1,
      "network_offer_id": 15,
      "name": "Offer Url B",
      "destination_url": "http://destination-url-b.com?tid={transaction_id}",
      "preview_url": "http://preview-url-b.com",
      "url_status": "active",
      "network_affiliate_ids": [
        7,
        14
      ],
      "is_apply_specific_affiliates": true,
      "is_hidden_affiliate": false,
      "time_created": 1614285696,
      "time_saved": 1614285696
    },
    {
      "network_offer_url_id": 8,
      "network_id": 1,
      "network_offer_id": 16,
      "name": "Offer Url C",
      "destination_url": "http://destination-url-c.com?tid={transaction_id}",
      "preview_url": "http://preview-url-c.com",
      "url_status": "active",
      "network_affiliate_ids": [
        14
      ],
      "is_apply_specific_affiliates": true,
      "is_hidden_affiliate": true,
      "time_created": 1614285696,
      "time_saved": 1614285696
    }
  ]
}

Update

PUT /v1/networks/offerurls/:offerUrlId

Update an existing offer URL.

You must specify all the fields, not only the ones you wish to update.
If you omit a field that is not marked as required, its default value will be used.

Path Parameters

Parameter Description
offerUrlId The ID of the offer URL you want to update

Body Params

network_offer_url_id int

The unique ID of the offer URL.

network_offer_id int

The ID of the offer to which this offer URL is associated.

name string

The name of the offer URL.

destination_url string

The URL the offer URL will redirect to.

preview_url string

A preview URL, if it exists

url_status string

Status of the offer URL setting. Can be one of : active, paused, deleted.

is_apply_specific_affiliates boolean

Determines whether this offer URL applies to all affiliates or only to a select few. When true, the network_affiliate_ids array must be filled

network_affiliate_ids int array

The IDs of the affiliates that are to be affected by the offer URL. Only relevant when is_apply_specific_affiliates is true.

is_hidden_affiliate boolean

Determines whether affiliates will see this offer URL or not in the affiliate UI / API.

Body Example
{
    "network_offer_url_id": 1,
    "network_offer_id": 6,
    "name": "Offer Url Name",
    "destination_url": "http://destination-url.com/?tid={transaction_id}",
    "preview_url": "http://preview-url.com",
    "url_status": "active",
    "network_affiliate_ids": [
        7,
        14
    ],
    "is_apply_specific_affiliates": true,
    "is_hidden_affiliate": true
}

cURL
curl --request PUT 'https://api.eflow.team/v1/networks/offerurls/1' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT BODY HERE>'
Response
{
  "network_offer_url_id": 1,
  "network_id": 1,
  "network_offer_id": 6,
  "name": "Offer Url Name",
  "destination_url": "http://destination-url.com/?tid={transaction_id}",
  "preview_url": "http://preview-url.com",
  "url_status": "active",
  "network_affiliate_ids": [
    7,
    14
  ],
  "is_apply_specific_affiliates": true,
  "is_hidden_affiliate": true,
  "time_created": 1614284258,
  "time_saved": 1614285020
}