API

APIs for Rocketium Campaign

get
Get creatives from a project

https://code.rocketium.com/v1/creatives
Projects in Campaign consist of multiple variants. Each variant can have multiple creatives within them of different sizes. This API helps you fetch creatives in a project whose metadata matches the input query parameters most closely.
Request
Response
Request
Headers
access_token
required
string
Your API key
Content-Type
required
string
This value should be application/json
Query Parameters
size
optional
string
Dimensions of the creative that should be returned. This should be in the format widthxheight. If this is not specified , the size closest to square is returned.
project-id
required
string
ID of the project from which we want to fetch a creative
output-format
optional
string
Can be one of media or json. If it is media, binary data of the image or video is returned. If it is json, all the input query parameters, custom metadata of the creative, and the image / video URL are returned. media is the default value if nothing is provided.
any-other-parameter
optional
string
All additional query parameters will be used to find the most matching variant. Query parameters will be converted to lowercase and URL-decoded before searching for variants. The variant with the most matching metadata fields will be returned. This means that you can pass any number of additional parameters without worrying about breaking the search. If multiple variants have the exact same amount of matching metadata fields, one of them will be returned. This means that if no variants match any of the fields, any variant in the project can be returned.
Response
200: OK
A successful request results in the response containing an image or video URL. Any additional query parameters passed as metadata will be returned with the response.
Media output
JSON output
Media output
{
"url": "https://rocketium.com/images/example.png"
}
JSON output
{
"url": "https://rocketium.com/images/example.png",
"query-parameter-1": "same-value-as-what-was-in-the-GET-request",
"query-parameter-2": "same-value-as-what-was-in-the-GET-request",
...
"query-parameter-n": "same-value-as-what-was-in-the-GET-request",
"custom-metadata-1": "some value",
"custom-metadata-2": "some value",
...
"custom-metadata-n": "some value"
}
403: Forbidden
This status code is returned if the specified project belongs to a different account than the owner of the access token.
404: Not Found
This status code is returned if the project-id does not exist, project-id is not rendered, or if project-id has no creatives.