---
title: "Save or test booking provider settings"
---

> 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.

# Save or test booking provider settings

Path: Nicer API › Booking

`POST /booking/settings/actions`

URL: `https://api.nicer.travel/booking/settings/actions`

Changes the booking settings of the company named in `x-nicer-company`: its booking channel, a provider connection, or an advisor's Sabre agent, with optimistic concurrency through `expectedVersion`. Who may change what: a company admin, on their own company's connection, may turn it on or off and change `sessionPcc`, `credentials`, `domain`, `alias`, the agency and hotel point-of-sale addresses, `agencyProfile` and `products`, and run every agent action; only Nicer staff may send `homePcc` (the PCC the credential signs in to before working in `sessionPcc` through branch access), `secretReference`, `sabreExecutionMode`, `ticketingQueue`, `ticketingPrinter`, `hotelIataOverride` or `excludedAirlineCodes`, save a connection that has a `homePcc`, give an agent of such a connection a `pccOverride`, or run `READ_SABRE_QUEUES`; a company admin who tries any of those gets 403 BOOKING_PROVIDER_MANAGED. `SAVE_PROVIDER` with `credentials` stores them as a new secret and points the connection at it; `products` sets which products the default channel binds to the connection (omitted keeps the bindings, and a connection being created or turned on binds every product its provider sells); its `publicConfiguration` merges key by key (an absent key keeps its stored value, `null` removes it), and versions are the server's, so `configVersion` and `profileVersion` are ignored. `SAVE_SABRE_ADVISOR` with `isDefault: true` makes that agent the agency's default agent, which books for every advisor without one of their own; `DELETE_SABRE_ADVISOR` turns off every agent of an advisor; `TEST_SABRE` opens a Sabre session with the stored credentials, saves nothing else and records the result as the connection's last test; `READ_SABRE_QUEUES` reads what waits on each queue of the connection's office and what was done on it, and changes nothing in Sabre. Every change publishes its event: `booking.provider-connection-saved.v1`, `booking.channel-saved.v1`, `booking.sabre-agent-saved.v1` or `booking.sabre-agent-removed.v1`. Returns `SAVED` with the new version, `DELETED`, `TESTED` with success, latency, any error and when it ran, or `QUEUES_READ` with the office's queues. Conflicts: 409 BOOKING_SETTINGS_VERSION_CONFLICT when `expectedVersion` is not the stored one, 409 BOOKING_DK_OWNER_CONFLICT when another person at the agency already has that DK.

## Authentication

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

## Header parameters

- `x-nicer-company` (`booking.settings.actions.create.header.x-nicer-company`; string, required) — Company context. Authentication and tenant membership are validated by the API.

## Request body

_Required._

Every option has:

- `type` (`<option>.type`; string, required)

One of the following, each adding:

- `object` (`booking.settings.actions.create.1`)
  - `providerConfigId` (`booking.settings.actions.create.1.providerConfigId`; string, required)
    - minLength: `1`
  - `profileId` (`booking.settings.actions.create.1.profileId`; string, required)
    - minLength: `1`
  - `expectedVersion` (`booking.settings.actions.create.1.expectedVersion`; string, required)
    - minLength: `1`
  - `advisorUserId` (`booking.settings.actions.create.1.advisorUserId`; string, required)
    - minLength: `1`
- `object` (`booking.settings.actions.create.2`)
  - `bindings` (`booking.settings.actions.create.2.bindings`; array of object, required)
    - `enabled` (`booking.settings.actions.create.2.bindings.enabled`; boolean, required)
    - `priority` (`booking.settings.actions.create.2.bindings.priority`; integer, required)
      - maximum: `9007199254740991` · minimum: `0`
    - `productKind` (`booking.settings.actions.create.2.bindings.productKind`; string, required)
      - one of `"CAR_RENTAL"`, `"FLIGHT"`, `"HOTEL"`, `"INSURANCE"`
    - `providerConfigId` (`booking.settings.actions.create.2.bindings.providerConfigId`; string, required)
      - minLength: `1`
    - `providerKey` (`booking.settings.actions.create.2.bindings.providerKey`; string, required)
  - `channelId` (`booking.settings.actions.create.2.channelId`; string, required)
    - minLength: `1`
  - `channelVersion` (`booking.settings.actions.create.2.channelVersion`; integer, required)
    - maximum: `9007199254740991`
  - `enabled` (`booking.settings.actions.create.2.enabled`; boolean, required)
  - `expectedVersion` (`booking.settings.actions.create.2.expectedVersion`; any of, required)
    - any of the following: `integer`, `null`
