GET Audiences

Returns a list of your audiences.

Endpoint URL: https://api.carnivalmobile.com/v6/audiences

Examples

cURL

curl -X GET -u :$API_KEY -H 'Accept: application/json' https://api.carnivalmobile.com/v6/audiences

Return the specified number of audiences

curl -X GET -u :$API_KEY -H 'Accept: application/json' https://api.carnivalmobile.com/v6/audiences\?per\=10 

Return a specified number of audiences from a specific page

curl -X GET -u :$API_KEY -H 'Accept: application/json' https://api.carnivalmobile.com/v6/audiences\?per\=100\&page\=20

Result Format

200 OK

{
    "audiences": [
        {
            "name": "Testing phone",
            "created_at": "2014-06-27T04:21:03.762Z",
            "updated_at": "2015-03-19T02:36:33.932Z",
            "id": "XYZ",
            "test": true
        },
        {
            "name": "Auckland CBD",
            "created_at": "2014-10-23T23:13:32.747Z",
            "updated_at": "2015-05-04T03:22:16.501Z",
            "id": "ABC",
            "test": false
        }
    ]
}

401 Unauthorized

{
  "error":"unauthorized"
}

403 Forbidden

{
  "error":"your api client does not have the correct roles"
}

Usage

  • By default, this API will return the first 50 audiences each time.
  • You can determine the size of each page by passing the per parameter.
  • You can use the page parameter to change the page returned by the server.
  • You will know you've reached the end of the page if the number of audience records returned for a given page is less than per.

Contact us

Top