Retrieve ads

POST /api/v1/content/

Retrieve ads

Retrieve ads

application/json

Body

  • The combination of orientations and ad types to get ads for.

    Additional properties are allowed.

    Hide combinations attributes Show combinations attributes object
    • portrait array[string]

      At least 0 but not more than 2 elements. Values are banner or interstitial.

    • landscape array[string]

      At least 0 but not more than 2 elements. Values are banner or interstitial.

  • Additional properties are allowed.

    Hide extra_parameters attributes Show extra_parameters attributes object

Responses

  • 429 application/json

    Too many requests

    Hide response attributes Show response attributes object
    • error Required

      The error code

      Default value is err_rate_limited.

    • wait integer Required

      The minimum number of seconds to wait before trying the same request again

  • 403 application/json

    Forbidden

    Hide response attribute Show response attribute object
    • error Required

      The error code

      Default value is err_forbidden.

  • 401 application/json

    Unauthorized

    Hide response attribute Show response attribute object
    • error Required

      The error code

      Default value is err_unauthorized.

  • 400 application/json

    Invalid data

    Hide response attributes Show response attributes object
    • error string Required

      The error code

    • errors object

      The name of the field

      Hide errors attribute Show errors attribute object
      • * array[string] Additional properties

        A list of errors for the field

  • 200 application/json

    Ads received

    Hide response attribute Show response attribute object
    • ads array[object]
      Hide ads attributes Show ads attributes object
      • ad object

        Additional properties are allowed.

        Hide ad attributes Show ad attributes object
        • type string

          The type of ad that was returned. Could be either image or text

        • width integer

          The actual width of the ad

        • height integer

          The actual height of the ad

        • scale integer

          The scaling number for the ad

      • html string

        The HTML content to show in the webview (if available). If this is null then the show url must be used.

      • url string(url)

        The url that should be loaded in the webview to show the ad.

      • The iso timestamp for when this ad is considered expired

POST /api/v1/content/
curl \
 --request POST 'https://www.appylar.com/api/v1/content/' \
 --header "Authorization: Bearer $ACCESS_TOKEN" \
 --header "Content-Type: application/json" \
 --data '{"combinations":{"portrait":["banner"],"landscape":["banner"]},"extra_parameters":{"banner_height":["50"],"age_restriction":["12"]}}'
Request examples
{
  "combinations": {
    "portrait": [
      "banner"
    ],
    "landscape": [
      "banner"
    ]
  },
  "extra_parameters": {
    "banner_height": [
      "50"
    ],
    "age_restriction": [
      "12"
    ]
  }
}
Response examples (429)
{
  "error": "err_rate_limited",
  "wait": 60
}
Response examples (403)
{
  "error": "err_forbidden"
}
Response examples (401)
{
  "error": "err_unauthorized"
}
Response examples (400)
{
  "error": "string",
  "errors": {
    "additionalProperty1": [
      "string"
    ],
    "additionalProperty2": [
      "string"
    ]
  }
}
Response examples (200)
{
  "ads": [
    {
      "ad": {
        "type": "string",
        "width": 320,
        "height": 50,
        "scale": 2
      },
      "html": "string",
      "url": "string",
      "expires_at": "string"
    }
  ]
}