- `object` (`booking.settings.actions.create.3`)
  - `enabled` (`booking.settings.actions.create.3.enabled`; boolean, required)
  - `expectedVersion` (`booking.settings.actions.create.3.expectedVersion`; any of, required)
    - any of the following: `string`, `null`
  - `providerConfigId` (`booking.settings.actions.create.3.providerConfigId`; string, required)
    - minLength: `1`
  - `providerKey` (`booking.settings.actions.create.3.providerKey`; string, required)
  - `publicConfiguration` (`booking.settings.actions.create.3.publicConfiguration`; object, required)
    - `agencyAddress` (`booking.settings.actions.create.3.publicConfiguration.agencyAddress`; any of, optional)
      - any of the following: `AgencyAddress`, `null`
    - `hotelPointOfSaleAddress` (`booking.settings.actions.create.3.publicConfiguration.hotelPointOfSaleAddress`; any of, optional)
      - any of the following: `AgencyAddress`, `null`
    - `agencyProfile` (`booking.settings.actions.create.3.publicConfiguration.agencyProfile`; any of, optional)
      - any of the following: `SabreProfileReference`, `null`
    - `hotelIataOverride` (`booking.settings.actions.create.3.publicConfiguration.hotelIataOverride`; any of, optional)
      - any of the following: `HotelIataOverride`, `null`
    - `sabreExecutionMode` (`booking.settings.actions.create.3.publicConfiguration.sabreExecutionMode`; any of, optional)
      - any of the following: `SabreExecutionMode`, `null`
    - `ticketingPrinter` (`booking.settings.actions.create.3.publicConfiguration.ticketingPrinter`; any of, optional)
      - any of the following: `SabreTicketingPrinter`, `null`
    - `ticketingQueue` (`booking.settings.actions.create.3.publicConfiguration.ticketingQueue`; any of, optional)
      - any of the following: `SabreTicketingQueueInput`, `null`
    - `excludedAirlineCodes` (`booking.settings.actions.create.3.publicConfiguration.excludedAirlineCodes`; any of, optional)
      - any of the following: `array<string>`, `null`
    - `alias` (`booking.settings.actions.create.3.publicConfiguration.alias`; any of, optional)
      - any of the following: `string`, `null`
    - `domain` (`booking.settings.actions.create.3.publicConfiguration.domain`; any of, optional)
      - any of the following: `string`, `null`
    - `maskedUsername` (`booking.settings.actions.create.3.publicConfiguration.maskedUsername`; any of, optional)
      - any of the following: `string`, `null`
  - `credentials` (`booking.settings.actions.create.3.credentials`; any of, required)
    - any of the following:
      - `object`
        - `password` (`booking.settings.actions.create.3.credentials.1.password`; string, required)
          - maxLength: `1000` · minLength: `1`
        - `username` (`booking.settings.actions.create.3.credentials.1.username`; string, required)
          - maxLength: `500` · minLength: `1`
      - `null`
  - `secretReference` (`booking.settings.actions.create.3.secretReference`; any of, required)
    - any of the following: `string`, `null`
  - `sessionPcc` (`booking.settings.actions.create.3.sessionPcc`; any of, required)
    - any of the following: `string`, `null`
  - `configVersion` (`booking.settings.actions.create.3.configVersion`; string, optional)
    - minLength: `1`
  - `homePcc` (`booking.settings.actions.create.3.homePcc`; any of, optional)
    - any of the following: `string`, `null`
  - `products` (`booking.settings.actions.create.3.products`; array of string, optional)
    - one of `"CAR_RENTAL"`, `"FLIGHT"`, `"HOTEL"`, `"INSURANCE"`
- `object` (`booking.settings.actions.create.4`)
  - `advisorUserId` (`booking.settings.actions.create.4.advisorUserId`; string, required)
    - minLength: `1`
  - `corporationName` (`booking.settings.actions.create.4.corporationName`; any of, required)
    - any of the following: `string`, `null`
  - `dkNumber` (`booking.settings.actions.create.4.dkNumber`; any of, required)
    - any of the following: `string`, `null`
  - `email` (`booking.settings.actions.create.4.email`; string, required)
    - minLength: `1`
  - `enabled` (`booking.settings.actions.create.4.enabled`; boolean, required)
  - `expectedVersion` (`booking.settings.actions.create.4.expectedVersion`; any of, required)
    - any of the following: `string`, `null`
  - `firstName` (`booking.settings.actions.create.4.firstName`; string, required)
  - `isDefault` (`booking.settings.actions.create.4.isDefault`; any of, required)
    - any of the following: `boolean`, `null`
  - `lastName` (`booking.settings.actions.create.4.lastName`; string, required)
  - `pccOverride` (`booking.settings.actions.create.4.pccOverride`; any of, required)
    - any of the following: `string`, `null`
  - `phone` (`booking.settings.actions.create.4.phone`; any of, required)
    - any of the following: `string`, `null`
  - `profileId` (`booking.settings.actions.create.4.profileId`; string, required)
    - minLength: `1`
  - `providerConfigId` (`booking.settings.actions.create.4.providerConfigId`; string, required)
    - minLength: `1`
  - `profileVersion` (`booking.settings.actions.create.4.profileVersion`; string, optional)
    - minLength: `1`
- `object` (`booking.settings.actions.create.5`)
  - `advisorUserId` (`booking.settings.actions.create.5.advisorUserId`; string, required)
    - minLength: `1`
- `object` (`booking.settings.actions.create.6`)
  - `providerConfigId` (`booking.settings.actions.create.6.providerConfigId`; string, required)
    - minLength: `1`
