Entur Inventory Client API

The Inventory Client API from Entur — 7 operation(s) for inventory client.

Operations 9

PUT /v1/reservations/{reservationId}/reservation-lines Update all reservation lines #
POST /v1/reservations/{reservationId}/reservation-lines Add reservation line to reservation #
PUT /v1/reservations/{reservationId}/reservation-lines/{reservationLineId} Update reservation line #
POST /v1/stock/query Get available stock for a tripPattern #
GET /v1/reservations Get reservations #
POST /v1/reservations Reserve stock #
POST /v1/reservations/batch Reserve stock for multiple legs #
GET /v1/stock Get available stock #
GET /v1/reservations/{id} Get reservation by id #

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-partner-dataset-rpt-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-partner-dataset-download-job-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-partner-settlement-import-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-partner-settlement-import-response-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-given-consent-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-consent-crm-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-consent-base-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-given-consent-bulk-update-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-given-consent-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-consent-base-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-customer-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-temporary-customer-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-customer-post-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-customer-put-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-ecard-ownership-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-temporary-customer-post-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-result-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-quota-request-v1-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-quota-configuration-response-v1-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-quota-response-v1-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-reservation-response-v1-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-quota-configuration-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-multi-stock-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-search-geo-location-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-search-authority-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-search-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-search-trip-pattern-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-collection-info-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-customer-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-search-offer-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-subscriber-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-extend-expiry-time-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-update-traveller-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-note-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-note-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-page-of-order-note-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-line-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-fee-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-create-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-line-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-payment-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-transaction-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-credit-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-transaction-import-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-transaction-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-terminal-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-program-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-transaction-by-order-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-current-level-summary-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-current-level-summary-query-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-point-period-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-customer-membership-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-employee-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-imported-employee-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-imported-employee-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-contract-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-imported-employee-merge-patch-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-entitlement-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-zonal-stop-place-distance-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-fare-zone-distance-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-fare-zone-distance-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-coordinate-distance-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-distance-calculation-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-fare-table-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-fare-table-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-version-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-version-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-purchase-window-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-purchase-window-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-purchase-window-list-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-supplement-product-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-supplement-product-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-sales-offer-package-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-sales-offer-package-publication-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-sales-offer-package-assignment-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-supplement-product-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-generic-parameter-assignment-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-exchanging-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-amount-of-price-unit-product-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-capped-discount-right-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-sale-discount-right-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-netex-import-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-send-receipt-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-user-receipt-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-receipt-type-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-refund-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-refund-option-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-dry-run-refund-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-compensation-operation-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-refund-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-compensation-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-change-order-lines-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-order-line-ids-and-reservation-ids-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-reserve-offers-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-add-supplement-products-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-reserve-third-party-products-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-reserve-third-party-products-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-seating-offer-debug-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-rebooked-reservation-response-v1-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-rebooked-reservation-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-reservation-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-seating-offer-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-reservation-line-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-reserve-specific-seats-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-map-string-string-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-seq-cancel-seat-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-seq-companion-for-seat-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-seq-journey-query-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-seq-product-attribute-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-asset-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-booking-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-support-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-one-stop-booking-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-one-stop-booking-event-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-notification-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-post-skoleskyss-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-post-skoleskyss-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/entur/refs/heads/main/json-schema/entur-delete-skoleskyss-response-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/entur:entur-inventory-client-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

entur-inventory-client-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Entur Inventory Client API
  version: 2026.09.0
  contact:
    name: Entur Team Varelager
  description: 'Operations tagged Inventory Client across 2 of this provider''s published API definitions: entur-inventory-openapi.json, entur-inventory-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.entur.io/inventory
