API

Serve ads

Returns served ads for the given placement and locale. Supports a preview mode when preview_token is provided — in that case eligibility filters are bypassed and no serve_token is minted. preview_token is a short-lived signed token minted by an authenticated merchant via the HQ CreateAdPreviewToken endpoint; the ad id is read from the token payload, never from a caller-supplied query parameter.

GET/v1/marketplace/ads/serve

Query Parameters

locale*string

BCP-47 locale tag for the consumer's language.

Example"is"
location?
placement*string
Value in"discovery"
preview_token?string

When set, preview mode is active — returns only the ad encoded in the token, without eligibility checks and without a serve_token.

Example"eyJhbGciOiJIUzI1NiJ9..."

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://api.noona.is/v1/marketplace/ads/serve?locale=is&placement=discovery"
{
  "items": [
    {
      "ad_id": "abc123def456",
      "creative": {
        "type": "image",
        "image": {
          "image": {
            "thumb": "https://placekitten.com/200/200",
            "image": "https://placekitten.com/200/300",
            "type": "thumbnail",
            "public_id": "https://placekitten.com/200/300"
          }
        },
        "text_overlay": {
          "image": {
            "thumb": "https://placekitten.com/200/200",
            "image": "https://placekitten.com/200/300",
            "type": "thumbnail",
            "public_id": "https://placekitten.com/200/300"
          },
          "overlay_text": "string"
        }
      },
      "action": {
        "type": "company",
        "experience": {
          "experience_id": "string"
        },
        "voucher": {
          "voucher_template_id": "string"
        },
        "scheduled_event": {
          "event_id": "string"
        }
      },
      "serve_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
    }
  ]
}
{
  "type": "generic_error",
  "message": "Time slot is not available."
}
{
  "type": "generic_error",
  "message": "Time slot is not available."
}
{
  "type": "generic_error",
  "message": "Time slot is not available."
}
{
  "type": "generic_error",
  "message": "Time slot is not available."
}
{
  "type": "generic_error",
  "message": "Time slot is not available.",
  "code": "preview_token_expired"
}
{
  "type": "generic_error",
  "message": "Time slot is not available."
}