openapi: 3.1.1
info:
  title: Quote
  version: 2.0.0
  description: 'A price quote generated by a BPP for a specific selection of offers
    and fulfillment options. Returned in on_select, on_init, and on_confirm responses.
    Aggregates item prices, taxes, delivery charges, and discounts into a total.

    '
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    Quote:
      x-iri: https://schema.nfh.global/Quote/v2.0
      description: 'A price quote generated by a BPP for a specific selection of offers
        and fulfillment options. Returned in on_select, on_init, and on_confirm responses.
        Aggregates item prices, taxes, delivery charges, and discounts into a total.

        '
      title: Quote
      x-tags:
      - common
      type: object
      properties:
        id:
          description: Unique identifier for this quote.
          type: string
          x-jsonld:
            '@id': schema:identifier
        price:
          description: Total quoted price (inclusive of all charges and discounts).
          type: object
          additionalProperties: false
          required:
          - currency
          - value
          properties:
            currency:
              description: ISO 4217 currency code.
              type: string
            value:
              description: Total amount.
              type: number
        breakup:
          description: Itemised breakdown of the total quoted price.
          type: array
          items:
            type: object
            additionalProperties: false
            required:
            - title
            - price
            properties:
              title:
                description: "Human-readable label for this breakup line (e.g., \"\
                  Margherita \xD7 1\", \"Delivery charge\", \"GST\")."
                type: string
              type:
                description: Category of this breakup line.
                type: string
                enum:
                - ITEM
                - DELIVERY
                - TAX
                - DISCOUNT
                - CONVENIENCE_FEE
                - PLATFORM_FEE
                - TIP
                - OTHER
              price:
                type: object
                additionalProperties: false
                required:
                - currency
                - value
                properties:
                  currency:
                    type: string
                  value:
                    type: number
              offerId:
                description: Offer ID this line corresponds to (if type=ITEM).
                type: string
              itemId:
                description: Item ID this line corresponds to (if type=ITEM).
                type: string
              quantity:
                description: Quantity of the item in this line.
                type: integer
                minimum: 1
        validity:
          description: Validity window within which the quote is honoured.
          type: object
          additionalProperties: false
          properties:
            start:
              description: ISO 8601 date-time from which the quote is valid.
              type: string
              format: date-time
            end:
              description: ISO 8601 date-time after which the quote expires.
              type: string
              format: date-time
      required: []
      additionalProperties: false