- `object` (`booking.settings.actions.create.7`)
  - `providerConfigId` (`booking.settings.actions.create.7.providerConfigId`; string, required)
    - minLength: `1`

## Example request

```json
{
  "type": "CLAIM_SABRE_PROFILE",
  "providerConfigId": "string",
  "profileId": "string",
  "expectedVersion": "string",
  "advisorUserId": "string"
}
```

## Code samples

### JavaScript SDK

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

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

await nicer.booking.settings.actions.create({
  "type": "CLAIM_SABRE_PROFILE",
  "providerConfigId": "string",
  "profileId": "string",
  "expectedVersion": "string",
  "advisorUserId": "string"
});
```

### Nicer CLI

```bash
nicer booking settings actions create --company "$NICER_COMPANY" --input - <<'JSON'
{
  "type": "CLAIM_SABRE_PROFILE",
  "providerConfigId": "string",
  "profileId": "string",
  "expectedVersion": "string",
  "advisorUserId": "string"
}
JSON
```

### cURL

```bash
curl --request POST \
  --url https://api.nicer.travel/booking/settings/actions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'x-nicer-company: string' \
  --data '
{
  "type": "CLAIM_SABRE_PROFILE",
  "providerConfigId": "string",
  "profileId": "string",
  "expectedVersion": "string",
  "advisorUserId": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/booking/settings/actions';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'x-nicer-company': 'string',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    type: 'CLAIM_SABRE_PROFILE',
    providerConfigId: 'string',
    profileId: 'string',
    expectedVersion: 'string',
    advisorUserId: 'string'
  })
};

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/booking/settings/actions"

payload = {
    "type": "CLAIM_SABRE_PROFILE",
    "providerConfigId": "string",
    "profileId": "string",
    "expectedVersion": "string",
    "advisorUserId": "string"
}
headers = {
    "Content-Type": "application/json",
    "x-nicer-company": "string",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "resourceType": "CHANNEL",
  "status": "SAVED",
  "version": 9007199254740991
}
```

Every option has:

- `status` (`<option>.status`; string, required)

One of the following, each adding:

- `object` (`booking.settings.actions.create.response.200.1`)
  - `resourceType` (`booking.settings.actions.create.response.200.1.resourceType`; string, required)
    - one of `"CHANNEL"`, `"PROVIDER"`, `"SABRE_ADVISOR"`
  - `version` (`booking.settings.actions.create.response.200.1.version`; any of, required)
    - any of the following: `integer`, `string`
- `object` (`booking.settings.actions.create.response.200.2`)
  - `resourceType` (`booking.settings.actions.create.response.200.2.resourceType`; string, required)
- `object` (`booking.settings.actions.create.response.200.3`)
  - `errorCode` (`booking.settings.actions.create.response.200.3.errorCode`; any of, required)
    - any of the following: `string`, `null`
  - `errorMessage` (`booking.settings.actions.create.response.200.3.errorMessage`; any of, required)
    - any of the following: `string`, `null`
  - `latencyMs` (`booking.settings.actions.create.response.200.3.latencyMs`; integer, required)
    - maximum: `9007199254740991` · minimum: `0`
  - `success` (`booking.settings.actions.create.response.200.3.success`; boolean, required)
  - `testedAt` (`booking.settings.actions.create.response.200.3.testedAt`; string, required)
    - 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))$`
- `object` (`booking.settings.actions.create.response.200.4`)
  - `errorCode` (`booking.settings.actions.create.response.200.4.errorCode`; any of, required)
    - any of the following: `string`, `null`
  - `errorMessage` (`booking.settings.actions.create.response.200.4.errorMessage`; any of, required)
    - any of the following: `string`, `null`
  - `pcc` (`booking.settings.actions.create.response.200.4.pcc`; string, required)
    - minLength: `1`
  - `queues` (`booking.settings.actions.create.response.200.4.queues`; array of object, required)
    - `waiting` (`booking.settings.actions.create.response.200.4.queues.waiting`; integer, required)
      - maximum: `9007199254740991` · minimum: `0`
    - `ended` (`booking.settings.actions.create.response.200.4.queues.ended`; any of, required)
      - any of the following: `integer`, `null`
    - `ignored` (`booking.settings.actions.create.response.200.4.queues.ignored`; any of, required)
      - any of the following: `integer`, `null`
    - `moved` (`booking.settings.actions.create.response.200.4.queues.moved`; any of, required)
      - any of the following: `integer`, `null`
    - `number` (`booking.settings.actions.create.response.200.4.queues.number`; string, required)
      - minLength: `1`
    - `removed` (`booking.settings.actions.create.response.200.4.queues.removed`; any of, required)
      - any of the following: `integer`, `null`

### 400

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

#### Example

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

- `errorCode` (`booking.settings.actions.create.response.400.errorCode`; string, required)
- `errorMessage` (`booking.settings.actions.create.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`booking.settings.actions.create.response.401.errorCode`; string, required)
- `errorMessage` (`booking.settings.actions.create.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`booking.settings.actions.create.response.403.errorCode`; string, required)
- `errorMessage` (`booking.settings.actions.create.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Booking/booking.settings.actions.create/index.md
