> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dev.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# flight-price-advice

> Accept a flight with its current price for price advice

This endpoint is in preview. Contact support to request access. It accepts a flight with its current price, validates the request, and returns statistics\_not\_ready with fixed 1-day and 3-day horizons; the user does not select a wait duration. Each horizon reports the probabilities that the price will increase, decrease, or stay unchanged relative to current\_price; all three are null while the preview is not ready. It requires a verified jnk\_ API key and does not search flights, load statistics, create monitoring, make a buy/wait recommendation, or book anything.


## OpenAPI

````yaml api-reference/public-api-dev.yaml POST /v1/flight_price_advice
openapi: 3.0.0
info:
  title: Jinko Public API
  version: 0.23.0
  description: >-
    Curated public REST surface for Jinko. Authenticated with jnk_ API keys. See
    https://docs.gojinko.com for guides.


    ### Per-end-user attribution


    On booking calls you may send an optional `X-End-User-Id` request header to
    attribute the booking to one of your own end users (for per-end-user
    attribution and rate-limiting). The value is an **opaque, tenant-scoped**
    identifier that you choose — not a Jinko account id. Omit it to book as the
    tenant. WorkOS-shaped values (prefixed `user_` or `org_`) are rejected.
servers:
  - url: https://api.dev.gojinko.com
    description: Development preview
security: []
paths:
  /v1/flight_price_advice:
    post:
      tags:
        - Discovery
      summary: Accept a flight with its current price for price advice
      description: >-
        This endpoint is in preview. Contact support to request access. It
        accepts a flight with its current price, validates the request, and
        returns statistics_not_ready with fixed 1-day and 3-day horizons; the
        user does not select a wait duration. Each horizon reports the
        probabilities that the price will increase, decrease, or stay unchanged
        relative to current_price; all three are null while the preview is not
        ready. It requires a verified jnk_ API key and does not search flights,
        load statistics, create monitoring, make a buy/wait recommendation, or
        book anything.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FlightPriceAdviceRequest'
      responses:
        '200':
          description: Validated request; flight price statistics are not ready
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FlightPriceAdviceResponse'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: Malformed JSON in request body.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: AUTH_REQUIRED
                  message: Invalid or expired API key.
                  doc_url: https://docs.gojinko.com/authentication/api-keys
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: BAD_REQUEST
                  message: A required field is missing or invalid.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '502':
          description: The travel provider rejected the request, or an upstream call failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_REJECTED
                  message: The upstream service rejected the request.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '503':
          description: No travel provider can serve the request right now
          headers:
            Retry-After:
              description: >-
                Seconds to wait before retrying, forwarded verbatim from the
                upstream service. Absent when the upstream named no interval.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_UNAVAILABLE
                  message: >-
                    The upstream service is temporarily unavailable. Please
                    retry later.
                  doc_url: https://docs.gojinko.com/concepts/errors
        '504':
          description: The travel provider did not answer in time
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: UPSTREAM_TIMEOUT
                  message: The upstream service did not respond in time.
                  doc_url: https://docs.gojinko.com/concepts/errors
      security:
        - ApiKeyAuth: []
