GET /ads/{ad_id}

Retrieve ad widget data by ID.

Important: Use the accessToken returned by the POST /ads endpoint (NOT the token from /auth/token) as the Bearer token for this request.

Path parameters

  • ad_id string Required

    The ID of the ad to retrieve

Responses

  • 200 application/json

    Successful response

    Hide response attributes Show response attributes object
    • adId string Required

      Unique identifier for the ad

    • status string Required

      Status of the ad processing

      Values are pending, ready, or failed.

    • widgets array[object] Required
      Hide widgets attributes Show widgets attributes object
      • type string Required

        Widget type

        Values are food, hotels, events, experiences, packing, apps, mood, or recipes.

      • items array[object] Required

        List of widget items

        One of:
  • 403 application/json

    Token ad_id does not match requested ad_id

    Hide response attribute Show response attribute object
    • detail string
  • 404 application/json

    Ad not found

    Hide response attribute Show response attribute object
    • detail string
  • 500 application/json

    Failed to fetch ads

    Hide response attribute Show response attribute object
    • detail string
GET /ads/{ad_id}
curl \
 --request GET 'https://api.thankly.ai/ads/{ad_id}' \
 --header "Authorization: Bearer $ACCESS_TOKEN"
Response examples (200)
{
  "adId": "string",
  "status": "pending",
  "widgets": [
    {
      "type": "hotels",
      "items": [
        {
          "title": "The Plaza Hotel",
          "description": "Iconic luxury hotel in the heart of Manhattan with elegant rooms and world-class service",
          "link": "https://theplazany.com",
          "address": "768 5th Avenue, New York, NY 10019",
          "type": "hotels"
        }
      ]
    }
  ]
}
Response examples (403)
{
  "detail": "Token ad_id does not match requested ad_id"
}
Response examples (404)
{
  "detail": "Ad not found"
}
Response examples (500)
{
  "detail": "Failed to fetch ads"
}