Getting Started

Generating API Keys

Calling API Functions

JSON or XML

API Call Rate Limits

Affiliate Accounts

Functions

Types

Merchant Accounts

Functions

Types

GET Banners Function

Retrieves an array of banners, optionally filtered by one or more properties.


Syntax

GET https://api.commissionfactory.com/V1/Merchant/Banners?apiKey=[apiKey]&bannerGroupId=[bannerGroupId]&bannerGroupName=[bannerGroupName]&size=[size]&width=[width]&height=[height]&defaultForSize=[defaultForSize]

Parameters

Name Type Description
apiKey
Required
String A valid API key that represents a merchant account.
bannerGroupId
Optional
Integer If specified, filters results by banner group ID.
bannerGroupName
Optional
String If specified, filters results by banner group name.
size
Optional
BannerSize If specified, filters results by size name.
width
Optional
Integer If specified, filters results by width.
height
Optional
Integer If specified, filters results by height.
defaultForSize
Optional
Boolean If specified, filters results by the default for size flag.

Return Value

Type Description
BannerArray Represents zero or more banners.

Errors

Error Description
400 Bad Request One or more parameters could not be parsed correctly.
401 Unauthorised The API key is missing, invalid, or for a different account type; or the user account has been suspended or closed.
500 Internal Server Error An unexpected error occured while processing your request.
503 Service Unavailable The API call rate limit for the user account has been exceeded.
NOTE: As of 2019-02-01, the response from the server will change:
429 Too Many Requests

JSON XML

Example

Request

GET /V1/Merchant/Banners?apiKey=ABC123 HTTP/1.1
Accept: application/json
Host: api.commissionfactory.com
GET /V1/Merchant/Banners?apiKey=ABC123 HTTP/1.1
Accept: application/xml
Host: api.commissionfactory.com

Response

[
    {
        "Id": 1,
        "DateCreated": "2000-01-01T00:00:00.000",
        "DateModified": "2000-01-01T00:00:00.000",
        "BannerGroupId": 1,
        "BannerGroupName": " Default Group",
        "BannerGroupTargetUrl": "https://www.example.com/",
        "Name": "Banner 1",
        "Size": "Wide Skyscraper",
        "Width": 160,
        "Height": 600,
        "ImageUrl": "https://t.cfjump.com/0/a/1",
        "AltText": "Banner 1",
        "DefaultForSize": true
    },
    {
        "Id": 2,
        "DateCreated": "2000-01-01T00:00:00.000",
        "DateModified": "2000-01-01T00:00:00.000",
        "BannerGroupId": 1,
        "BannerGroupName": " Default Group",
        "BannerGroupTargetUrl": "https://www.example.com/",
        "Name": "Banner 2",
        "Size": "Wide Skyscraper",
        "Width": 160,
        "Height": 600,
        "ImageUrl": "https://t.cfjump.com/0/a/2",
        "AltText": "Banner 2",
        "DefaultForSize": false
    },
    {
        "Id": 3,
        "DateCreated": "2000-01-01T00:00:00.000",
        "DateModified": "2000-01-01T00:00:00.000",
        "BannerGroupId": 1,
        "BannerGroupName": " Default Group",
        "BannerGroupTargetUrl": "https://www.example.com/",
        "Name": "Banner 3",
        "Size": "Square Pop Up",
        "Width": 250,
        "Height": 250,
        "ImageUrl": "https://t.cfjump.com/0/a/3",
        "AltText": "Banner 3",
        "DefaultForSize": true
    }
]
<BannerArray xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://api.commissionfactory.com/V1/Merchant">
    <Banner>
        <Id>1</Id>
        <DateCreated>2000-01-01T00:00:00.000</DateCreated>
        <DateModified>2000-01-01T00:00:00.000</DateModified>
        <BannerGroupId>1</BannerGroupId>
        <BannerGroupName> Default Group</BannerGroupName>
        <BannerGroupTargetUrl>https://www.example.com/</BannerGroupTargetUrl>
        <Name>Banner 1</Name>
        <Size>Wide Skyscraper</Size>
        <Width>160</Width>
        <Height>600</Height>
        <ImageUrl>https://t.cfjump.com/0/a/1</ImageUrl>
        <AltText>Banner 1</AltText>
        <DefaultForSize>true</DefaultForSize>
    </Banner>
    <Banner>
        <Id>2</Id>
        <DateCreated>2000-01-01T00:00:00.000</DateCreated>
        <DateModified>2000-01-01T00:00:00.000</DateModified>
        <BannerGroupId>1</BannerGroupId>
        <BannerGroupName> Default Group</BannerGroupName>
        <BannerGroupTargetUrl>https://www.example.com/</BannerGroupTargetUrl>
        <Name>Banner 2</Name>
        <Size>Wide Skyscraper</Size>
        <Width>160</Width>
        <Height>600</Height>
        <ImageUrl>https://t.cfjump.com/0/a/2</ImageUrl>
        <AltText>Banner 2</AltText>
        <DefaultForSize>false</DefaultForSize>
    </Banner>
    <Banner>
        <Id>3</Id>
        <DateCreated>2000-01-01T00:00:00.000</DateCreated>
        <DateModified>2000-01-01T00:00:00.000</DateModified>
        <BannerGroupId>1</BannerGroupId>
        <BannerGroupName> Default Group</BannerGroupName>
        <BannerGroupTargetUrl>https://www.example.com/</BannerGroupTargetUrl>
        <Name>Banner 3</Name>
        <Size>Square Pop Up</Size>
        <Width>250</Width>
        <Height>250</Height>
        <ImageUrl>https://t.cfjump.com/0/a/3</ImageUrl>
        <AltText>Banner 3</AltText>
        <DefaultForSize>true</DefaultForSize>
    </Banner>
</BannerArray>

Related Links