openapi: 3.1.1
info:
  title: Fulfillment
  version: 2.1.0
  description: Schema definition for Fulfillment in the Beckn Protocol v2.0.1
  license:
    name: CC-BY-NC-SA 4.0 International
  contact:
    name: Beckn Labs
    url: https://beckn.io
components:
  schemas:
    Fulfillment:
      x-iri: https://schema.nfh.global/Fulfillment/v2.1
      description: Schema definition for Fulfillment in the Beckn Protocol v2.0.1
      title: Fulfillment
      x-tags:
      - common
      type: object
      properties:
        agent:
          description: The entity that directly performs the fulfillment
          $ref: https://schema.nfh.global/FulfillmentAgent/v2.0/attributes.yaml#/components/schemas/FulfillmentAgent
        fulfillmentAttributes:
          description: Extensible set of domain-specific attributes describing the
            fulfillment
          $ref: https://schema.nfh.global/Attributes/v2.0/attributes.yaml#/components/schemas/Attributes
        id:
          description: Fulfillment identifier
          type: string
          x-jsonld:
            '@id': schema:identifier
        instructions:
          type: array
          items:
            $ref: https://schema.nfh.global/Descriptor/v2.1/attributes.yaml#/components/schemas/Descriptor
        mode:
          description: Extensible set of attributes describing the mode of fulfillment.
            Varies with Industry Use Case
          x-jsonld:
            '@id': beckn:FulfillmentMode
          $ref: https://schema.nfh.global/FulfillmentMode/v2.0/attributes.yaml#/components/schemas/FulfillmentMode
        participants:
          description: A list of participants who are entitled to receive the fulfillment
            of the order. By default, it is the consumer who placed the order
          type: array
          items:
            $ref: https://schema.nfh.global/Participant/v2.0/attributes.yaml#/components/schemas/Participant
          minItems: 1
        state:
          description: The current state of fulfillment
          $ref: https://schema.nfh.global/State/v2.0/attributes.yaml#/components/schemas/State
        stages:
          description: The various stages of the fulfillment
          type: array
          items:
            $ref: https://schema.nfh.global/FulfillmentStage/v2.0/attributes.yaml#/components/schemas/FulfillmentStage
          minItems: 1
        trackingEnabled:
          description: Whether tracking is enabled / possible for this fulfillment
          type: boolean
      required:
      - mode
      additionalProperties: false
