Coupon Codes

Operations for coupon codes

Coupon Codes are a feature that allow you to track performance using codes unique to each partner. They are documented in detail on the Everflow Helpdesk/.


Find All

GET /v1/networks/couponcodes

Filters

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

Value Description
time_created Filter based on the creation time
time_saved Filter based on the last update time
coupon_status Filter based on the coupon status
coupon_code Filter based on the coupon name
network_offer_id Filter based on the offer id
network_affiliate_id Filter based on the affiliate id

Relationships

This endpoint supports the following additional relationships. Refer to our User Guide for usage.

Value Description
offer Includes the offer information
affiliate Includes the affiliate information

cURL
curl --request GET 'https://api.eflow.team/v1/networks/couponcodes' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
  "coupon_codes": [
        {
         "network_coupon_code_id": 1,
          "network_id": 1,
          "network_affiliate_id": 14,
          "network_offer_id": 4,
          "coupon_code": "Summer20",
          "coupon_status": "active",
          "internal_notes": "This coupon is only available to new customers",
          "start_date": "2020-06-01",
          "end_date": "2020-09-30"
        }
    ]
}

Find By ID

GET /v1/networks/couponcodes/:couponCodeId

Path Parameters

Parameter Description
couponCodeId The ID of the coupon code you want to fetch

cURL
curl --request GET 'https://api.eflow.team/v1/networks/couponcodes/1' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
 {
     "network_coupon_code_id": 1,
      "network_id": 1,
      "network_affiliate_id": 14,
      "network_offer_id": 4,
      "coupon_code": "Summer20",
      "coupon_status": "paused",
      "internal_notes": "This coupon is only available to new customers",
      "start_date": "2020-06-01",
      "end_date": "2020-09-30"
}

Create

POST /v1/networks/couponcodes

network_affiliate_id int

ID of the Affiliate for which the coupon applies.

network_offer_id int

ID of the offer for which the coupon applies.

coupon_code string

Coupon code value

coupon_status string

Status of the coupon code. Can be one of the following values: active or paused.

internal_notes string

Notes for internal usage.

start_date string

An optional date starting at which the coupon code can be used

start_date string

An optional date at which the coupon code becomes obsolete

{
      "network_coupon_code_id": 1,
      "network_id": 1,
      "network_affiliate_id": 14,
      "network_offer_id": 4,
      "coupon_code": "Summer20",
      "coupon_status": "active",
      "internal_notes": "This coupon is only available to new customers",
      "start_date": "2020-06-01",
      "end_date": "2020-09-30"
}

Update

PUT /v1/networks/couponcodes/:couponCodeId

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
couponCodeId The ID of the coupon code you want to update

network_affiliate_id int

ID of the Affiliate for which the coupon applies.

network_offer_id int

ID of the offer for which the coupon applies.

coupon_code string

Coupon code value

coupon_status string

Status of the coupon code. Can be one of the following values: active or paused.

internal_notes string

Notes for internal usage.

start_date string

An optional date starting at which the coupon code can be used

start_date string

An optional date at which the coupon code becomes obsolete

{
     "network_coupon_code_id": 1,
      "network_id": 1,
      "network_affiliate_id": 14,
      "network_offer_id": 4,
      "coupon_code": "Summer20",
      "coupon_status": "paused",
      "internal_notes": "This coupon is only available to new customers",
      "start_date": "2020-06-01",
      "end_date": "2020-09-30"
}

Delete

DELETE /v1/networks/couponcodes/:couponCodeId

Path Parameters

Parameter Description
couponCodeId The ID of the coupon code you want to delete

cURL
curl --request DELETE 'https://api.eflow.team/v1/networks/couponcodes/1' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
  "result": true
}