Sign in | Sign up

eventTypes

This helper method will return the ids and names of the different event 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}/eventTypes
http://api.adbeat.com/v3/{api-key}/eventTypes/{eventTypeId}

Parameters

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

Return Fields

Field Name Example Notes
eventTypeId newAd ID used for other API requests.
eventTypeName New Ad 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 event types do this:

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

JSON Response

{
    "statusCode": 200,
    "numHits": 3,
    "hits": [{
        "eventTypeName": "New Ad",
        "eventTypeId": "newAd"
    }, {
        "eventTypeName": "New Publisher",
        "eventTypeId": "newPublisher"
    }, {
        "eventTypeName": "New Network",
        "eventTypeId": "newNetwork"
    }],
    "apiUnits": 1,
    "statusMsg": "successful eventTypes request",
    "requestParameters": {},
    "handler": "eventTypes"
}

You can also get the name of a specific event type by passing the eventTypeId like this:

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

JSON Response

{
    "statusCode": 200,
    "numHits": 1,
    "hits": [{
        "eventTypeName": "New Ad",
        "eventTypeId": "newAd"
    }],
    "apiUnits": 1,
    "statusMsg": "successful eventTypes/newAd request",
    "requestParameters": {
        "eventTypeId": "newAd"
    },
    "handler": "eventTypes"
}