Skip to main content

Find Opportunities

POST 

/ad/v1/opportunity

Find ad opportunities for the user given optional screen sizes. This will generate a new ad api token that is returned in the response header.

Request

Header Parameters

    x-hz-ad-api-token X-Hz-Ad-Api-Token

    Optional header to make calling the endpoint faster by not requiring a new token to be generated.

Body

required

    screen_pixel_width Screen Pixel Width (integer)

    Width of the screen in pixels

    screen_pixel_height Screen Pixel Height (integer)

    Height of the screen in pixels

    country_code Country Code (string)required

    Possible values: >= 2 characters and <= 2 characters

    ISO 3166-1 alpha-2 country code for the user

    language_code Language Code (string)required

    Possible values: >= 2 characters and <= 3 characters

    ISO 639-2 language code

    device_id Device Id (string)

    Possible values: non-empty and <= 256 characters

    Unique Identifier for the device a session is started on. E.g should be the same for multiple users on the same device.

Responses

Successful Response

Response Headers

  • x-hz-ad-api-token

    string

    Provide this token to future requests for the same user to make their requests faster (as a new token doesn't need to be generated)

Schema

    opportunities

    object[]

    required

  • Array [

  • ad_url Ad Url (string)required

    The URL to the ad

    seconds Seconds (integer)required

    The number of seconds the ad is

    opportunity_id Opportunity Id (string)required

    Possible values: non-empty

    The ID of the ad opportunity

  • ]

Loading...