---
title: "Get all the codes of a promotion on an On Demand page"
method: GET
path: "/ondemand/pages/{ondemand_id}/promotions/{promotion_id}/codes"
tags: ["On Demand\\Promotions"]
---

# Get all the codes of a promotion on an On Demand page

`GET /ondemand/pages/{ondemand_id}/promotions/{promotion_id}/codes`

## Request

- Base URL: `https://api.vimeo.com`
- URL: `https://api.vimeo.com/ondemand/pages/{ondemand_id}/promotions/{promotion_id}/codes`
- Auth: OAuth 2
  - Authorization code: `/oauth/authorize`, token URL `/oauth/access_token`
  - Client credentials, token URL `/oauth/authorize/client`
  - Scopes: `promo_codes`
- TypeScript: <https://skmtc.dev/vimeo/apis/vimeo-api/docs/ondemand/pages/:ondemand_id/promotions/:promotion_id/codes/get.ts> (a function with typed inputs; its response is checked against the schema)

This method returns all the codes of a promotion on an On Demand page.

## Path parameters

- `ondemand_id` number, required
- `promotion_id` number, required

## Query parameters

- `page` number
- `per_page` number

## Response `200`

The codes were returned.

- OnDemandPromotionCode
  - `code` string, required: A promotion code that can be redeemed on Vimeo.
  - `link` string, required: A link to redeem the promotion code instantly.
  - `max_uses` number, required: The total amount of times this code can be used.
  - `uses` number, required: The number of times that this code has been used.

## Other responses

- `403`: You can't create promotions for an On Demand page that you don't own.
- `404`: No such On Demand page exists.

---

[API](https://skmtc.dev/vimeo/apis/vimeo-api.md) - [All operations](https://skmtc.dev/vimeo/apis/vimeo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vimeo/apis/vimeo-api/revisions/ea882e0224a4?raw)
