Skip to content
Navigation

Save or test booking provider settings

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

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Header parameters

  • x-nicer-company
    string
    required

    Company context. Authentication and tenant membership are validated by the API.

Request body JSON required

One of the following:

  • object
    • type
      string
      required
    • providerConfigId
      string
      required
      minLength: 1
    • profileId
      string
      required
      minLength: 1
    • expectedVersion
      string
      required
      minLength: 1
    • advisorUserId
      string
      required
      minLength: 1
  • object
    • bindings
      array of
      object
      required
      • enabled
        boolean
        required
      • priority
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • productKind
        CAR_RENTAL
        or
        FLIGHT
        or
        HOTEL
        or
        INSURANCE
        required
      • providerConfigId
        string
        required
        minLength: 1
      • providerKey
        string
        required
    • channelId
      string
      required
      minLength: 1
    • channelVersion
      integer
      required
      maximum: 9007199254740991
    • enabled
      boolean
      required
    • expectedVersion
      required

      Any of the following:

      • integer
      • null
    • type
      string
      required
  • object
    • enabled
      boolean
      required
    • expectedVersion
      required

      Any of the following:

      • string
      • null
    • providerConfigId
      string
      required
      minLength: 1
    • providerKey
      string
      required
    • publicConfiguration
      object
      required
      • agencyAddress
        optional

        Any of the following:

        • AgencyAddress
        • null
      • hotelPointOfSaleAddress
        optional

        Any of the following:

        • AgencyAddress
        • null
      • agencyProfile
        optional

        Any of the following:

        • SabreProfileReference
        • null
      • hotelIataOverride
        optional

        Any of the following:

        • HotelIataOverride
        • null
      • sabreExecutionMode
        optional

        Any of the following:

        • SabreExecutionMode
        • null
      • ticketingPrinter
        optional

        Any of the following:

        • SabreTicketingPrinter
        • null
      • ticketingQueue
        optional

        Any of the following:

        • SabreTicketingQueueInput
        • null
      • excludedAirlineCodes
        optional

        Any of the following:

        • array<string>
        • null
      • alias
        optional

        Any of the following:

        • string
        • null
      • domain
        optional

        Any of the following:

        • string
        • null
      • maskedUsername
        optional

        Any of the following:

        • string
        • null
    • credentials
      required

      Any of the following:

      • object
        • password
          string
          required
          maxLength: 1000 · minLength: 1
        • username
          string
          required
          maxLength: 500 · minLength: 1
      • null
    • secretReference
      required

      Any of the following:

      • string
      • null
    • sessionPcc
      required

      Any of the following:

      • string
      • null
    • type
      string
      required
    • configVersion
      optional
      string
      minLength: 1
    • homePcc
      optional

      Any of the following:

      • string
      • null
    • products
      optional
      array of
      CAR_RENTAL
      or
      FLIGHT
      or
      HOTEL
      or
      INSURANCE
  • object
    • advisorUserId
      string
      required
      minLength: 1
    • corporationName
      required

      Any of the following:

      • string
      • null
    • dkNumber
      required

      Any of the following:

      • string
      • null
    • email
      string
      required
      minLength: 1
    • enabled
      boolean
      required
    • expectedVersion
      required

      Any of the following:

      • string
      • null
    • firstName
      string
      required
    • isDefault
      required

      Any of the following:

      • boolean
      • null
    • lastName
      string
      required
    • pccOverride
      required

      Any of the following:

      • string
      • null
    • phone
      required

      Any of the following:

      • string
      • null
    • profileId
      string
      required
      minLength: 1
    • providerConfigId
      string
      required
      minLength: 1
    • type
      string
      required
    • profileVersion
      optional
      string
      minLength: 1
  • object
    • advisorUserId
      string
      required
      minLength: 1
    • type
      string
      required
  • object
    • providerConfigId
      string
      required
      minLength: 1
    • type
      string
      required
  • object
    • providerConfigId
      string
      required
      minLength: 1
    • type
      string
      required

Returns

200

OK

JSON

One of the following:

  • object
    • resourceType
      CHANNEL
      or
      PROVIDER
      or
      SABRE_ADVISOR
      required
    • status
      string
      required
    • version
      required

      Any of the following:

      • integer
      • string
  • object
    • resourceType
      string
      required
    • status
      string
      required
  • object
    • errorCode
      required

      Any of the following:

      • string
      • null
    • errorMessage
      required

      Any of the following:

      • string
      • null
    • latencyMs
      integer
      required
      maximum: 9007199254740991 · minimum: 0
    • status
      string
      required
    • success
      boolean
      required
    • 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
    • errorCode
      required

      Any of the following:

      • string
      • null
    • errorMessage
      required

      Any of the following:

      • string
      • null
    • pcc
      string
      required
      minLength: 1
    • queues
      array of
      object
      required
      • waiting
        integer
        required
        maximum: 9007199254740991 · minimum: 0
      • ended
        required

        Any of the following:

        • integer
        • null
      • ignored
        required

        Any of the following:

        • integer
        • null
      • moved
        required

        Any of the following:

        • integer
        • null
      • number
        string
        required
        minLength: 1
      • removed
        required

        Any of the following:

        • integer
        • null
    • status
      string
      required

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close