Skip to content
Navigation

Get platform health in the back office

GET
https://api.nicer.travel/backoffice/health

Returns how the platform stands right now, not over a period: every order by current status and currency, whatever its date; the orders of the last 30 days that are NEEDS_ATTENTION or FAILED, as the order list has them (newest first, at most 200); the events Commerce has not yet published; the provider calls of the last 7 days by provider, operation and outcome; Nicer's own charges of the last 7 days by UTC day, status and currency; and how many BOOKED or HELD reservations are overdue for their next check. The agency is named by the x-nicer-company header and nothing else: with one named, that agency's; with none, every agency's. Nicer staff only. Errors: 403 ERROR_DO_NOT_HAVE_PERMISSION for a caller who is not Nicer staff.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    Authorization: Bearer <token>

Header parameters

  • x-nicer-company
    optional
    string

    Company context for an agency admin who belongs to several companies. Optional when the caller belongs to one.

Returns

200

OK

JSON
  • attention
    array of
    object
    required

    The orders created in the last 30 days that are NEEDS_ATTENTION or FAILED, the states a person must clear; newest first, at most 200.

    • advisorUserId
      required

      The advisor credited with the order: the one assigned to it, else the one who booked it or whose provider profile it came in on; null when no advisor is credited.

      Any of the following:

      • string
      • null
    • bookingOrigin
      NICER
      or
      EXTERNAL
      or
      UNKNOWN
      required

      NICER when the booking was made through Nicer, EXTERNAL when it was made elsewhere and recorded, UNKNOWN when the provider did not say.

    • committedAt
      required

      When the order left DRAFT and became a booking; null before.

      Any of the following:

      • string
      • null
    • companyName
      string
      required

      The agency the order belongs to.

      minLength: 1
    • createdAt
      string
      required

      When the order was created.

      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))$
    • createdByUserId
      required

      The user id of who created the order, when one did.

      Any of the following:

      • string
      • null
    • currency
      required

      The currency of every amount on the row; null when the order carries no amount.

      Any of the following:

      • CurrencyCode
      • null
    • dueAtPropertyMinor
      required

      The part of the total paid at the property, in minor units; null for an order recorded from a provider.

      Any of the following:

      • integer
      • null
    • dueLaterMinor
      required

      The part of the total charged later, in minor units; null for an order recorded from a provider.

      Any of the following:

      • integer
      • null
    • dueNowMinor
      required

      The part of the total charged at checkout, in minor units; null for an order recorded from a provider.

      Any of the following:

      • integer
      • null
    • entryMethod
      CHECKOUT
      or
      IMPORT
      or
      MANUAL
      required

      CHECKOUT when Nicer sold the order, and every amount is present; IMPORT or MANUAL when it was recorded from a provider.

    • expiresAt
      required

      When an unpaid checkout lapses; null for an order recorded from a provider.

      Any of the following:

      • string
      • null
    • fulfillmentState
      NOT_STARTED
      or
      PENDING_ISSUANCE
      or
      PARTIALLY_ISSUED
      or
      ISSUED
      or
      FAILED
      or
      UNKNOWN
      required

      Where the order's documents (tickets, confirmations, policies, vouchers) stand.

    • hotelReference
      required

      Nicer's reference for the property of a lodging order; null for other products.

      Any of the following:

      • string
      • null
    • itineraryItemId
      required

      The itinerary item the order was booked from, if any.

      Any of the following:

      • string
      • null
    • orderId
      string
      required

      The order's id.

      minLength: 1
    • payerEmail
      required

      The payer's email, lower-cased, when the order has one.

      Any of the following:

      • string
      • null
    • payerUserId
      required

      The payer's user id, when the payer has an account.

      Any of the following:

      • string
      • null
    • paymentState
      string
      ·
      one of 11 values
      required

      Where the traveler's payment stands.

      Allowed values: NOT_STARTED, AWAITING_METHOD, REQUIRES_ACTION, PROCESSING, AUTHORIZED, SUCCEEDED, DECLINED, CANCELLED, PARTIALLY_REFUNDED, REFUNDED, UNKNOWN
    • productName
      required

      The order's label: the route for a flight (origin → destination, each pair once, joined by ' · '), else the product or property name as recorded or sold.

      Any of the following:

      • string
      • null
    • productType
      PLANNING_FEE
      or
      EXTRA_PAYMENT
      or
      HOTEL
      or
      FLIGHT
      or
      INSURANCE
      or
      CAR_RENTAL
      required

      What the order sells.

    • providerLocator
      required

      The booking's locator at the provider (the Booking ID of a flight), once it exists.

      Any of the following:

      • string
      • null
    • reservationState
      string
      ·
      one of 8 values
      required

      Where the reservation at the provider stands.

      Allowed values: NOT_STARTED, HOLDING, HELD, CONFIRMED, CANCELLATION_PROCESSING, CANCELLED, EXPIRED, UNKNOWN
    • status
      string
      ·
      one of 12 values
      required

      The order's overall status.

      Allowed values: DRAFT, AWAITING_PAYMENT, HOLDING, HELD, PAYMENT_PROCESSING, TICKETING, BOOKED, CANCELLATION_PROCESSING, CANCELLED, EXPIRED, NEEDS_ATTENTION, FAILED
    • supplierConfirmation
      required

      The supplier's own confirmation, as recorded from the provider; null when none was recorded.

      Any of the following:

      • string
      • null
    • totalMinor
      required

      The order's total, in minor units; null when the order carries no amount.

      Any of the following:

      • integer
      • null
    • travelDates
      object
      required

      The first and last travel moment: the recorded service's dates, else the hotel's check-in and check-out, else the first departure and last arrival of a flight. A day (YYYY-MM-DD) or an ISO 8601 date-time; null when unknown.

      • end
        required

        Any of the following:

        • string
        • null
      • start
        required

        Any of the following:

        • string
        • null
    • travelerCount
      integer
      required

      How many participants of the order travel (role TRAVELER).

      maximum: 9007199254740991 · minimum: 0
    • travelerNames
      array of
      string
      required

      The names of the order's travelers (role TRAVELER), in the order's slot order. A traveler without a name is left out.

      minLength: 1
    • travelersTripId
      required

      The trip the order belongs to, if any.

      Any of the following:

      • string
      • null
    • updatedAt
      string
      required

      When the order last changed.

      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))$
    • hotel
      optional
      object

      The property facts sold with the order. Present on lodging (HOTEL) orders only.

      • address
        required

        The property's address, as sold.

        Any of the following:

        • string
        • null
      • chainName
        required

        The hotel chain, when the property belongs to one.

        Any of the following:

        • string
        • null
      • checkIn
        required

        The check-in day.

        Any of the following:

        • string
        • null
      • checkOut
        required

        The check-out day.

        Any of the following:

        • string
        • null
      • city
        required

        The property's city.

        Any of the following:

        • string
        • null
      • countryCode
        required

        The property's country, ISO 3166-1 alpha-2.

        Any of the following:

        • CountryCode
        • null
      • imageUrl
        required

        The property's first photo.

        Any of the following:

        • string
        • null
      • starRating
        required

        The property's star rating, 0 to 5.

        Any of the following:

        • number
        • null
    • providerKey
      optional
      string

      The provider the order was booked with. Nicer staff only: left out for an agency admin.

  • outbox
    object
    required

    The events Commerce wrote with a change and has not yet published to the other domains.

    • failing
      integer
      required

      How many of them failed their latest attempt to publish.

      maximum: 9007199254740991 · minimum: 0
    • maxAttempts
      required

      The most publish attempts any of them has had; null when none waits.

      Any of the following:

      • integer
      • null
    • oldestAvailableAt
      required

      When the oldest of them became due to publish; null when none waits.

      Any of the following:

      • string
      • null
    • pending
      integer
      required

      How many events wait to be published.

      maximum: 9007199254740991 · minimum: 0
  • overdueChecks
    integer
    required

    How many BOOKED or HELD orders the reservation monitor should have read again by now: the next check their latest read set is past.

    maximum: 9007199254740991 · minimum: 0
  • payments
    array of
    object
    required

    Nicer's charges of the last 7 days. One row per UTC day, status and currency, the oldest day first.

    • amountMinor
      integer
      required

      The attempts' total, in minor units.

      maximum: 9007199254740991 · minimum: -9007199254740991
    • attempts
      integer
      required

      How many attempts.

      maximum: 9007199254740991 · minimum: 0
    • currency
      string
      required

      The attempts' currency.

      pattern: ^[A-Z]{3}$
    • day
      string
      required

      The UTC day the attempts were made on.

      format: date · 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])))$
    • status
      string
      ·
      one of 7 values
      required

      The attempts' status. SUCCEEDED is money captured; AUTHORIZED is not money yet.

      Allowed values: REQUIRES_ACTION, AUTHORIZED, PROCESSING, SUCCEEDED, DECLINED, UNKNOWN, CANCELLED
  • providerOutcomes
    array of
    object
    required

    Provider calls of the last 7 days. One row per provider, operation and outcome, the most calls first.

    • avgSeconds
      required

      The average seconds a call took, over the calls that both started and finished; null when none did.

      Any of the following:

      • number
      • null
    • kind
      string
      ·
      one of 13 values
      required

      What the calls asked the provider to do.

      Allowed values: REVALIDATE, INITIATE, HOLD, RESERVE, CONFIRM, FULFILL, BOOK, TICKET, RETRIEVE, RECONCILE, CANCEL, VOID, REFUND
    • operations
      integer
      required

      How many calls.

      maximum: 9007199254740991 · minimum: 0
    • providerKey
      string
      required

      The provider called.

    • status
      string
      ·
      one of 7 values
      required

      How the calls ended.

      Allowed values: PENDING, RUNNING, SUCCEEDED, DECLINED, FAILED, UNKNOWN, CANCELLED
  • statuses
    array of
    object
    required

    Every order, of any date, by status and currency, the most orders first.

    • currency
      required

      The orders' currency; null for the orders that carry no amount.

      Any of the following:

      • CurrencyCode
      • null
    • orders
      integer
      required

      How many orders.

      maximum: 9007199254740991 · minimum: 0
    • status
      string
      ·
      one of 12 values
      required

      Where the orders stand now.

      Allowed values: DRAFT, AWAITING_PAYMENT, HOLDING, HELD, PAYMENT_PROCESSING, TICKETING, BOOKED, CANCELLATION_PROCESSING, CANCELLED, EXPIRED, NEEDS_ATTENTION, FAILED
    • totalMinor
      required

      The orders' totals added up, in minor units; null when none carries an amount.

      Any of the following:

      • integer
      • null

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