Creatives

Operations for creatives

Fetch Creatives

POST /v1/networks/creativestable

This is the main endpoint to extract a list of creatives from the API. It’s possible to filter the postbacks returned by this endpoint using search / filters on :

  • The creative’s name (name)
  • The creative’s status (creative_status)
  • The creative’s type (creative_type) : the types can be image, html, thumbnail, email, archive, video, text, link
  • The creative’s offer name (network_offer_name)
  • The creative’s offer id (network_offer_id)

Paging

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

search_terms object array
search_type string

The name of the field used for search. Can be one of the following values: name, creative_status or creative_type, network_offer_name, network_offer_id. The name option can be used to search with a creative ID as well.

value string

The value to search.

cURL
curl --request POST 'https://api.eflow.team/v1/networks/creativestable' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT PAYLOAD>'

Example 1 : Fetch all active creatives

{
  "search_terms": [
    {
      "search_type": "creative_status",
      "value": "active"
    }
  ]
}

To fetch, for example, the second page of 50 active creatives postbacks you would run the following call :

curl --request POST 'https://api.eflow.team/v1/networks/creativestable?page=2&page_size=50' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '{
  "search_terms": [
    {
      "search_type": "creative_status",
      "value": "active"
    }
  ]
}'

Example 2 : Fetch active creatives linked to offer ID 178

{
  "search_terms": [
    {
      "search_type": "creative_status",
      "value": "active"
    },
    {
      "search_type": "network_offer_id",
      "value": "178"
    }
  ]
}

Example 3 : Fetch creatives with a name that contains the word “Christmas”

{
  "search_terms": [
    {
      "search_type": "network_offer_name",
      "value": "Christmas"
    }
  ]
}

Example 4 : Fetch active creatives of type “email”

{
  "search_terms": [
    {
      "search_type": "creative_status",
      "value": "active"
    },
    {
      "search_type": "creative_type",
      "value": "email"
    }
  ]
}
Response
{
  "creatives": [
    {
      "network_offer_creative_id": 20985,
      "network_id": 1,
      "name": "exemple creative 1",
      "network_offer_id": 5,
      "network_offer_name": "Example Offer CPA",
      "creative_type": "image",
      "is_private": false,
      "creative_status": "active",
      "resource_url": "https://1.efuserassets.com/1/offers/5/c/1234/image.png",
      "html_code": "",
      "width": 300,
      "height": 300,
      "email_from": "",
      "email_subject": "",
      "time_created": 1607093608,
      "time_saved": 1607093608,
      "optimized_thumbnail_url": "https://1.efuserassets.com/thumbnails/1/offers/5/c/1234/image.png"
    }
  ],
  "paging": {
    "page": 1,
    "page_size": 10,
    "total_count": 2
  }
}


Find By ID

GET /v1/networks/creatives/:creativeId

Path Parameters

Parameter Description
creativeId The ID of the creative you want to fetch

cURL
curl --request GET 'https://api.eflow.team/v1/networks/creatives/<INSERT CREATIVE ID>' \
--header 'X-Eflow-API-Key: <INSERT API KEY>'
Response
{
    "network_offer_creative_id": 1,
    "network_id": 1,
    "network_offer_id": 73,
    "name": "test",
    "creative_type": "image",
    "is_private": false,
    "creative_status": "active",
    "resource_url": "https://usercontent-dev.everflowclient.io/1/offers/73/c/1/testcreative.png",
    "html_code": "",
    "width": 0,
    "height": 0,
    "email_from": "",
    "email_subject": "",
    "time_created": 1602865402,
    "time_saved": 1602865403,
    "relationship": {
        "offer": {
            "network_offer_id": 73,
            "network_id": 1,
            "network_advertiser_id": 39,
            "network_offer_group_id": 0,
            "name": "Candy Crush",
            "offer_status": "active",
            "network_tracking_domain_id": 1,
            "visibility": "public",
            "currency_id": "USD"
        },
        "resource_asset": {
            "network_asset_id": 1,
            "content_type": "image/png",
            "filename": "testcreative.png",
            "url": "https://usercontent-dev.everflowclient.io/1/offers/73/c/1/testcreative.png",
            "file_size": 5287,
            "image_width": 0,
            "image_height": 0
        }
    },
    "additional_offer_ids": null,
    "is_apply_specific_affiliates": false
}

