openapi: 3.1.1
info:
  title: ReturnPolicy
  version: 2.0.0
  description: Schema for ReturnPolicy in Beckn Logistics domain.
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    ReturnPolicy:
      x-iri: https://schema.nfh.global/ReturnPolicy/v2.0
      type: object
      title: ReturnPolicy
      description: Defines conditions for returning goods and reverse logistics workflows.
      properties:
        id:
          type: string
          example: RP-STD-001
        returnsAccepted:
          type: boolean
          example: true
        returnWindow:
          type: object
          properties:
            value:
              type: integer
              example: 7
            unit:
              type: string
              enum:
              - days
              - hours
              example: days
        returnReason:
          type: array
          items:
            type: string
          example:
          - DAMAGED_IN_TRANSIT
          - WRONG_ITEM
          - CONSIGNEE_REFUSED
          - ADDRESS_NOT_FOUND
        reversePickupCharge:
          type: object
          properties:
            type:
              type: string
              enum:
              - FREE
              - FLAT
              - PERCENTAGE
              example: FREE
            value:
              type: number
              example: 0
            currency:
              type: string
              example: INR
        refundOnReturn:
          type: boolean
          example: true
        returnHubAddress:
          $ref: https://schema.nfh.global/LogisticsPlace/v2.0/attributes.yaml#/components/schemas/LogisticsPlace
