$schema: https://json-schema.org/draft/2020-12/schema
title: Request for Quote
description: A request for quote is a commercial document issued by a (potential) buyer to one or more (potential) sellers,
  requesting a price quotation for specified products or services.
type: object
required:
  - '@context'
  - type
  - credentialSchema
  - validTo
  - issuer
  - credentialSubject
properties:
  '@context':
    type: string
    format: uri
    description: Linked Data context for semantic interoperability
    const: https://unvtd.unece.org/request-for-quote-context.json
  type:
    type: array
    description: Document types
    items:
      type: string
      enum:
        - VerifiableCredential
        - RequestForQuote
    minItems: 2
    maxItems: 2
    example:
      - VerifiableCredential
      - RequestForQuote
  credentialSchema:
    type: object
    description: Reference to the credential schema for validation
    properties:
      id:
        type: string
        format: uri
        const: https://unvtd.unece.org/request-for-quote-schema.yaml
        description: Public location of the schema
      type:
        type: string
        const: JsonSchema
        description: Schema type identifier
    required:
      - id
      - type
  id:
    type: string
    format: uri
    description: Unique identifier for this request for quote credential
    example: urn:uuid:e9bf65a3-9ff3-4988-8c44-2535b949279f
  validFrom:
    example: 2025-03-06 10:00:00+00:00
    type: string
    format: date-time
    description: Date from which this credential is valid
  validTo:
    example: 2026-03-06 10:00:00+00:00
    type: string
    format: date-time
    description: Date until which this credential is valid
  issuer:
    name: Issuer
    description: Identifier of the party that issued this request for quote credential (e.g., DID). Must match the buyer.
    type: string
    format: uri
    example: did:web:waveridersupplies.example.com
  credentialSubject:
    name: Request for Quote
    description: Request for quote document details
    type: object
    required:
      - requestForQuoteNumber
      - issueDate
      - buyer
      - requestedItems
    properties:
      requestForQuoteNumber:
        example: RFQ-2025-WRS-007
        type: string
        description: Identifier assigned by the buyer to a request for quote.
      issueDate:
        example: '2025-01-20T00:00:00Z'
        type: string
        format: date-time
        description: Date of issue of the request for quote.
      replyByDate:
        example: '2025-02-03T17:00:00Z'
        type: string
        format: date-time
        description: Latest date by which quotations are to be received.
      requestedDeliveryDate:
        example: '2025-03-15T00:00:00Z'
        type: string
        format: date-time
        description: Requested date of delivery of the goods.
      buyer:
        description: Party requesting the quotation, to which merchandise or services would be sold.
        type: object
        required:
          - type
          - id
          - name
        properties:
          type:
            type: string
            default: Party
            enum:
              - Party
          id:
            example: did:web:waveridersupplies.example.com
            type: string
            format: uri
            description: A unique party identifier.
          name:
            example: Wave Rider Supplies, Inc
            type: string
            description: Trade party name.
          postalAddress:
            description: The postal address of the party.
            type: object
            properties:
              type:
                type: string
                default: Address
                enum:
                  - Address
              streetAddress:
                example: 210 Ocean Road
                type: string
                description: The street component of the address
              addressLocality:
                example: Williamsburg
                type: string
                description: The city component of the address
              addressRegion:
                example: NSW
                type: string
                description: The state component of the address
              postalCode:
                example: '75002'
                type: string
                description: Postal code.
              addressCountry:
                example: AU
                type: string
                description: Country code.
      seller:
        description: Party to which the request is addressed. Omitted for an open request.
        type: object
        properties:
          type:
            type: string
            default: Party
            enum:
              - Party
          id:
            example: did:web:surfpro.example.com
            type: string
            format: uri
            description: A unique party identifier.
          name:
            example: SurfPro Manufacturing Inc.
            type: string
            description: Trade party name.
          postalAddress:
            description: The postal address of the party.
            type: object
            properties:
              type:
                type: string
                default: Address
                enum:
                  - Address
              streetAddress:
                example: 150 Industrial Drive
                type: string
                description: The street component of the address
              addressLocality:
                example: Gold Coast
                type: string
                description: The city component of the address
              addressRegion:
                example: QLD
                type: string
                description: The state component of the address
              postalCode:
                example: '4217'
                type: string
                description: Postal code.
              addressCountry:
                example: AU
                type: string
                description: Country code.
      deliveryLocation:
        type: object
        properties:
          type:
            type: string
            default: Location
            enum:
              - Location
          name:
            example: Wave Rider Supplies Warehouse
            type: string
            description: Location name.
          unLocode:
            type: string
            description: UN/LOCODE location identifier (5 characters).
          postalAddress:
            description: The postal address of the location.
            type: object
            properties:
              type:
                type: string
                default: Address
                enum:
                  - Address
              streetAddress:
                example: 210 Ocean Road
                type: string
                description: The street component of the address
              addressLocality:
                example: Williamsburg
                type: string
                description: The city component of the address
              addressRegion:
                example: NSW
                type: string
                description: The state component of the address
              postalCode:
                example: '75002'
                type: string
                description: Postal code.
              addressCountry:
                example: AU
                type: string
                description: Country code.
        description: Location to which the goods are to be delivered.
      tradeTermsConditionsCode:
        example: FCA
        type: string
        description: The trade terms (Incoterms) code.
      tradeTermsConditionsDescription:
        example: FCA SurfPro Manufacturing Facility, Gold Coast QLD
        type: string
        description: Trade terms description, including the named place.
      paymentTerms:
        example: Net 30 days
        type: string
        description: Identification of the terms of payment between the parties to a transaction.
      paymentMethod:
        example: Wire Transfer
        type: string
        description: Code specifying a method of payment.
      requestedItems:
        name: Requested Items
        description: Items for which a quotation is requested
        type: array
        minItems: 1
        items:
          type: object
          required:
            - productIdentifier
            - quantityRequested
          properties:
            productIdentifier:
              example: SURF-LB-001
              type: string
              description: Reference number identifying a product.
            product:
              type: object
              properties:
                id:
                  example: urn:uuid:surf-001-longboard
                  type: string
                  format: uri
                  description: A unique identifier for the product.
                name:
                  example: Professional Longboard - Ocean Series
                  type: string
                  description: Product name
                description:
                  example: High-performance longboard with premium bamboo core and fiberglass construction, 9'6" length
                  type: string
                  description: Product description
              description: Product details
            hsCode:
              example: '950629'
              type: string
              description: Harmonized System (HS) commodity code of the product.
            originCountry:
              example: AU
              type: string
              description: Country of origin of the product.
            quantityRequested:
              example: 40
              type: number
              description: The quantity for which a quotation is requested.
            targetUnitPrice:
              description: Target price per unit, if the buyer states one.
              type: object
              properties:
                amount:
                  example: 750
                  type: number
                  format: float
                  description: Unit price amount
                currency:
                  example: USD
                  type: string
                  description: Currency code
          description: A line item in the request for quote.
