Coupon Codes

Operations related to coupon codes

Coupon codes are optional in Everflow but can exist at the offer level. There can be 0, 1 or more coupon codes associated with any given offer.

The coupon codes returned by the API will only be for offers on which you can currently run traffic (i.e. not blocked and not pending approval on the offer).

The “Coupon Code” Object

Though different versions of the deals object are returned by the endpoints documented here, it can be defined as such :

network_coupon_code_id int

The coupon code’s unique identifier

network_id int

The identifier of the network associated with the coupon code

network_offer_id int

The identifier of the offer the coupon code applies to

coupon_code string

The coupon code itself – this is the value that must supplied at the time of the click / conversion that will associate the event to the coupon code.

coupon_status string

Can be active or paused, though at this point only active coupon codes are returned by the endpoints documented here.

tracking_link string

Only relevant if clicks are sent using a coupon code. The tracking link with the coupon code can be used instead of the “standard tracking links” that you would get through the endpoint documented here.

start_date string

An optional start date before which the coupon code is not valid. YYYY-MM-DD format.

end_date string

An optional end date after which the coupon code is not valid. YYYY-MM-DD format.

description string

An optional description of the coupon code. May include HTML code – see the is_description_plain_text field

is_description_plain_text boolean

Determines whether the description field contains HTML code or only plain text.

time_created int

Timestamp (unix time) representing the moment at which the coupon code was created

time_saved int

Timestamp (unix time) representing the moment at which the coupon code was last saved


Get All Coupon Codes

GET /v1/affiliates/couponcodes

This endpoint allows you to fetch the all the active coupon codes you have access to. It will only return coupon codes that are currently active on which you can run traffic.

Returns an empty array if no coupon code exist.

cURL
curl --request GET 'https://api.eflow.team/v1/affiliates/couponcodes' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'content-type: application/json'
Response
{
  "coupon_codes": [
    {
      "network_coupon_code_id": 132,
      "network_id": 1,
      "network_offer_id": 16,
      "coupon_code": "WINTER25",
      "coupon_status": "active",
      "tracking_link": "https://www.example-tracking-link.com/WINTER25/",
      "start_date": "2025-01-01",
      "end_date": "2025-06-01",
      "description": "25% off on all winter jackets",
      "is_description_plain_text": true,
      "time_created": 1585177030,
      "time_saved": 1737590006,
      "relationship": {
        "offer": {
          "network_offer_id": 16,
          "network_id": 1,
          "name": "Winter Jackets",
          "offer_status": "active"
        }
      }
    },
    {
      "network_coupon_code_id": 152,
      "network_id": 1,
      "network_offer_id": 18,
      "coupon_code": "PANTS35",
      "coupon_status": "active",
      "start_date": "",
      "end_date": "",
      "description": "35$ off on <strong>dress pants</strong> at all times",
      "is_description_plain_text": false,
      "tracking_link": "https://www.example-tracking-link.com/PANTS35/",
      "time_created": 1586909228,
      "time_saved": 1586909228,
      "relationship": {
        "offer": {
          "network_offer_id": 18,
          "network_id": 1,
          "name": "Dress Pants",
          "offer_status": "active"
        }
      }
    }
  ]
}