API credentials

In order to access Vistar’s Ad Serving API, a unique Network ID and API key are required as credentials in order to authenticate. You can retrieve your unique Network ID and API key from the ad platform. After you retrieve your credentials, you must then use the Network ID and API key when making API calls to request for ads.

Note that your staging and production credentials are separate and can only be used for the corresponding staging and production endpoint URLs. For example, you cannot use your staging credentials for the production endpoint.

To retrieve the Network ID and API key

  1. Log in to the ad platform using one of the following URLs, depending on which environment you need to access:
  2. Click Networks in the side navigation bar. The Networks view appears.
  3. Click the name of the network. The network details view appears. The summary bar in this view includes the Network ID and API Key. You can use these unique credentials to authenticate and make ad requests to Vistar’s Ad Serving API.

To authenticate using your credentials

Depending on the environment, use the following endpoint URL to authenticate (using the network_id and api_key parameters) and make an ad request.

Note: See Ad Serving API for more information about the body parameters of the sample JSON request.

URL

Staging Production
POST http://staging.api.vistarmedia.com/api/v1/get_ad/json

Sample JSON request

{
  "network_id": "24ba0582-7648-48b2-a7f4-0af3783b55f0",
  "api_key": "eb7d6e26-5930-4fef-a3c7-aa023f31cefd",
  "device_id": "test-0",
  "Venue_id": "TM01",  
  "display_time": 1322455356,
  "device_attribute": [
    {
      "name":  "zipcode",
      "value": "19122"
    },
    {
      "name": "abc",
      "value":"xyz"
    }
  ],
  "display_area":[
    {
      "id":"Display-Area-1",
      "width": 1920,
      "height": 1080,
      "allow_audio": true,
      "supported_media": [
        "image/jpeg",
      ]
    }
  ]
}
Was this article helpful?
1 out of 1 found this helpful