openapi: 3.1.1
info:
  title: FareBreakup
  version: 2.0.0
  description: Schema for FareBreakup in Beckn Logistics domain.
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    ShippingFareBreakup:
      x-iri: https://schema.nfh.global/ShippingFareBreakup/v2.0
      type: object
      title: FareBreakup
      description: A single line item in the fare breakup for a logistics service.
      required:
      - title
      - amount
      properties:
        title:
          type: string
          description: Name of the fare component
          example: Base Freight
        amount:
          type: number
          example: 450
        currency:
          type: string
          example: INR
        type:
          type: string
          enum:
          - ITEM
          - SURCHARGE
          - TAX
          - DISCOUNT
          - FEE
          example: ITEM
        taxBreakup:
          type: array
          description: Tax sub-components if applicable
          items:
            type: object
            properties:
              name:
                type: string
                example: CGST @ 9%
              percent:
                type: number
                example: 9
              amount:
                type: number
                example: 40.5
        waived:
          type: boolean
          description: Whether this component was waived
          example: false
