---
title: "Run an action on a supplier"
---

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

# Run an action on a supplier

Path: Nicer API › Commerce

`POST /commerce/suppliers/{supplierId}/actions`

URL: `https://api.nicer.travel/commerce/suppliers/{supplierId}/actions`

One action on a supplier: UPDATE its profile (agency admins, the company's own; global ones by staff), ADD_CONTACT / REMOVE_CONTACT, SET_PROGRAMS (staff), MERGE into another supplier (admins for their own, staff for global ones). Every action is audited and returns the supplier as the company sees it.

## Authentication

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

## Path parameters

- `supplierId` (`commerce.suppliers.actions.create.path.supplierId`; string, required)

## Header parameters

- `Idempotency-Key` (`commerce.suppliers.actions.create.header.Idempotency-Key`; string, required) — Unique key (8–255 chars) per request; replays return the original result.
- `x-nicer-company` (`commerce.suppliers.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` (`commerce.suppliers.actions.create.1`)
  - `expectedUpdatedAt` (`commerce.suppliers.actions.create.1.expectedUpdatedAt`; 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))$`
  - `profile` (`commerce.suppliers.actions.create.1.profile`; object, required)
    - `kind` (`commerce.suppliers.actions.create.1.profile.kind`; string, required)
      - one of `"PROPERTY"`, `"CRUISE_LINE"`, `"TOUR_OPERATOR"`, `"DMC"`, `"AIRLINE"`, `"CAR_RENTAL"`, `"RAIL"`, `"INSURANCE"`, `"TRANSFER"`, `"OTHER"`
    - `name` (`commerce.suppliers.actions.create.1.profile.name`; string, required)
      - maxLength: `255` · minLength: `1`
    - `address` (`commerce.suppliers.actions.create.1.profile.address`; any of, optional)
      - any of the following: `SupplierAddress`, `null`
    - `commissionChannel` (`commerce.suppliers.actions.create.1.profile.commissionChannel`; any of, optional)
      - any of the following: `CommissionChannel`, `null`
    - `defaultCommissionBps` (`commerce.suppliers.actions.create.1.profile.defaultCommissionBps`; any of, optional)
      - any of the following: `integer`, `null`
    - `defaultPaymentTermDays` (`commerce.suppliers.actions.create.1.profile.defaultPaymentTermDays`; any of, optional)
      - any of the following: `integer`, `null`
    - `latitude` (`commerce.suppliers.actions.create.1.profile.latitude`; any of, optional)
      - any of the following: `number`, `null`
    - `longitude` (`commerce.suppliers.actions.create.1.profile.longitude`; any of, optional)
      - any of the following: `number`, `null`
    - `phone` (`commerce.suppliers.actions.create.1.profile.phone`; any of, optional)
      - any of the following: `string`, `null`
    - `website` (`commerce.suppliers.actions.create.1.profile.website`; any of, optional)
      - any of the following: `string`, `null`
- `object` (`commerce.suppliers.actions.create.2`)
  - `role` (`commerce.suppliers.actions.create.2.role`; string, required)
    - one of `"COMMISSIONS"`, `"ACCOUNTING"`, `"RESERVATIONS"`, `"SALES"`, `"OTHER"`
  - `email` (`commerce.suppliers.actions.create.2.email`; any of, optional)
    - any of the following: `string`, `null`
  - `name` (`commerce.suppliers.actions.create.2.name`; any of, optional)
    - any of the following: `string`, `null`
  - `notes` (`commerce.suppliers.actions.create.2.notes`; any of, optional)
    - any of the following: `string`, `null`
  - `phone` (`commerce.suppliers.actions.create.2.phone`; any of, optional)
    - any of the following: `string`, `null`
  - `shared` (`commerce.suppliers.actions.create.2.shared`; boolean, optional)
- `object` (`commerce.suppliers.actions.create.3`)
  - `supplierContactId` (`commerce.suppliers.actions.create.3.supplierContactId`; string, required)
    - maxLength: `255` · minLength: `1`
- `object` (`commerce.suppliers.actions.create.4`)
  - `programs` (`commerce.suppliers.actions.create.4.programs`; array of object, required)
    - `programId` (`commerce.suppliers.actions.create.4.programs.programId`; string, required)
      - maxLength: `255` · minLength: `1`
    - `validFrom` (`commerce.suppliers.actions.create.4.programs.validFrom`; any of, optional)
      - any of the following: `string`, `null`
    - `validTo` (`commerce.suppliers.actions.create.4.programs.validTo`; any of, optional)
      - any of the following: `string`, `null`
- `object` (`commerce.suppliers.actions.create.5`)
  - `intoSupplierId` (`commerce.suppliers.actions.create.5.intoSupplierId`; string, required)
    - maxLength: `255` · minLength: `1`

## Example request

```json
{
  "expectedUpdatedAt": "2019-08-24T14:15:22Z",
  "profile": {
    "address": {
      "city": "string",
      "countryCode": "string",
      "line1": "string",
      "line2": "string",
      "postalCode": "string",
      "region": "string"
    },
    "commissionChannel": "ARC",
    "defaultCommissionBps": 10000,
    "defaultPaymentTermDays": 730,
    "kind": "PROPERTY",
    "latitude": -90,
    "longitude": -180,
    "name": "string",
    "phone": "string",
    "website": "string"
  },
  "type": "UPDATE"
}
```

## Code samples

### JavaScript SDK

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

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

await nicer.commerce.suppliers.actions.create({
  "supplierId": "string",
  "expectedUpdatedAt": "2019-08-24T14:15:22Z",
  "profile": {
    "kind": "PROPERTY",
    "name": "string"
  },
  "type": "UPDATE"
});
```

### Nicer CLI

```bash
nicer commerce suppliers actions create --supplier-id 'string' --company "$NICER_COMPANY" --input - <<'JSON'
{
  "expectedUpdatedAt": "2019-08-24T14:15:22Z",
  "profile": {
    "kind": "PROPERTY",
    "name": "string"
  },
  "type": "UPDATE"
}
JSON
```

### cURL

```bash
curl --request POST \
  --url 'https://api.nicer.travel/commerce/suppliers/<supplierId>/actions' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: string' \
  --header 'x-nicer-company: string' \
  --data '
{
  "expectedUpdatedAt": "2019-08-24T14:15:22Z",
  "profile": {
    "address": {
      "city": "string",
      "countryCode": "string",
      "line1": "string",
      "line2": "string",
      "postalCode": "string",
      "region": "string"
    },
    "commissionChannel": "ARC",
    "defaultCommissionBps": 10000,
    "defaultPaymentTermDays": 730,
    "kind": "PROPERTY",
    "latitude": -90,
    "longitude": -180,
    "name": "string",
    "phone": "string",
    "website": "string"
  },
  "type": "UPDATE"
}
'
```

### TypeScript

```typescript
const url = 'https://api.nicer.travel/commerce/suppliers/<supplierId>/actions';
const options = {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Idempotency-Key': 'string',
    'x-nicer-company': 'string',
    Authorization: 'Bearer <token>'
  },
  body: JSON.stringify({
    expectedUpdatedAt: '2019-08-24T14:15:22Z',
    profile: {
      address: {
        city: 'string',
        countryCode: 'string',
        line1: 'string',
        line2: 'string',
        postalCode: 'string',
        region: 'string'
      },
      commissionChannel: 'ARC',
      defaultCommissionBps: 10000,
      defaultPaymentTermDays: 730,
      kind: 'PROPERTY',
      latitude: -90,
      longitude: -180,
      name: 'string',
      phone: 'string',
      website: 'string'
    },
    type: 'UPDATE'
  })
};

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/commerce/suppliers/<supplierId>/actions"

payload = {
    "expectedUpdatedAt": "2019-08-24T14:15:22Z",
    "profile": {
        "address": {
            "city": "string",
            "countryCode": "string",
            "line1": "string",
            "line2": "string",
            "postalCode": "string",
            "region": "string"
        },
        "commissionChannel": "ARC",
        "defaultCommissionBps": 10000,
        "defaultPaymentTermDays": 730,
        "kind": "PROPERTY",
        "latitude": -90,
        "longitude": -180,
        "name": "string",
        "phone": "string",
        "website": "string"
    },
    "type": "UPDATE"
}
headers = {
    "Content-Type": "application/json",
    "Idempotency-Key": "string",
    "x-nicer-company": "string",
    "Authorization": "Bearer <token>"
}

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

print(response.text)
```

## Responses

### 200

OK

#### Example

```json
{
  "address": {
    "city": "string",
    "countryCode": "string",
    "line1": "string",
    "line2": "string",
    "postalCode": "string",
    "region": "string"
  },
  "contacts": [
    {
      "email": "user@example.com",
      "name": "string",
      "notes": "string",
      "phone": "string",
      "role": "COMMISSIONS",
      "shared": true,
      "supplierContactId": "string"
    }
  ],
  "defaults": {
    "commissionBps": 10000,
    "commissionChannel": "ARC",
    "paymentTermDays": 730
  },
  "identities": [
    {
      "externalId": "string",
      "source": "string"
    }
  ],
  "kind": "PROPERTY",
  "latitude": -90,
  "longitude": -180,
  "mergedIntoSupplierId": "string",
  "name": "string",
  "phone": "string",
  "production": [
    {
      "balanceMinor": -9007199254740991,
      "bookings": 9007199254740991,
      "currency": "string",
      "expectedMinor": 9007199254740991,
      "overdueMinor": 9007199254740991,
      "receivedMinor": -9007199254740991
    }
  ],
  "programs": [
    {
      "name": "string",
      "programId": "string",
      "validFrom": "2019-08-24",
      "validTo": "2019-08-24"
    }
  ],
  "sabreRating": 5,
  "scope": "GLOBAL",
  "source": "string",
  "status": "ACTIVE",
  "supplierId": "string",
  "updatedAt": "2019-08-24T14:15:22Z",
  "verifiedAt": "2019-08-24T14:15:22Z",
  "website": "string"
}
```

- `address` (`commerce.suppliers.actions.create.response.200.address`; any of, required)
  - any of the following:
    - `SupplierAddress`
      - `city` (`SupplierAddress.city`; any of, required)
        - any of the following: `string`, `null`
      - `countryCode` (`SupplierAddress.countryCode`; any of, required)
        - any of the following: `string`, `null`
      - `line1` (`SupplierAddress.line1`; any of, required)
        - any of the following: `string`, `null`
      - `line2` (`SupplierAddress.line2`; any of, required)
        - any of the following: `string`, `null`
      - `postalCode` (`SupplierAddress.postalCode`; any of, required)
        - any of the following: `string`, `null`
      - `region` (`SupplierAddress.region`; any of, required)
        - any of the following: `string`, `null`
    - `null`
- `contacts` (`commerce.suppliers.actions.create.response.200.contacts`; array of object, required)
  - `email` (`commerce.suppliers.actions.create.response.200.contacts.email`; any of, required)
    - any of the following: `string`, `null`
  - `name` (`commerce.suppliers.actions.create.response.200.contacts.name`; any of, required)
    - any of the following: `string`, `null`
  - `notes` (`commerce.suppliers.actions.create.response.200.contacts.notes`; any of, required)
    - any of the following: `string`, `null`
  - `phone` (`commerce.suppliers.actions.create.response.200.contacts.phone`; any of, required)
    - any of the following: `string`, `null`
  - `role` (`commerce.suppliers.actions.create.response.200.contacts.role`; string, required)
    - one of `"COMMISSIONS"`, `"ACCOUNTING"`, `"RESERVATIONS"`, `"SALES"`, `"OTHER"`
  - `shared` (`commerce.suppliers.actions.create.response.200.contacts.shared`; boolean, required)
  - `supplierContactId` (`commerce.suppliers.actions.create.response.200.contacts.supplierContactId`; string, required)
    - minLength: `1`
- `defaults` (`commerce.suppliers.actions.create.response.200.defaults`; object, required)
  - `commissionBps` (`commerce.suppliers.actions.create.response.200.defaults.commissionBps`; any of, required)
    - any of the following: `integer`, `null`
  - `commissionChannel` (`commerce.suppliers.actions.create.response.200.defaults.commissionChannel`; any of, required)
    - any of the following: `CommissionChannel`, `null`
  - `paymentTermDays` (`commerce.suppliers.actions.create.response.200.defaults.paymentTermDays`; any of, required)
    - any of the following: `integer`, `null`
- `identities` (`commerce.suppliers.actions.create.response.200.identities`; array of object, required)
  - `externalId` (`commerce.suppliers.actions.create.response.200.identities.externalId`; string, required)
    - minLength: `1`
  - `source` (`commerce.suppliers.actions.create.response.200.identities.source`; string, required)
- `kind` (`commerce.suppliers.actions.create.response.200.kind`; string, required)
  - one of `"PROPERTY"`, `"CRUISE_LINE"`, `"TOUR_OPERATOR"`, `"DMC"`, `"AIRLINE"`, `"CAR_RENTAL"`, `"RAIL"`, `"INSURANCE"`, `"TRANSFER"`, `"OTHER"`
- `latitude` (`commerce.suppliers.actions.create.response.200.latitude`; any of, required)
  - any of the following: `number`, `null`
- `longitude` (`commerce.suppliers.actions.create.response.200.longitude`; any of, required)
  - any of the following: `number`, `null`
- `mergedIntoSupplierId` (`commerce.suppliers.actions.create.response.200.mergedIntoSupplierId`; any of, required)
  - any of the following: `string`, `null`
- `name` (`commerce.suppliers.actions.create.response.200.name`; string, required)
  - minLength: `1`
- `phone` (`commerce.suppliers.actions.create.response.200.phone`; any of, required)
  - any of the following: `string`, `null`
- `production` (`commerce.suppliers.actions.create.response.200.production`; array of object, required)
  - `balanceMinor` (`commerce.suppliers.actions.create.response.200.production.balanceMinor`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`
  - `bookings` (`commerce.suppliers.actions.create.response.200.production.bookings`; integer, required)
    - maximum: `9007199254740991` · minimum: `0`
  - `currency` (`commerce.suppliers.actions.create.response.200.production.currency`; string, required)
    - pattern: `^[A-Z]{3}$`
  - `expectedMinor` (`commerce.suppliers.actions.create.response.200.production.expectedMinor`; integer, required)
    - maximum: `9007199254740991` · minimum: `0`
  - `overdueMinor` (`commerce.suppliers.actions.create.response.200.production.overdueMinor`; integer, required)
    - maximum: `9007199254740991` · minimum: `0`
  - `receivedMinor` (`commerce.suppliers.actions.create.response.200.production.receivedMinor`; integer, required)
    - maximum: `9007199254740991` · minimum: `-9007199254740991`
- `programs` (`commerce.suppliers.actions.create.response.200.programs`; array of object, required)
  - `name` (`commerce.suppliers.actions.create.response.200.programs.name`; string, required)
    - minLength: `1`
  - `programId` (`commerce.suppliers.actions.create.response.200.programs.programId`; string, required)
    - minLength: `1`
  - `validFrom` (`commerce.suppliers.actions.create.response.200.programs.validFrom`; any of, required)
    - any of the following: `string`, `null`
  - `validTo` (`commerce.suppliers.actions.create.response.200.programs.validTo`; any of, required)
    - any of the following: `string`, `null`
- `scope` (`commerce.suppliers.actions.create.response.200.scope`; string, required)
  - one of `"GLOBAL"`, `"COMPANY"`
- `source` (`commerce.suppliers.actions.create.response.200.source`; string, required)
- `status` (`commerce.suppliers.actions.create.response.200.status`; string, required)
  - one of `"ACTIVE"`, `"MERGED"`, `"ARCHIVED"`
- `supplierId` (`commerce.suppliers.actions.create.response.200.supplierId`; string, required)
  - minLength: `1`
- `updatedAt` (`commerce.suppliers.actions.create.response.200.updatedAt`; 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))$`
- `verifiedAt` (`commerce.suppliers.actions.create.response.200.verifiedAt`; any of, required)
  - any of the following: `string`, `null`
- `website` (`commerce.suppliers.actions.create.response.200.website`; any of, required)
  - any of the following: `string`, `null`
- `sabreRating` (`commerce.suppliers.actions.create.response.200.sabreRating`; number, optional)
  - maximum: `5` · minimum: `0`

### 400

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

#### Example

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

- `errorCode` (`commerce.suppliers.actions.create.response.400.errorCode`; string, required)
- `errorMessage` (`commerce.suppliers.actions.create.response.400.errorMessage`; string, required)

### 401

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

#### Example

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

- `errorCode` (`commerce.suppliers.actions.create.response.401.errorCode`; string, required)
- `errorMessage` (`commerce.suppliers.actions.create.response.401.errorMessage`; string, required)

### 403

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

#### Example

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

- `errorCode` (`commerce.suppliers.actions.create.response.403.errorCode`; string, required)
- `errorMessage` (`commerce.suppliers.actions.create.response.403.errorMessage`; string, required)


Source: https://docs.nicer.travel/api/Commerce/commerce.suppliers.actions.create/index.md
