adTypes

This helper method will return the ids and names of the different ad types in Adbeat’s database.

Note: IDs returned by this method are subject to change at any time. So it’s best not to "hardcode" these IDs into your applications.
Request Cost: 1 unit, Result Cost: none

URL Format

http://api.adbeat.com/v3/{api-key}/adTypes
http://api.adbeat.com/v3/{api-key}/adTypes/{adTypeId}

Parameters

Parameter Name Meaning Default Value Notes
adTypeId filter (no filtering) Returns results for this specific ad type.

Return Fields

Field Name Example Notes
adTypeId text ID used for other API requests.
adTypeName Text User-friendly name for display in UI.
apiUnits 1 The number of API units consumed by this request.

Usage Example(s)

To get a list of all ad types do this:

http://api.adbeat.com/v3/{api-key}/adTypes

JSON Response

{
    "statusCode": 200,
    "numHits": 6,
    "hits": [{
        "adTypeName": "Text",
        "adTypeId": "text"
    }, {
        "adTypeName": "Text/Image",
        "adTypeId": "textimg"
    }, {
        "adTypeName": "Image",
        "adTypeId": "image"
    }, {
        "adTypeName": "Flash",
        "adTypeId": "flash"
    }, {
        "adTypeName": "HTML5",
        "adTypeId": "html5"
    }, {
        "adTypeName": "Video",
        "adTypeId": "video"
    }],
    "apiUnits": 1,
    "statusMsg": "successful adTypes request",
    "requestParameters": {},
    "handler": "adTypes"
}

You can also get the name of a specific ad type by passing the adTypeId like this:

http://api.adbeat.com/v3/{api-key}/adTypes/text

JSON Response

{
    "statusCode": 200,
    "numHits": 1,
    "hits": [{
        "adTypeName": "Text",
        "adTypeId": "text"
    }],
    "apiUnits": 1,
    "statusMsg": "successful adTypes/text request",
    "requestParameters": {
        "adTypeId": "text"
    },
    "handler": "adTypes"
}