---
title: "List promotions"
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.nicer.travel/llms.txt
> Use this file to discover all available pages before exploring further.

# List promotions

Path: Nicer API › Company config

`GET /config/promotion`

URL: `https://api.nicer.travel/config/promotion`

Returns the promotions of the agency the request acts for, which its advisors see on the portal's Discover page. The agency's admins get every promotion, drafts and deactivated ones included; anyone else signed in to the agency, travelers included, gets only the published ones that have not ended. Errors: 400 ERROR_COMPANY_REQUIRED for a request that names no agency.

## Authentication

- `bearerAuth`, http bearer, header `Authorization`, format `JWT`

## Code samples

### JavaScript SDK

```javascript
import { createClient } from "@nicertravel/sdk";

const nicer = createClient({
  baseUrl: "https://api.nicer.travel",
  token: process.env.NICER_TOKEN,
});

await nicer.config.promotion.list();
```

### Nicer CLI

```bash
nicer config promotion list
```

### cURL

```bash
curl --request GET \
  --url https://api.nicer.travel/config/promotion \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/config/promotion';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.nicer.travel/config/promotion"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
[
  {
    "buttonName": "string",
    "companyName": "string",
    "createdBy": "string",
    "description": "string",
    "endDate": "2019-08-24T14:15:22Z",
    "images": [
      "string"
    ],
    "lastModifiedBy": "string",
    "price": "string",
    "startDate": "2019-08-24T14:15:22Z",
    "status": "published",
    "tag": {
      "color": "string",
      "name": "string"
    },
    "title": "string",
    "promotionId": "string",
    "type": "Promotion",
    "createdAt": "string",
    "updatedAt": "string"
  }
]
```

- `buttonName` (`config.promotion.list.response.200.buttonName`; string, required)
- `companyName` (`config.promotion.list.response.200.companyName`; string, required)
- `createdBy` (`config.promotion.list.response.200.createdBy`; string, required)
- `description` (`config.promotion.list.response.200.description`; string, required)
- `images` (`config.promotion.list.response.200.images`; array of string, required)
  - minLength: `1`
- `lastModifiedBy` (`config.promotion.list.response.200.lastModifiedBy`; string, required)
- `status` (`config.promotion.list.response.200.status`; string, required)
  - one of `"published"`, `"draft"`, `"deactivated"`
- `title` (`config.promotion.list.response.200.title`; string, required)
  - minLength: `1`
- `promotionId` (`config.promotion.list.response.200.promotionId`; string, required)
  - pattern: `^PROMO.*`
- `type` (`config.promotion.list.response.200.type`; string, required)
- `createdAt` (`config.promotion.list.response.200.createdAt`; string, required)
- `updatedAt` (`config.promotion.list.response.200.updatedAt`; string, required)
- `endDate` (`config.promotion.list.response.200.endDate`; string, optional)
  - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
- `price` (`config.promotion.list.response.200.price`; string, optional)
- `startDate` (`config.promotion.list.response.200.startDate`; string, optional)
  - format: `date-time` · pattern: `^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$`
- `tag` (`config.promotion.list.response.200.tag`; object, optional)
  - `color` (`config.promotion.list.response.200.tag.color`; string, required)
    - minLength: `1`
  - `name` (`config.promotion.list.response.200.tag.name`; string, required)
    - minLength: `1`

### 400

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`config.promotion.list.response.400.errorCode`; string, required)
- `errorMessage` (`config.promotion.list.response.400.errorMessage`; string, required)

### 401

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`config.promotion.list.response.401.errorCode`; string, required)
- `errorMessage` (`config.promotion.list.response.401.errorMessage`; string, required)

### 403

Request failed. `errorCode` is stable; `errorMessage` is for humans.

#### Example

```json
{
  "errorCode": "string",
  "errorMessage": "string"
}
```

- `errorCode` (`config.promotion.list.response.403.errorCode`; string, required)
- `errorMessage` (`config.promotion.list.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Company-config/config.promotion.list/index.md