Create

POST /v1/networks/creatives

network_offer_id int

Only required when you create a new creative on its own (not part of an offer creation)

name string

Name of the creative.

creative_type string

Type of the creative. Can be one of the following values: image, html, link, thumbnail, email, archive, video or text.

is_private boolean

Whether the creative is accessible by all affiliates.

creative_status string

Status of the creative. Can be either active or deleted.

html_code string

HTML content of the creative. Required only if creative_type is html or email.

width int

Width of the creative. Required only if creative_type is html.

height int

Height of the creative. Required only if creative_type is html.

email_from string

Content of the From field of the email. Required only if creative_type is email.

email_subject string

Content of the Subject field of the email. Required only if creative_type is email.

additional_offer_ids int array

ID of all offer linked to this creative.

is_apply_specific_affiliates boolean

Whether or not you want to apply to specific affiliates. Defaults to false.

resource_file object

Content of the creative. Should only be included if creative_type is image, thumbnail, archive or video.

temp_url string

Temporary URL of the file, obtained by uploading the file through the API.

original_file_name string

Name of the file

html_files object array

List of files attached to the creative. Should only be included if creative_type is html or email.

temp_url string

Temporary URL of the file, obtained by uploading the file through the API.

original_file_name string

Name of the file, which will be the used to generate the file macro. For example, Example File Name will give the macro {{example_file_name}}.

html_assets object array
content_type string

The type of content in the asset. //NOT SURE

filename string

Name of the file.

url string

URL of the file, obtained by uploading the file through the API.

file_size int

Size of the file.

image_width int

Width of the creative. Required only if creative_type is image.

image_height int

Height of the creative. Required only if creative_type is image.

{
    "network_offer_id": 73,
    "name": "",
    "creative_type": "image",
    "is_private": false,
    "creative_status": "active",
    "html_code": "",
    "width": 0,
    "height": 0,
    "email_from": "",
    "email_subject": "",
    "additional_offer_ids": [],
    "is_apply_specific_affiliates": false,
    "resource_file":
    {
        "temp_url": "https://usercontent-dev.everflowclient.io/1/temp/30e093f3-54bd-445f-9afb-291e506af466",
        "original_file_name": "original_name"
    },
    "html_files": [
    {
        "temp_url": "",
        "original_file_name": ""
    }],
    "html_assets": [
    {
        "content_type": "",
        "filename": "",
        "url": "",
        "file_size": 0,
        "image_width": 0,
        "image_height": 0
    }]
}

cURL
curl --request POST \
  --url 'https://api.eflow.team/v1/networks/creatives' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
    "network_offer_creative_id": 10,
    "network_id": 1,
    "network_offer_id": 73,
    "name": "",
    "creative_type": "image",
    "is_private": false,
    "creative_status": "active",
    "resource_url": "https://usercontent-dev.everflowclient.io/1/offers/73/c/10/original_name",
    "html_code": "",
    "width": 0,
    "height": 0,
    "email_from": "",
    "email_subject": "",
    "time_created": 1603890208,
    "time_saved": 1603890209,
    "relationship": {
        "offer": {
            "network_offer_id": 73,
            "network_id": 1,
            "network_advertiser_id": 39,
            "network_offer_group_id": 0,
            "name": "Candy Crush",
            "offer_status": "active",
            "network_tracking_domain_id": 1,
            "visibility": "public",
            "currency_id": "USD"
        },
        "resource_asset": {
            "network_asset_id": 7,
            "content_type": "image/gif",
            "filename": "original_name",
            "url": "https://usercontent-dev.everflowclient.io/1/offers/73/c/10/original_name",
            "file_size": 6,
            "image_width": 0,
            "image_height": 0
        }
    },
    "additional_offer_ids": null,
    "is_apply_specific_affiliates": false
}