components:
  schemas:
    FlightPriceAdviceRequest:
      type: object
      properties:
        origin:
          type: string
          pattern: ^[A-Z]{3}$
          example: NYC
        destination:
          type: string
          pattern: ^[A-Z]{3}$
          example: LAX
        departure_date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2026-10-20'
        trip_type:
          type: string
          enum:
            - oneway
            - roundtrip
        max_stops:
          anyOf:
            - type: number
              enum:
                - 0
            - type: number
              enum:
                - 1
            - type: number
              enum:
                - 2
        cabin_class:
          type: string
          enum:
            - economy
            - premium_economy
            - business
            - first
        current_price:
          $ref: '#/components/schemas/FlightPriceAdviceAmount'
      required:
        - origin
        - destination
        - departure_date
        - trip_type
        - max_stops
        - cabin_class
        - current_price
      additionalProperties: false
      description: >-
        DEV contract preview input. Structural trip type, stop count, and cabin
        values are validated; this preview does not imply statistics coverage.
    FlightPriceAdviceResponse:
      type: object
      properties:
        schema_version:
          type: string
          enum:
            - '2.1'
        status:
          type: string
          enum:
            - not_ready
        reason:
          type: string
          enum:
            - statistics_not_ready
        summary:
          type: string
          enum:
            - >-
              Price statistics are not ready. This development preview validates
              the request only; it cannot assess this price or recommend when to
              book.
        context:
          $ref: '#/components/schemas/FlightPriceAdviceContext'
        price_assessment:
          type: object
          properties:
            status:
              type: string
              enum:
                - unavailable
            reason_code:
              type: string
              enum:
                - statistics_not_ready
            label:
              nullable: true
            typical_price:
              nullable: true
            typical_range:
              nullable: true
            percentile:
              nullable: true
            difference_pct:
              nullable: true
            comparison_basis:
              type: string
              enum:
                - historical_comparable_low_fares
            evidence:
              nullable: true
          required:
            - status
            - reason_code
            - label
            - typical_price
            - typical_range
            - percentile
            - difference_pct
            - comparison_basis
            - evidence
          additionalProperties: false
        wait_assessment:
          type: object
          properties:
            status:
              type: string
              enum:
                - unavailable
            reason_code:
              type: string
              enum:
                - statistics_not_ready
            horizons:
              type: array
              items:
                anyOf:
                  - type: object
                    properties:
                      horizon_days:
                        type: number
                        enum:
                          - 1
                      status:
                        type: string
                        enum:
                          - unavailable
                      reason_code:
                        type: string
                        enum:
                          - statistics_not_ready
                      direction:
                        nullable: true
                      historical_reference:
                        nullable: true
                      probabilities:
                        type: object
                        properties:
                          increase:
                            type: number
                            description: >-
                              Probability that the price will increase relative
                              to current_price; not ready.
                            not:
                              type: number
                            nullable: true
                          decrease:
                            type: number
                            description: >-
                              Probability that the price will decrease relative
                              to current_price; not ready.
                            not:
                              type: number
                            nullable: true
                          unchanged:
                            type: number
                            description: >-
                              Probability that the price will be unchanged from
                              current_price; not ready.
                            not:
                              type: number
                            nullable: true
                        required:
                          - increase
                          - decrease
                          - unchanged
                        additionalProperties: false
                        description: >-
                          Mutually exclusive price outcomes after this horizon;
                          values are null until probabilities are available,
                          then each is 0 to 1 and their sum is 1.
                    required:
                      - horizon_days
                      - status
                      - reason_code
                      - direction
                      - historical_reference
                      - probabilities
                    additionalProperties: false
                  - type: object
                    properties:
                      horizon_days:
                        type: number
                        enum:
                          - 3
                      status:
                        type: string
                        enum:
                          - unavailable
                      reason_code:
                        type: string
                        enum:
                          - statistics_not_ready
                      direction:
                        nullable: true
                      historical_reference:
                        nullable: true
                      probabilities:
                        type: object
                        properties:
                          increase:
                            type: number
                            description: >-
                              Probability that the price will increase relative
                              to current_price; not ready.
                            not:
                              type: number
                            nullable: true
                          decrease:
                            type: number
                            description: >-
                              Probability that the price will decrease relative
                              to current_price; not ready.
                            not:
                              type: number
                            nullable: true
                          unchanged:
                            type: number
                            description: >-
                              Probability that the price will be unchanged from
                              current_price; not ready.
                            not:
                              type: number
                            nullable: true
                        required:
                          - increase
                          - decrease
                          - unchanged
                        additionalProperties: false
                        description: >-
                          Mutually exclusive price outcomes after this horizon;
                          values are null until probabilities are available,
                          then each is 0 to 1 and their sum is 1.
                    required:
                      - horizon_days
                      - status
                      - reason_code
                      - direction
                      - historical_reference
                      - probabilities
                    additionalProperties: false
              minItems: 2
              maxItems: 2
              description: >-
                Exactly two entries in order: the 1-day horizon, then the 3-day
                horizon.
          required:
            - status
            - reason_code
            - horizons
          additionalProperties: false
        recommendation:
          type: object
          properties:
            action:
              type: string
              enum:
                - no_clear_signal
            basis:
              nullable: true
            summary:
              type: string
              enum:
                - >-
                  Statistics are not ready; no buy or wait recommendation is
                  available.
          required:
            - action
            - basis
            - summary
          additionalProperties: false
        live_quotes_used:
          type: boolean
          enum:
            - false
      required:
        - schema_version
        - status
        - reason
        - summary
        - context
        - price_assessment
        - wait_assessment
        - recommendation
        - live_quotes_used
      additionalProperties: false
      description: >-
        Current DEV preview response. Statistics are unavailable and every
        statistical result is null.
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - credential_format_invalid
                - payment_type_not_enabled
                - payment_credential_invalid
                - trip_owned_by_other_payment
                - idempotency_key_reused
                - attempt_in_progress
                - quote_expired
                - attempt_terminal
                - temporarily_unavailable
                - AUTH_REQUIRED
                - PAYMENT_REQUIRED
                - RATE_LIMITED
                - BAD_REQUEST
                - FORBIDDEN
                - NOT_FOUND
                - CONFLICT
                - GONE
                - QUOTE_EXPIRED
                - TRIP_EXPIRED
                - TRIP_STATE_CONFLICT
                - OFFER_EXPIRED
                - OFFER_UNAVAILABLE
                - MISSING_CUSTOMER_DETAILS
                - INVALID_PHONE_NUMBER
                - CURRENCY_UNSUPPORTED
                - HOTEL_NAME_LOW_CONFIDENCE
                - DESTINATION_LOW_CONFIDENCE
                - UPSTREAM_REJECTED
                - UPSTREAM_UNAVAILABLE
                - UPSTREAM_TIMEOUT
                - UPSTREAM_ERROR
                - INTERNAL
              description: >-
                What went wrong, as a stable machine-readable code. This is a
                closed set — branch on it rather than on `message`, which is
                prose and may change. New codes arrive in a minor version, so
                treat an unknown one as its HTTP status. A code can also stop
                being emitted: it leaves this set in a minor version, named in
                the changelog, and a branch you wrote for it goes unreached
                rather than wrong.
              example: BAD_REQUEST
            message:
              type: string
            doc_url:
              type: string
          required:
            - code
            - message
      required:
        - error
    FlightPriceAdviceAmount:
      type: object
      properties:
        value:
          type: integer
          minimum: 0
          exclusiveMinimum: true
          maximum: 9007199254740991
          description: Positive integer in currency minor units.
          example: 32000
        currency:
          type: string
          pattern: ^[A-Z]{3}$
          example: USD
        decimal_places:
          type: integer
          minimum: 0
          example: 2
      required:
        - value
        - currency
        - decimal_places
      additionalProperties: false
      description: >-
        One adult total fare for the supplied trip, including tax and excluding
        optional paid extras. Value 32000, USD, decimal_places 2 means USD
        320.00.
    FlightPriceAdviceContext:
      type: object
      properties:
        origin:
          type: string
          pattern: ^[A-Z]{3}$
          example: NYC
        destination:
          type: string
          pattern: ^[A-Z]{3}$
          example: LAX
        departure_date:
          type: string
          pattern: ^\d{4}-\d{2}-\d{2}$
          example: '2026-10-20'
        trip_type:
          type: string
          enum:
            - oneway
            - roundtrip
        max_stops:
          anyOf:
            - type: number
              enum:
                - 0
            - type: number
              enum:
                - 1
            - type: number
              enum:
                - 2
        cabin_class:
          type: string
          enum:
            - economy
            - premium_economy
            - business
            - first
        current_price:
          $ref: '#/components/schemas/FlightPriceAdviceAmount'
        price_basis:
          type: string
          enum:
            - per_adult_total_including_tax
        evaluated_at:
          type: string
          format: date-time
        apex_days:
          type: integer
          minimum: 0
          exclusiveMinimum: true
      required:
        - origin
        - destination
        - departure_date
        - trip_type
        - max_stops
        - cabin_class
        - current_price
        - price_basis
        - evaluated_at
        - apex_days
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````