security:
- bearer-key: []
tags:
- name: Inventory Client
paths:
  /v1/reservations/{reservationId}/reservation-lines:
    parameters:
    - $ref: '#/components/parameters/ET-Client-Name'
    - $ref: '#/components/parameters/X-Correlation-Id'
    put:
      tags:
      - Inventory Client
      summary: Update all reservation lines
      description: Update all reservation lines on a reservation
      operationId: updateReservationLines
      parameters:
      - name: reservationId
        in: path
        description: Id of the reservation to update lines on
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              type: array
              description: List of updated reservation line specifications
              items:
                $ref: '#/components/schemas/UpdatedReservationLine'
            example:
            - id: 1
              productId: ENT:Product:1
              amount: 2
              status: CONFIRMED
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReservationLineResponseV1'
              example:
              - id: 1
                productId: ENT:Product:1
                amount: 2
                created: '2024-01-01T10:00:00Z'
                changed: '2024-01-01T10:00:00Z'
                status: CONFIRMED
    post:
      tags:
      - Inventory Client
      summary: Add reservation line to reservation
      description: Add a reservation line to an existing reservation.
      operationId: addReservationLine
      parameters:
      - name: reservationId
        in: path
        description: Id of the reservation to add lines to
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReservationLine'
            example:
              productId: ENT:Product:1
              amount: 2
              status: CONFIRMED
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationLineResponseV1'
              example:
                id: 1
                productId: ENT:Product:1
                amount: 2
                created: '2024-01-01T10:00:00Z'
                changed: '2024-01-01T10:00:00Z'
                status: CONFIRMED
    servers:
    - url: https://api.entur.io/inventory
  /v1/reservations/{reservationId}/reservation-lines/{reservationLineId}:
    parameters:
    - $ref: '#/components/parameters/ET-Client-Name'
    - $ref: '#/components/parameters/X-Correlation-Id'
    put:
      tags:
      - Inventory Client
      summary: Update reservation line
      description: Update a single reservation line
      operationId: updateReservationLine
      parameters:
      - name: reservationId
        in: path
        description: Id of the reservation to update a reservation line on.
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      - name: reservationLineId
        in: path
        description: Id of the reservation line to update.
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ReservationLine'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationLineResponseV1'
    servers:
    - url: https://api.entur.io/inventory
  /v1/stock/query:
    parameters:
    - $ref: '#/components/parameters/ET-Client-Name'
    - $ref: '#/components/parameters/X-Correlation-Id'
    post:
      tags:
      - Inventory Client
      summary: Get available stock for a tripPattern
      description: Calculates available stock between a set of stopPlaces on separate DatedServiceJourneys
      operationId: multiStockQuery
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/StockQuery'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/MultiStockResponse'
    servers:
    - url: https://api.entur.io/inventory
  /v1/reservations:
    parameters:
    - $ref: '#/components/parameters/ET-Client-Name'
    - $ref: '#/components/parameters/X-Correlation-Id'
    get:
      tags:
      - Inventory Client
      summary: Get reservations
      description: Retrieves all registered reservations for an original dated service journey
      operationId: getReservationsByDeparture
      parameters:
      - name: datedServiceJourney
        in: query
        description: The original dated service journey to find reservations for.
        required: true
        style: form
        explode: true
        schema:
          type: string
      - name: createdAfter
        in: query
        description: Created after
        required: false
        style: form
        explode: true
        schema:
          type: string
          format: date-time
        example: '2019-10-09T11:57:02Z'
      - name: changedAfter
        in: query
        description: Changed after
        required: false
        style: form
        explode: true
        schema:
          type: string
          format: date-time
        example: '2019-10-09T11:57:02Z'
      - name: origin
        in: query
        description: origin
        required: false
        style: form
        explode: true
        schema:
          type: string
        example: Oslo
      - name: destination
        in: query
        description: destination
        required: false
        style: form
        explode: true
        schema:
          type: string
        example: Bergen
      - name: product
        in: query
        description: product
        required: false
        style: form
        explode: true
        schema:
          type: string
        example: Minipris:Shadow
      - name: status
        in: query
        description: status
        required: false
        style: form
        explode: true
        schema:
          type: string
          enum:
          - DRAFT
          - CONFIRMED
          - EXPIRED
          - CANCELLED
          - DRAFT_CANCELLATION
          - CONFIRMED_CANCELLATION
          - RELEASING
        example: CONFIRMED
      - name: excludeInactiveReservations
        in: query
        description: Exclude reservations that are not DRAFT nor CONFIRMED, defaults to false
        required: false
        style: form
        explode: true
        schema:
          type: boolean
          default: false
        example: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReservationResponseV1'
    post:
      tags:
      - Inventory Client
      summary: Reserve stock
      description: Reserves some amount of stock for use
      operationId: createReservation
      parameters:
      - name: ownerOrganisationId
        in: query
        description: Not applicable for Partners/operators. Used to filter between operator organisations
        required: false
        style: form
        explode: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Reservation'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationResponseV1'
    servers:
    - url: https://api.entur.io/inventory
  /v1/reservations/batch:
    parameters:
    - $ref: '#/components/parameters/ET-Client-Name'
    - $ref: '#/components/parameters/X-Correlation-Id'
    post:
      tags:
      - Inventory Client
      summary: Reserve stock for multiple legs
      description: Reserves some amount of stock for use
      operationId: createMultiReservation
      parameters:
      - name: ownerOrganisationId
        in: query
        description: Not applicable for Partners/operators. Used to filter between operator organisations
        required: false
        style: form
        explode: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/Reservation'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReservationResponseV1'
    servers:
    - url: https://api.entur.io/inventory
  /v1/stock:
    parameters:
    - $ref: '#/components/parameters/ET-Client-Name'
    - $ref: '#/components/parameters/X-Correlation-Id'
    get:
      tags:
      - Inventory Client
      summary: Get available stock
      description: Calculates available stock between two stops of a dated service journey
      operationId: stockForJourney
      parameters:
      - name: datedServiceJourney
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
      - name: origin
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
      - name: destination
        in: query
        required: true
        style: form
        explode: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StockResponseV1'
    servers:
    - url: https://api.entur.io/inventory
  /v1/reservations/{id}:
    parameters:
    - $ref: '#/components/parameters/ET-Client-Name'
    - $ref: '#/components/parameters/X-Correlation-Id'
    get:
      tags:
      - Inventory Client
      summary: Get reservation by id
      description: Retrieves a registered reservation.
      operationId: getReservation
      parameters:
      - name: id
        in: path
        description: Id of the reservation to get
        required: true
        style: simple
        explode: false
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReservationResponseV1'
    servers:
    - url: https://api.entur.io/inventory