Update

PUT /v1/networks/creatives/:creativeId

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
creativeId The ID of the creative you want to update

network_offer_id int

Only required when you create a new creative on its own (not part of an offer creation)

name string

Name of the creative.

creative_type string

Type of the creative. Can be one of the following values: image, html, thumbnail, email, archive, video or text.

is_private boolean

Whether the creative is accessible by all affiliates.

creative_status string

Status of the creative. Can be either active or deleted.

html_code string

HTML content of the creative. Required only if creative_type is html or email.

width int

Width of the creative. Required only if creative_type is html.

height int

Height of the creative. Required only if creative_type is html.

email_from string

Content of the From field of the email. Required only if creative_type is email.

email_subject string

Content of the Subject field of the email. Required only if creative_type is email.

additional_offer_ids int array

ID of all offer linked to this creative.

is_apply_specific_affiliates boolean

Whether or not you want to apply to specific affiliates. Defaults to false.

resource_file object

Content of the creative. Should only be included if creative_type is image, thumbnail, archive or video.

temp_url string

Temporary URL of the file, obtained by uploading the file through the API.

original_file_name string

Name of the file

html_files object array

List of files attached to the creative. Should only be included if creative_type is html or email.

temp_url string

Temporary URL of the file, obtained by uploading the file through the API.

original_file_name string

Name of the file, which will be the used to generate the file macro. For example, Example File Name will give the macro {{example_file_name}}.

html_assets object array
content_type string

The type of content in the asset. //NOT SURE

filename string

Name of the file.

url string

URL of the file, obtained by uploading the file through the API.

file_size int

Size of the file.

image_width int

Width of the creative. Required only if creative_type is image.

image_height int

Height of the creative. Required only if creative_type is image.

{
    "network_offer_id": 73,
    "name": "",
    "creative_type": "image",
    "is_private": false,
    "creative_status": "active",
    "html_code": "",
    "width": 0,
    "height": 0,
    "email_from": "",
    "email_subject": "",
    "additional_offer_ids": [],
    "is_apply_specific_affiliates": false,
    "resource_file":
    {
        "temp_url": "https://usercontent-dev.everflowclient.io/1/temp/30e093f3-54bd-445f-9afb-291e506af466",
        "original_file_name": "original_name"
    },
    "html_files": [
    {
        "temp_url": "",
        "original_file_name": ""
    }],
    "html_assets": [
    {
        "content_type": "",
        "filename": "",
        "url": "",
        "file_size": 0,
        "image_width": 0,
        "image_height": 0
    }]
}

cURL
curl --request PUT \
  --url 'https://api.eflow.team/v1/networks/creatives/<INSERT CREATIVE ID>' \
  --header 'x-eflow-api-key: <INSERT API KEY>' \
  --header 'content-type: application/json' \
  --data '<INSERT PAYLOAD>'
Response
{
    "network_offer_creative_id": 10,
    "network_id": 1,
    "network_offer_id": 73,
    "name": "",
    "creative_type": "image",
    "is_private": false,
    "creative_status": "active",
    "resource_url": "https://usercontent-dev.everflowclient.io/1/offers/73/c/10/original_name",
    "html_code": "",
    "width": 0,
    "height": 0,
    "email_from": "",
    "email_subject": "",
    "time_created": 1603890208,
    "time_saved": 1603890209,
    "relationship": {
        "offer": {
            "network_offer_id": 73,
            "network_id": 1,
            "network_advertiser_id": 39,
            "network_offer_group_id": 0,
            "name": "Candy Crush",
            "offer_status": "active",
            "network_tracking_domain_id": 1,
            "visibility": "public",
            "currency_id": "USD"
        },
        "resource_asset": {
            "network_asset_id": 7,
            "content_type": "image/gif",
            "filename": "original_name",
            "url": "https://usercontent-dev.everflowclient.io/1/offers/73/c/10/original_name",
            "file_size": 6,
            "image_width": 0,
            "image_height": 0
        }
    },
    "additional_offer_ids": null,
    "is_apply_specific_affiliates": false
}