Select one of the API methods in the right sidebar to see information about it: request parameters, response and error codes. Each method has an example on how to use it and examples for each type of response.
1. create-banner
Returns the Bannersnack editor URL.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentication. We associate the user with the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
identifier (required) | string | A unique identifier for every user. |
name | string | User's name. |
multiple_slides | integer | Possible values:
|
animations | integer | Possible values:
|
cancel_url | string | If specified, there will be a "Close banner maker" link in the editor which, if clicked, will redirect the user to the specified link. |
use_banner_url | string | If specified, it will redirect the user to the specified link upon banner Save. |
mode | string | Possible values:
|
from | string | Requires a banner hash. |
width, height | integer | If provided, the editor will load a blank banner with the specified width and height. Maximum value is 3000 and minimum value is 10. |
Response parameters
If the request is successful the API will return a json object with 2 keys.
Name | Type | Description |
code | integer | The code will indicate the status of your request. |
url | string | The URL to the Bannersnack editor. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=create-banner"\ -F "t=1461758852"\ -F "[email protected]"\ -F "name=Name"\ -F "animations=1"\ -F "use_banner_url=http://www.bannersnack.com"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
2. create-bannerset
Returns the Bannersnack generator URL.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentification. We associate the user to the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
identifier (required) | string | A unique identifier for every user. |
name | string | User's name. |
animations | integer | Posible values:
|
cancel_url | string | If specified, there will be a "Close banner maker" link in generator which, if clicked, will redirect the user to the specified link. |
use_banner_url | string | If specified, there will be a "Use this banner" button for each banner in the banners list which, if clicked, will redirect the user to the specified link along with the banner hash. |
mode | string | Posible values:
|
from_bannerset | string | Requires a bannerset hash. |
Response parameters
If the request is successful the API will return a json object with 2 keys.
Name | Type | Description |
code | integer | The code will indicate the status of your request. |
url | string | The URL to the Bannersnack generator. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=create-bannerset"\ -F "t=1461758852"\ -F "[email protected]"\ -F "name=Name"\ -F "animations=1"\ -F "use_banner_url=http://www.bannersnack.com"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
Response example
{ code: 200, data: { url: "www.your-domain.com/banner-creator/generator/?UA_PHPSESSID=9ad00a24a36cb816cb166wc9ff89c95b" } }
3. edit-banner
Returns the Bannersnack editor URL with the requested banner loaded for edit.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentification. We associate the user to the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
identifier (required) | string | A unique identifier for every user. |
banner_hash | string | The hash of the banner to be edited. |
Response parameters
If the request is successful the API will return a json object with 2 keys.
Name | Type | Description |
code | integer | The code will indicate the status of your request. |
url | string | The URL to the Bannersnack editor with the requested banner loaded for editing. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=edit-banner"\ -F "t=1461758852"\ -F "[email protected]"\ -F "banner_hash=bh3yhqam"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
4. edit-bannerset
Returns the Bannersnack generator URL with the requested banner loaded for edit.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentification. We associate the user to the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
identifier (required) | string | A unique identifier for every user. |
bannerset_hash | string | The hash of the bannerset to be edited. |
Response parameters
If the request is successful the API will return a json object with 2 keys.
Name | Type | Description |
code | integer | The code will indicate the status of your request. |
url | string | The URL to the Bannersnack generator with the requested banner loaded for editing. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=edit-bannerset"\ -F "t=1461758852"\ -F "[email protected]"\ -F "bannerset_hash=bh3yhqam"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
Curl example
{ code: 200, data: { url: "www.your-domain.com/banner-creator/generator/edit/?hash=btn365ic&UA_PHPSESSID=f969fd314b7861078b9542a2e3a9d8ed" } }
5. get-banner-urls
Returns the requested banner urls. Once the request was completed and the banner files are generated the status will be displayed as 'done', otherwise it will be displayed as 'pending'.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentification. We associate the user to the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
banner_hash (required) | string | The banner hash to get urls for. |
Response parameters
If the request is successful the API will return an array with 3 objects. Each object will have the following parameters:
Name | Type | Description |
type | string | The type of file for which the url is returned.
|
url | string | The URL to the banner. |
status | string | The status of the banner
|
Error codes
Code | Message | Explanation |
510 | The request has expired | The request couldn't be completed. Check your server datetime. |
511 | Maintenance mode | The API servers have entered in maintenance mode and cannot complete any requests. In this case you should try again later. |
512 | Client id not found | Given Client ID is not found in the database. |
513 | Invalid signature | The signature you provided is incorrect - it does not match the request. |
514 | Bad request | Your request is incorrectly formatted or cannot be otherwise served. |
515 | Disabled domain | The domain you requested is disabled. You are not allowed to access the specified domain. |
520 | Missing mandatory parameter | The request does not contain one or more required parameters. There are 5 required parameters for this request: client_id, signature, action, banner_hash and t. |
521 | Internal server error | An error occurred on the server and the request could not be completed. In this case you should resend the request after a few seconds. If the request still fails after several attempts, please contact us. |
531 | Banner not found | You are trying to access a banner that does not exist or you don't have access to it. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=get-banner-urls"\ -F "t=1461758852"\ -F "banner_hash=ihagcdk4"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
6. get-bannerset-urls
Returns the requested bannerset urls. Once the request was completed and the banner files are generated the status will be displayed as 'done', otherwise it will be displayed as 'pending'.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentification. We associate the user to the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
bannerset_hash (required) | string | The bannerset hash to get urls for. |
Response parameters
If the request is successful the API will return an array with objects. Each object will have the following parameters:
Name | Type | Description |
bannerHash | string | The hash of the banner from bannerset. |
urls | array | An array with 3 objects. Each object will have the following parameters:
urlstringThe URL to the banner.statusstringThe status of the banner
|
Error codes
Code | Message | Explanation |
510 | The request has expired | The request couldn't be completed. Check your server datetime. |
511 | Maintenance mode | The API servers have entered in maintenance mode and cannot complete any requests. In this case you should try again later. |
512 | Client id not found | Given Client ID is not found in the database. |
513 | Invalid signature | The signature you provided is incorrect - it does not match the request. |
514 | Bad request | Your request is incorrectly formatted or cannot be otherwise served. |
515 | Disabled domain | The domain you requested is disabled. You are not allowed to access the specified domain. |
520 | Missing mandatory parameter | The request does not contain one or more required parameters. There are 5 required parameters for this request: client_id, signature, action, bannerset_hash and t. |
521 | Internal server error | An error occurred on the server and the request could not be completed. In this case you should resend the request after a few seconds. If the request still fails after several attempts, please contact us. |
531 | Banner not found | You are trying to access a banner that does not exist or you don't have access to it. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=get-bannerset-urls"\ -F "t=1461758852"\ -F "bannerset_hash=ihagcdk4"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
Response example
{ code: 200, data: [ { bannerHash: "bduny9j1", urls: [ { type: "jpg", url: "https://s3.amazonaws.com/files/banners/bduny9j1/images/jpg", status: "done" }, { type: "png", url: "https://s3.amazonaws.com/files/banners/bduny9j1/images/png", status: "done" }, { type: "html5", url: "http://exporthtml5.bannersnack.com/save/?hash=bduny9j1&key=86f154241c36b08ed4140568b6759f3c", status: "done" } ] }, { bannerHash: "btjig85k", urls: [ { type: "jpg", url: "https://s3.amazonaws.com/files/banners/btjig85k/images/jpg", status: "done" }, { type: "png", url: "https://s3.amazonaws.com/files/banners/btjig85k/images/png", status: "done" }, { type: "html5", url: "http://exporthtml5.bannersnack.com/save/?hash=btjig85k&key=c79a86d27c3988f5abe91d6311f0d07a", status: "done" } ] }, { bannerHash: "bdcj2m9t", urls: [ { type: "jpg", url: "https://s3.amazonaws.com/files/banners/bdcj2m9t/images/jpg", status: "done" }, { type: "png", url: "https://s3.amazonaws.com/files/banners/bdcj2m9t/images/png", status: "done" }, { type: "html5", url: "http://exporthtml5.bannersnack.com/save/?hash=bdcj2m9t&key=6aca5af1c25ecac5b99a1dc922ce757a", status: "done" } ] }, { bannerHash: "bt95bf8p", urls: [ { type: "jpg", url: "https://s3.amazonaws.com/files/banners/bt95bf8p/images/jpg", status: "done" }, { type: "png", url: "https://s3.amazonaws.com/files/banners/bt95bf8p/images/png", status: "done" }, { type: "html5", url: "http://exporthtml5.bannersnack.com/save/?hash=bt95bf8p&key=a2871e2e2730ecaa56a6748724893f29", status: "done" } ] } }
7. get-user-banners
Returns a banner or a list of banners from a specific user.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentification. We associate the user to the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
identifier (required) | string | A unique identifier for every user. |
type | string | Banner type, one of: |
bannerset_hash | string | The bannerset hash. |
Response parameters
If the request is successful the API will return an array with banners. Each banner will have the following objects:
Name | Type | Description |
bannerHash | string | The hash of the banner that has been found. |
name | string | The name of the banner. |
image | string | The path of the banner. |
dateCreated | timestamp | The date when the banner was created. |
dateLastUpdate | timestamp | The last date when the banner was updated. |
width | integer | The width of the banner. |
height | integer | The height of the banner. |
type | string | The type of the banner: |
numberOfBanners | string | The number of the banners from bannerset or null if the type is banner. |
animated | bool | Returns |
exports | array | List of generated exports. |
Error codes
Code | Message | Explanation |
510 | The request has expired | The request couldn't be completed. Check your server datetime. |
511 | Maintenance mode | The API servers have entered in maintenance mode and cannot complete any requests. In this case you should try again later. |
512 | Client id not found | Given Client ID is not found in the database. |
513 | Invalid signature | The signature you provided is incorrect - it does not match the request. |
514 | Bad request | Your request is incorrectly formatted or cannot be otherwise served. |
515 | Disabled domain | The domain you requested is disabled. You are not allowed to access the specified domain. |
520 | Missing mandatory parameter | The request does not contain one or more required parameters. There are 5 required parameters for this request: client_id, signature, action, identifier and t. |
521 | Internal server error | An error occurred on the server and the request could not be completed. In this case you should resend the request after a few seconds. If the request still fails after several attempts, please contact us. |
534 | Identifier not found | You are trying to access banners from an identifier that does not exist. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=get-user-banners"\ -F "t=1461758852"\ -F "[email protected]"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
8. start-banner-export
Returns the status of the request.
Note: Requests must be made to http://www.bannersnack.com/wapi/2.0/
or http://your-domain/wapi/2.0/
.
Request parameters
Name | Type | Description |
client_id (required) | string | The client_id parameter is required for authentification. We associate the user with the client ID provided. Find out how can you obtain your client ID. |
signature (required) | string | The signature must be calculated by you and added to the request. See How to sign a request for more information. |
action (required) | string | The API method that should be called. In this case the value should be |
t (required) | timestamp | Specifies the current timestamp in seconds. |
banner_hash (required) | string | The banner hash. |
type (required) | string | Export type, one of: |
Response parameters
If the request is successful the API will return an object containing the status of the request
Name | Type | Description |
status | string | The status of the request
|
Error codes
Code | Message | Explanation |
510 | The request has expired | The request couldn't be completed. Check your server datetime. |
511 | Maintenance mode | The API servers have entered in maintenance mode and cannot complete any requests. In this case you should try again later. |
512 | Client id not found | Given Client ID is not found in the database. |
513 | Invalid signature | The signature you provided is incorrect - it does not match the request. |
514 | Bad request | Your request is incorrectly formatted or cannot be otherwise served. |
515 | Disabled domain | The domain you requested is disabled. You are not allowed to access the specified domain. |
520 | Missing mandatory parameter | The request does not contain one or more required parameters. There are 5 required parameters for this request: client_id, signature, action, banner_hash and t. |
521 | Internal server error | An error occurred on the server and the request could not be completed. In this case you should resend the request after a few seconds. If the request still fails after several attempts, please contact us. |
530 | Invalid format type | The resource you are trying to access must have a valid format. |
531 | Banner not found | You are trying to access a banner that does not exist or you don't have access to it. |
Example
Curl example
curl -F "client_id=2AF832"\ -F "action=start-banner-export"\ -F "t=1461758852"\ -F "banner_hash=ihagcdk4"\ -F "type=mp4"\ -F "signature=0a85db3d41d0b432465d2c5d33d2937904f4ec32"\ http://www.bannersnack.com/wapi/2.0/
Ready to start designing?
👉 Sign up for a free Bannersnack account – it only takes a minute.
👉 Already have an account? Log in here to continue where you left off.