Creatives
Fetch Creatives
/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 beimage
,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.
Body Params
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.
The value to search.
Examples
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
/v1/networks/creatives/:creativeId
Path Parameters
Parameter | Description |
---|---|
creativeId | The ID of the creative you want to fetch |
Request Example
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
/v1/networks/creatives
Body Params
Only required when you create a new creative on its own (not part of an offer creation)
Name of the creative.
Type of the creative. Can be one of the following values: image
, html
, link
, thumbnail
, email
, archive
, video
or text
.
Whether the creative is accessible by all affiliates.
Status of the creative. Can be either active
or deleted
.
HTML content of the creative. Required only if creative_type
is html
or email
.
Width of the creative. Required only if creative_type
is html
.
Height of the creative. Required only if creative_type
is html
.
Content of the From
field of the email. Required only if creative_type
is email
.
Content of the Subject
field of the email. Required only if creative_type
is email
.
ID of all offer linked to this creative.
Whether or not you want to apply to specific affiliates. Defaults to false.
Content of the creative. Should only be included if creative_type
is image
, thumbnail
, archive
or video
.
Temporary URL of the file, obtained by uploading the file through the API.
Name of the file
List of files attached to the creative. Should only be included if creative_type
is html
or email
.
Temporary URL of the file, obtained by uploading the file through the API.
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}}
.
The type of content in the asset. //NOT SURE
Name of the file.
URL of the file, obtained by uploading the file through the API.
Size of the file.
Width of the creative. Required only if creative_type
is image
.
Height of the creative. Required only if creative_type
is image
.
Payload Example
{
"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
}]
}
Request Example
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
/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 |
Body Params
Only required when you create a new creative on its own (not part of an offer creation)
Name of the creative.
Type of the creative. Can be one of the following values: image
, html
, thumbnail
, email
, archive
, video
or text
.
Whether the creative is accessible by all affiliates.
Status of the creative. Can be either active
or deleted
.
HTML content of the creative. Required only if creative_type
is html
or email
.
Width of the creative. Required only if creative_type
is html
.
Height of the creative. Required only if creative_type
is html
.
Content of the From
field of the email. Required only if creative_type
is email
.
Content of the Subject
field of the email. Required only if creative_type
is email
.
ID of all offer linked to this creative.
Whether or not you want to apply to specific affiliates. Defaults to false.
Content of the creative. Should only be included if creative_type
is image
, thumbnail
, archive
or video
.
Temporary URL of the file, obtained by uploading the file through the API.
Name of the file
List of files attached to the creative. Should only be included if creative_type
is html
or email
.
Temporary URL of the file, obtained by uploading the file through the API.
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}}
.
The type of content in the asset. //NOT SURE
Name of the file.
URL of the file, obtained by uploading the file through the API.
Size of the file.
Width of the creative. Required only if creative_type
is image
.
Height of the creative. Required only if creative_type
is image
.
Payload Example
{
"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
}]
}
Request Example
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
}
Bulk Edit
/v1/networks/patch/offers/creative/apply
This endpoint allows you to update selected fields of one or multiple creatives at the same time. It does not require the entire creative
object to be passed in the payload. Only the properties that need to be changed must be supplied.
Request Body
Body Param
IDs of the creatives to be patched.
List of fields to patch. See here for the list of types and their corresponding values.
Type of the field to patch. See here for the list of types.
Value of the field to patch. See here for the list of values.
Operator determining how the field will be used to modify the creatives. For the fields that are currently patchable, this will always be overwrite
.
Body Example
{
"network_offer_creative_ids":
[
1,
3
],
"fields":
[
{
"field_type": "creative_status",
"field_value": "paused",
"operator": "overwrite"
},
{
"field_type": "name",
"field_value": "New Patched Name",
"operator": "overwrite"
},
{
"field_type": "is_private",
"field_value": true,
"operator": "overwrite"
}
]
}
Request Examples
cURL
curl --request PATCH 'https://api.eflow.team/v1/networks/patch/offers/creative/apply' \
--header 'X-Eflow-API-Key: <INSERT API KEY>' \
--header 'Content-Type: application/json' \
--data '<INSERT BODY HERE>'
Example 1 : Pause multiple creatives at the same time :
{
"network_offer_creative_ids": [
3,
12
],
"fields": [
{
"field_type": "creative_status",
"field_value": "paused",
"operator": "overwrite"
}
]
}
Response
{
"result": true
}
Patchable Fields
The fields below are to be used in the Bulk Edit and Patch Preview endpoints documented above.
Fields
The name of the creative
Determines whether a creative is visible to partners or not.
The status of the creative. Can be active
, paused
or deleted