$schema: https://json-schema.org/draft/2020-12/schema
title: Despatch Advice / Delivery Note
description: A notification from the despatch party to the consignee that goods have been despatched, detailing the contents
  of the consignment. The same data set serves as the delivery note accompanying the goods, including proof-of-delivery confirmation
  on receipt.
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/despatch-advice-context.json
  type:
    type: array
    description: Document types
    items:
      type: string
      enum:
        - VerifiableCredential
        - DespatchAdvice
    minItems: 2
    maxItems: 2
    example:
      - VerifiableCredential
      - DespatchAdvice
  credentialSchema:
    type: object
    description: Reference to the credential schema for validation
    properties:
      id:
        type: string
        format: uri
        const: https://unvtd.unece.org/despatch-advice-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:da-2025-surfpro-001
  validFrom:
    example: 2025-03-09:10:00
    type: string
    format: date-time
    description: Credential validity start date
  validTo:
    example: 2026-03-09:10:00
    type: string
    format: date-time
    description: Credential validity end date
  issuer:
    name: Issuer
    description: Identifier of the party issuing the despatch advice (e.g., DID). Must match the despatch party.
    type: string
    format: uri
    example: did:web:surfpro.example.com
  credentialSubject:
    name: DespatchAdvice
    description: Despatch advice / delivery note details
    type: object
    properties:
      despatchAdviceNumber:
        example: DA-2025-031-001
        type: string
        description: Identifier assigned by the despatch party to the despatch advice.
      deliveryNoteNumber:
        example: DN-2025-031-001
        type: string
        description: Reference number to identify the delivery note accompanying the goods. May equal the despatch advice
          number.
      issueDate:
        example: '2025-03-09T00:00:00Z'
        type: string
        format: date-time
        description: Date that a document was issued.
      despatchDate:
        example: '2025-03-11T00:00:00Z'
        type: string
        format: date-time
        description: Date on which goods are despatched or consigned.
      estimatedDeliveryDate:
        example: '2025-03-18T00:00:00Z'
        type: string
        format: date-time
        description: Date on which the goods are expected to be delivered.
      purchaseOrderNumber:
        example: PO-2025-001
        type: string
        description: Identifier assigned by the buyer to an order.
      contractNumber:
        example: CTR-2025-SURF-001
        type: string
        description: Identifier of a contract concluded between parties.
      invoiceNumber:
        example: INV-2025-031-001
        type: string
        description: Reference number to identify an invoice.
      transportContractNumber:
        example: BKG123456789
        type: string
        description: Reference number to identify a document evidencing a transport contract.
      despatchParty:
        description: Party from which goods are despatched (consignor).
        type: object
        required:
          - type
          - id
          - name
        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.
      buyer:
        description: Party to which merchandise or services are sold.
        type: object
        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 selling merchandise or services to a buyer.
        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.
      consignee:
        description: Party to which goods are consigned.
        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.
      carrier:
        description: Party providing the transport of goods between named points.
        type: object
        properties:
          type:
            type: string
            default: Party
            enum:
              - Party
          id:
            example: did:web:pacificshipping.example.com
            type: string
            format: uri
            description: A unique party identifier.
          name:
            example: Pacific Ocean Shipping Lines
            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: 88 Harbour Street
                type: string
                description: The street component of the address
              addressLocality:
                example: Sydney
                type: string
                description: The city component of the address
              addressRegion:
                example: NSW
                type: string
                description: The state component of the address
              postalCode:
                example: '2000'
                type: string
                description: Postal code.
              addressCountry:
                example: AU
                type: string
                description: Country code.
      despatchLocation:
        type: object
        properties:
          type:
            type: string
            default: Location
            enum:
              - Location
          name:
            example: SurfPro Manufacturing Facility
            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: 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.
        description: Place from which despatch is to take place.
      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 a consignment is to be delivered.
      tradeTermsConditionsCode:
        example: DAP
        type: string
        description: The trade terms (Incoterms) code applicable to this delivery.
      tradeTermsConditionsDescription:
        example: DAP Williamsburg, NSW
        type: string
        description: Trade terms description, including the named place.
      transportMode:
        example: Maritime
        type: string
        description: Mode of transport used for the movement of goods.
      conveyanceReferenceNumber:
        example: VOYAGE-2025-AU-001
        type: string
        description: Identifier of a journey of a means of transport, such as a voyage or flight number (UID:8028).
      vehicleRegistrationNumber:
        example: IMO9876543
        type: string
        description: Identifier of the specific means of transport such as IMO number or vessel registration (UID:8213).
      deliveryInstructions:
        example: Deliver to goods-in dock 3. Notify warehouse manager 24h in advance.
        type: string
        description: Instructions regarding the delivery of the consignment.
      handlingInstructions:
        example: Handle with care. Keep dry. This side up.
        type: string
        description: Instructions on how packages should be handled.
      transportTemperature:
        example: Ambient temperature
        type: string
        description: Instructions regarding the temperature under which the cargo has to be transported.
      totalGrossWeight:
        description: Total gross weight of all packages.
        type: object
        properties:
          amount:
            example: 520.0
            type: number
            format: float
            description: Weight amount
          unit:
            example: KGS
            type: string
            description: Weight unit
      totalNetWeight:
        description: Total net weight of all items.
        type: object
        properties:
          amount:
            example: 475.0
            type: number
            format: float
            description: Weight amount
          unit:
            example: KGS
            type: string
            description: Weight unit
      totalPackages:
        example: 18
        type: number
        description: Total number of packages.
      totalVolume:
        description: Total volume of all packages.
        type: object
        properties:
          amount:
            example: 8.5
            type: number
            format: float
            description: Volume amount
          unit:
            example: CBM
            type: string
            description: Volume unit (cubic meters)
      lineItems:
        name: Line Items
        description: Despatched line items, reconciling ordered against despatched quantities
        type: array
        items:
          type: object
          properties:
            lineNumber:
              example: 1
              type: number
              description: Sequential line number within the despatch advice.
            orderLineNumber:
              example: 1
              type: number
              description: Corresponding line number on the referenced purchase order.
            description:
              example: Professional Longboard - Ocean Series
              type: string
              description: Description of the item.
            sku:
              example: SURF-LB-001
              type: string
              description: Stock keeping unit identifier assigned by the seller.
            buyerItemNumber:
              example: WRS-40021
              type: string
              description: Item identifier assigned by the buyer.
            hsCode:
              example: '950629'
              type: string
              description: Harmonized System code.
            originCountry:
              example: AU
              type: string
              description: Country of origin.
            quantityOrdered:
              description: Quantity ordered on the referenced purchase order.
              type: object
              properties:
                amount:
                  example: 40
                  type: number
                  description: Quantity value
                unit:
                  example: EA
                  type: string
                  description: Quantity unit
            quantityDespatched:
              description: Quantity actually despatched in this consignment.
              type: object
              properties:
                amount:
                  example: 40
                  type: number
                  description: Quantity value
                unit:
                  example: EA
                  type: string
                  description: Quantity unit
            quantityOutstanding:
              description: Quantity remaining to be despatched against the order after this consignment.
              type: object
              properties:
                amount:
                  example: 0
                  type: number
                  description: Quantity value
                unit:
                  example: EA
                  type: string
                  description: Quantity unit
            batchNumber:
              example: BATCH-2025-072
              type: string
              description: Identifier of the production batch or lot.
            serialNumbers:
              description: Serial numbers of the despatched units, where serialized.
              type: array
              items:
                example: SN-88231
                type: string
                description: Serial number of an individual unit.
            bestBeforeDate:
              example: '2026-09-01T00:00:00Z'
              type: string
              format: date-time
              description: Best before date applicable to the despatched batch.
            expiryDate:
              example: '2027-03-01T00:00:00Z'
              type: string
              format: date-time
              description: Expiry date applicable to the despatched batch.
            netWeight:
              description: Total net weight of the despatched quantity for this line.
              type: object
              properties:
                amount:
                  example: 300.0
                  type: number
                  format: float
                  description: Weight amount
                unit:
                  example: KGS
                  type: string
                  description: Weight unit
            packageNumbers:
              description: Package numbers in which this line item is contained.
              type: array
              items:
                example: 1
                type: number
                description: Reference to a package number.
          description: A despatched line item.
      packages:
        name: Packages
        description: Details of individual packages
        type: array
        items:
          type: object
          properties:
            packageNumber:
              example: 1
              type: number
              description: Sequential package number
            packageType:
              example: CT
              type: string
              description: Code specifying the type of packaging (CT=Carton).
            shippingMark:
              example: SURFPRO/WRS/001
              type: string
              description: Marks and numbers on the package.
            sscc:
              example: 00312345678901234560
              type: string
              description: Serial Shipping Container Code identifying the logistic unit.
            grossWeight:
              description: Gross weight of the package.
              type: object
              properties:
                amount:
                  example: 40.0
                  type: number
                  format: float
                  description: Weight amount
                unit:
                  example: KGS
                  type: string
                  description: Weight unit
            volume:
              description: Volume of the package.
              type: object
              properties:
                amount:
                  example: 0.5
                  type: number
                  format: float
                  description: Volume amount
                unit:
                  example: CBM
                  type: string
                  description: Volume unit
          description: Details of a specific package.
      proofOfDelivery:
        description: Informational snapshot of receipt as recorded by the despatch party's systems. Because this credential
          is signed by the despatch party and immutable, this block carries no evidential weight for receipt. In fully electronic
          processes the confirmation of delivery is a separate DeliveryConfirmation credential signed by the consignee (see
          delivery-confirmation-schema.yaml), referencing this credential by id and digest.
        type: object
        properties:
          receivedBy:
            example: J. Smith, Goods-In Supervisor
            type: string
            description: Name and role of the person acknowledging receipt.
          receivedDate:
            example: '2025-03-18T14:30:00Z'
            type: string
            format: date-time
            description: Date and time at which the consignment was received.
          condition:
            example: Received complete and in good condition
            type: string
            description: Condition of the consignment as received.
          remarks:
            example: ''
            type: string
            description: Reservations or remarks recorded by the receiver.
    required:
      - despatchAdviceNumber
      - issueDate
      - despatchDate
      - despatchParty
      - consignee
      - lineItems
