---
title: "Request VAST sponsorship units"
method: GET
path: "/v2/ads"
tags: ["sponsorship"]
---

# Request VAST sponsorship units

`GET /v2/ads`

**Not** for use by NPR One clients (for whom sponsorship is already integrated into the Listening Service), this endpoint is designed to be used by our other client applications to request sponsorship on behalf of a user. Sponsorship units are returned in the form of VAST XML. It is worth noting that this endpoint attempts to always return XML, even in the case of exceptions.

The default behavior of this endpoint is asynchronous; on an initial request, a call to our external sponsorship provider is placed on a queue, which is typically processed within 3 minutes. Once the sponsorship call is received and processed, the returned sponsorship units are placed in a cache on our server for the current user. Subsequent calls to this endpoint will return VAST sponsorship units from this cache until tracking information is submitted, which removes the ad from the cache and will automatically request additional ads asynchronously if there are fewer than a certain number remaining in the cache.

For development purposes, it's worth noting that there is currently no way to clear a user's cache without submitting some form of tracking.

## Query parameters

- `forceResult` boolean
- `adCount` integer

## Headers

- `Authorization` string, required
- `X-Advertising-ID` string

## Response `200`

Request completed successfully; a VAST XML document is returned. Note that this response will only be returned if either `force=true` was passed in the querystring, or a call to get sponsorship was previously made, and ads now exist in the cache for this user; otherwise, the 202 response is returned.

## Other responses

- `202` — Request accepted. Check back later for actual ads.
- `400` — A bad request; generally, one or more parameters passed in were incorrect or missing
- `500` — A server error

---

[API](https://skmtc.net/npr/apis/sponsorship.md) · [All operations](https://skmtc.net/npr/apis/sponsorship/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/npr/sponsorship/versions/6ecbcc81450b/schema)
