POST
/
app
/
v0
/
ad
/
{tagid}
curl --request POST \
  --url https://your_a2_service/app/v0/ad/{tagid} \
  --header 'Content-Type: application/json' \
  --data '{
  "device": {
    "ext": "<any>",
    "geo": {
      "accuracy": 123,
      "city": "<string>",
      "country": "<string>",
      "ext": "<any>",
      "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": "<any>",
    "gender": "M",
    "geo": {
      "accuracy": 123,
      "city": "<string>",
      "country": "<string>",
      "ext": "<any>",
      "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
  },
  "version": "<string>"
}'
{
  "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
required

The ID of the placement.

Get from the advertising manager.

Body

application/json
AdRequest is used for requesting an ad.
version
string
required

Version of the SDK API.

device
object | null

Device object for the current ad request.

user
object | null

User object for the current ad request.

Response

200
application/json
Successfully served an ad
version
string
required

Version of the SDK API.

ad
object | null

Ad object.

errorcode
string | null

Error code if the request failed.

ext
any

Optional A2 specific extensions.