Skip to main content
POST
/
app
/
v0
/
ad
/
{tagid}
Serving an ad
curl --request POST \
  --url https://your_a2_service/app/v0/ad/{tagid} \
  --header 'Content-Type: application/json' \
  --data '
{
  "version": "<string>",
  "device": {
    "ext": "<unknown>",
    "geo": {
      "accuracy": 123,
      "city": "<string>",
      "country": "<string>",
      "ext": "<unknown>",
      "ipservice": 1,
      "lastfix": 1,
      "lat": 123,
      "lon": 123,
      "metro": "<string>",
      "region": "<string>",
      "regionfips104": "<string>",
      "type": 1,
      "utcoffset": 123,
      "zip": "<string>"
    },
    "ip": "<string>",
    "ua": "<string>"
  },
  "user": {
    "buyeruid": "<string>",
    "ext": "<unknown>",
    "gender": "M",
    "geo": {
      "accuracy": 123,
      "city": "<string>",
      "country": "<string>",
      "ext": "<unknown>",
      "ipservice": 1,
      "lastfix": 1,
      "lat": 123,
      "lon": 123,
      "metro": "<string>",
      "region": "<string>",
      "regionfips104": "<string>",
      "type": 1,
      "utcoffset": 123,
      "zip": "<string>"
    },
    "id": "<string>",
    "keywords": "<string>",
    "yob": 1
  }
}
'
{
  "ad": {
    "display": {
      "banner": {
        "img": "https://example.com/image.jpg"
      },
      "h": 1024,
      "w": 768
    },
    "id": "b56dc3bf-935d-4ee6-b1ed-f31bfc02be91"
  },
  "ext": {
    "ad_log": "YTU2ZDY2ZjctNDM4ZS00OTVjLWJiYTAtMjI4Mzk2MjQ0ZWVkfDA2NDI4NjYwLWY2NDMtNGVmNS05MzgzLTZjZmE1OGYxOGI2OXxjNTZkYzNiZi05MzVkLTRlZTYtYjFlZC1mMzFiZmMwMmJlOTF8NGJlMmQ4ZTYtYThhMS00NzI2LWEzMjAtNjkyNTYzMDkwZTQyfDllZjY2ZGM4LTBlMmMtNDlmMS05NDU3LWFmYmUwZGQ2ZjU3M3w1NTgxNmIzOTcxMWY5YjVhY2YzYjkwZTMxM2VkMjllNTE2NjU2MjNm",
    "message": "success"
  },
  "version": "0.1.0"
}

Path Parameters

tagid
string<uuid>
required

The ID of the placement.

Get from the advertising manager.

Body

application/json

AdRequest is used for requesting an ad.

AdRequest is used for requesting an ad.

version
string
required

Version of the SDK API.

device
object

Device object for the current ad request.

user
object

User object for the current ad request.

Response

Successfully served an ad

version
string
required

Version of the SDK API.

ad
object

Ad object.

errorcode
string | null

Error code if the request failed.

ext
any

Optional A2 specific extensions.