components:
  schemas:
    ReservationLine:
      type: object
      description: Updated spec of reservation line
      properties:
        productId:
          type: string
        amount:
          type: integer
          format: int32
        status:
          type: string
          enum:
          - DRAFT
          - CONFIRMED
          - EXPIRED
          - CANCELLED
          - DRAFT_CANCELLATION
          - CONFIRMED_CANCELLATION
          - RELEASING
      required:
      - amount
      - productId
      - status
    SimpleProductResponseV1:
      allOf:
      - $ref: '#/components/schemas/StockComponentResponseV1'
      - type: object
        properties:
          products:
            type: array
            items:
              type: string
          leftInQuota:
            type: integer
            format: int32
      required:
      - leftInQuota
      - products
    ProductCollectionResponseV1:
      allOf:
      - $ref: '#/components/schemas/NestingComponentResponseV1'
      - type: object
        properties:
          selectionRule:
            type: string
            enum:
            - COMBINED
            - SINGLE
          consumptionRule:
            type: string
            enum:
            - DIRECT
            - BY_PRIORITY
          directionRule:
            type: string
            enum:
            - FROM_RIGHT
            - FROM_LEFT
          components:
            type: array
            items:
              oneOf:
              - $ref: '#/components/schemas/ProductCollectionResponseV1'
              - $ref: '#/components/schemas/ProductResponseV1'
      required:
      - aggregatedAvailability
      - components
      - consumptionRule
      - directionRule
      - nestingGroup
      - priority
      - selectionRule
    MultiStockResponse:
      type: object
      properties:
        origin:
          type: string
        destination:
          type: string
        spannedDatedServiceJourneys:
          type: array
          items:
            type: string
        reservableStock:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/NestingComponentResponseV1'
            - $ref: '#/components/schemas/SimpleProductResponseV1'
            - $ref: '#/components/schemas/ProductCollectionResponseV1'
            - $ref: '#/components/schemas/ProductResponseV1'
      required:
      - destination
      - origin
      - reservableStock
      - spannedDatedServiceJourneys
    StockResponseV1:
      type: object
      properties:
        datedServiceJourney:
          type: string
        origin:
          type: string
        destination:
          type: string
        organisationId:
          type: string
        stock:
          type: array
          items:
            oneOf:
            - $ref: '#/components/schemas/NestingComponentResponseV1'
            - $ref: '#/components/schemas/SimpleProductResponseV1'
            - $ref: '#/components/schemas/ProductCollectionResponseV1'
            - $ref: '#/components/schemas/ProductResponseV1'
      required:
      - datedServiceJourney
      - destination
      - organisationId
      - origin
      - stock
    UpdatedReservationLine:
      type: object
      description: ' Updated reservation line specification'
      properties:
        id:
          type: integer
          format: int64
        productId:
          type: string
        amount:
          type: integer
          format: int32
        status:
          type: string
          enum:
          - DRAFT
          - CONFIRMED
          - EXPIRED
          - CANCELLED
          - DRAFT_CANCELLATION
          - CONFIRMED_CANCELLATION
          - RELEASING
      required:
      - amount
      - id
      - productId
      - status
    StockQuery:
      type: object
      properties:
        datedServiceJourney:
          type: string
        origin:
          type: string
        destination:
          type: string
      required:
      - datedServiceJourney
      - destination
      - origin
    Reservation:
      type: object
      description: Specifies what should be reserved, in what quantity, and across what distance
      properties:
        origin:
          type: string
        destination:
          type: string
        datedServiceJourneyId:
          type: string
        orderId:
          type: string
        reservationLines:
          type: array
          items:
            $ref: '#/components/schemas/ReservationLine'
      required:
      - datedServiceJourneyId
      - destination
      - origin
      - reservationLines
    StockComponentResponseV1: {}
    ReservationResponseV1:
      type: object
      properties:
        id:
          type: integer
          format: int64
        origin:
          type: string
        destination:
          type: string
        datedServiceJourney:
          type: string
        created:
          type: string
          format: date-time
        changed:
          type: string
          format: date-time
        createdBy:
          type: string
        orderId:
          type: string
        reservationLines:
          type: array
          items:
            $ref: '#/components/schemas/ReservationLineResponseV1'
      required:
      - changed
      - created
      - createdBy
      - datedServiceJourney
      - destination
      - id
      - origin
      - reservationLines
    ProductResponseV1:
      allOf:
      - $ref: '#/components/schemas/NestingComponentResponseV1'
      - type: object
        properties:
          id:
            type: integer
            format: int32
          products:
            type: array
            items:
              type: string
          leftInQuota:
            type: integer
            format: int32
          purchaseWindowStart:
            type: string
            format: date-time
          purchaseWindowStop:
            type: string
            format: date-time
          closedBy:
            type: array
            items:
              type: integer
              format: int32
      required:
      - aggregatedAvailability
      - closedBy
      - id
      - leftInQuota
      - nestingGroup
      - priority
      - products
    ReservationLineResponseV1:
      type: object
      properties:
        id:
          type: integer
          format: int64
        productId:
          type: string
        amount:
          type: integer
          format: int32
        created:
          type: string
          format: date-time
        changed:
          type: string
          format: date-time
        status:
          type: string
          enum:
          - DRAFT
          - CONFIRMED
          - EXPIRED
          - CANCELLED
          - DRAFT_CANCELLATION
          - CONFIRMED_CANCELLATION
          - RELEASING
      required:
      - amount
      - changed
      - created
      - id
      - productId
      - status
    NestingComponentResponseV1:
      allOf:
      - $ref: '#/components/schemas/StockComponentResponseV1'
      - type: object
        properties:
          aggregatedAvailability:
            type: integer
            format: int32
          nestingGroup:
            type: string
          priority:
            type: integer
            format: int32
      required:
      - aggregatedAvailability
      - nestingGroup
      - priority
  parameters:
    X-Correlation-Id:
      name: X-Correlation-Id
      in: header
      description: Correlation id
      required: false
      style: simple
      explode: false
      schema:
        type: string
    ET-Client-Name:
      name: ET-Client-Name
      in: header
      description: 'Entur Client Header.

        It is required that all consumers identify themselves by using this header.

        Entur will deploy strict rate-limiting policies on API-consumers who do not identify with a header and reserves the right to block unidentified consumers.

        The structure of ET-Client-Name should be: `<company>-<application>`.'
      required: false
      style: simple
      explode: false
      schema:
        type: string
  securitySchemes:
    bearer-key:
      type: http
      scheme: Bearer
      bearerFormat: jwt
x-refined-from:
- entur-inventory-openapi.json
- entur-inventory-openapi.yml