"$schema": https://json-schema.org/draft/2020-12/schema
title: Warehouse Receipt
description: A document issued by a warehouse operator acknowledging the receipt of goods for storage and establishing the terms under which the goods are held.
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/warehouse-receipt-context.json"
  type:
    type: array
    description: 'Document types'
    items:
      type: string
      enum:
        - VerifiableCredential
        - WarehouseReceipt
    minItems: 2
    maxItems: 2
    example:
      - VerifiableCredential
      - WarehouseReceipt
  credentialSchema:
    type: object
    description: 'Reference to the credential schema for validation'
    properties:
      id:
        type: string
        format: uri
        const: "https://unvtd.unece.org/warehouse-receipt-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 the credential'
    example: "urn:uuid:wr-2025-sydney-001"
  validFrom:
    example: 2025-03-13:10:00
    type: string
    format: date-time
    description: 'Credential validity start date'
  validTo:
    example: 2026-03-13:10:00
    type: string
    format: date-time
    description: 'Credential validity end date'
  issuer:
    name: 'Issuer'
    description: 'Identifier of the party operating the warehouse (e.g., DID)'
    type: string
    format: uri
    example: did:web:sydneywarehousing.example.com
  credentialSubject:
    name: WarehouseReceipt
    description: 'Warehouse receipt details'
    type: object
    properties:
      documentIdentifier:
        example: WR-2025-SYD-001234
        type: string
        description: Reference number identifying a specific document.
      issueDate:
        example: '2025-03-13T00:00:00Z'
        type: string
        format: date-time
        description: Date that a document was issued.
      warehouseDepositor:
        description: Party depositing goods in a warehouse.
        type: object
        properties:
          type:
            type: string
            default: Depositor
            enum:
            - Depositor
          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.
          street:
            example: 210 Ocean Road
            type: string
            description: The street component of the address
          city:
            example: Williamsburg
            type: string
            description: The city component of the address
          state:
            example: NSW
            type: string
            description: The state component of the address
          zip:
            example: 75002
            type: number
            description: 'Postal code'
          country:
            example: AU
            type: string
            description: Country.
      warehouseKeeper:
        description: Party taking responsibility for goods entered into a warehouse.
        type: object
        properties:
          type:
            type: string
            default: WarehouseKeeper
            enum:
            - WarehouseKeeper
          id:
            example: did:web:sydneywarehousing.example.com
            type: string
            format: uri
            description: A unique party identifier.
          name:
            example: Sydney Secure Warehousing Pty Ltd
            type: string
            description: Trade party name.
          street:
            example: 45 Logistics Way
            type: string
            description: The street component of the address
          city:
            example: Sydney
            type: string
            description: The city component of the address
          state:
            example: NSW
            type: string
            description: The state component of the address
          zip:
            example: 2015
            type: number
            description: 'Postal code'
          country:
            example: AU
            type: string
            description: Country.
      warehouse:
        description: Warehouse where a particular consignment has been stored.
        type: object
        properties:
          name:
            example: Sydney Secure Warehousing - Facility A
            type: string
            description: Warehouse name
          street:
            example: 45 Logistics Way
            type: string
            description: Street address
          city:
            example: Sydney
            type: string
            description: City
          state:
            example: NSW
            type: string
            description: State
          zip:
            example: 2015
            type: number
            description: 'Postal code'
          country:
            example: AU
            type: string
            description: Country
          warehouseCode:
            example: SSW-FAC-A
            type: string
            description: Internal warehouse code
      placeOfIssue:
        description: Location where a document was issued.
        type: object
        properties:
          city:
            example: Sydney
            type: string
            description: City
          state:
            example: NSW
            type: string
            description: State
          country:
            example: AU
            type: string
            description: Country
      transportContractNumber:
        example: BKG123456789
        type: string
        description: Reference number to identify a document evidencing a transport contract.
      billOfLadingNumber:
        example: POSL-2025-001234
        type: string
        description: Reference number to identify a bill of lading.
      invoiceNumber:
        example: INV-2025-031-001
        type: string
        description: Reference number to identify an invoice.
      actualArrivalDate:
        example: '2025-03-13T00:00:00Z'
        type: string
        format: date-time
        description: Date of the arrival of means of transport.
      actualDepartureDate:
        example: '2025-03-12T00:00:00Z'
        type: string
        format: date-time
        description: Date of the departure of means of transport.
      storageStartDate:
        example: '2025-03-13T00:00:00Z'
        type: string
        format: date-time
        description: Date when storage begins.
      authentication:
        example: "This receipt is authenticated and signed by Sydney Secure Warehousing Pty Ltd"
        type: string
        description: Proof that a document has been authenticated.
      documentEndorsement:
        example: "Negotiable - To order of depositor"
        type: string
        description: Proof that a document has been signed.
      storageConditions:
        example: "Goods stored in climate-controlled facility at ambient temperature"
        type: string
        description: Conditions under which goods are stored.
      handlingInstructions:
        example: "Handle with care. Keep dry. This side up."
        type: string
        description: Instructions on how goods should be handled.
      deliveryInstructions:
        example: "Release only upon presentation of original receipt and proper identification"
        type: string
        description: Delivery instructions relating to a consignment.
      totalGrossWeight:
        description: Total gross weight of stored goods.
        type: object
        properties:
          amount:
            example: 520.0
            type: number
            format: float
            description: 'Weight amount'
          unit:
            example: KGS
            type: string
            description: 'Weight unit'
      totalVolume:
        description: Total volume of stored goods.
        type: object
        properties:
          amount:
            example: 8.5
            type: number
            format: float
            description: 'Volume amount'
          unit:
            example: CBM
            type: string
            description: 'Volume unit'
      totalPackages:
        example: 18
        type: number
        description: Total number of packages.
      storedGoods:
        name: Stored Goods
        description: 'Goods stored in the warehouse'
        type: array
        items:
          type: object
          properties:
            description:
              example: Professional Longboard - Ocean Series
              type: string
              description: Plain language description of the goods.
            quantity:
              description: 'Number of units'
              type: object
              properties:
                amount:
                  example: 25
                  type: number
                  description: 'Quantity amount'
                unit:
                  example: Units
                  type: string
                  description: 'Unit of measure'
            numberOfPackages:
              example: 5
              type: number
              description: Number of packages.
            packagingType:
              example: CT
              type: string
              description: Code specifying the type of packaging.
            shippingMarks:
              example: "SURFPRO/WRS/001-005"
              type: string
              description: Free form description of the marks and numbers.
            grossWeight:
              description: Gross weight including packaging.
              type: object
              properties:
                amount:
                  example: 200.0
                  type: number
                  format: float
                  description: 'Weight amount'
                unit:
                  example: KGS
                  type: string
                  description: 'Weight unit'
            storageLocation:
              example: "Zone A, Row 12, Bay 3-4"
              type: string
              description: Location within the warehouse where goods are stored.
            condition:
              example: "Good condition"
              type: string
              description: Condition of the goods upon receipt.
          description: A specific goods item stored in the warehouse.
    required:
      - documentIdentifier
      - issueDate
      - warehouseDepositor
      - warehouseKeeper
      - warehouse
      - storedGoods


