"$schema": https://json-schema.org/draft/2020-12/schema
title: Ship's Delivery Order
description: A document issued by or on behalf of a carrier authorising the release of specified cargo to a named party, derived from and referencing the original bill of lading.
type: object
required:
  - "@context"
  - type
  - credentialSchema
  - issuer
  - credentialSubject
properties:
  "@context":
    type: string
    format: uri
    description: 'Linked Data context for semantic interoperability'
    const: "https://un.opensource.unicc.org/unece/uncefact/spec-unvtd/ships-delivery-order-context.json"
  type:
    type: array
    description: 'Credential types'
    items:
      type: string
      enum:
        - VerifiableCredential
        - ShipsDeliveryOrder
    minItems: 2
    maxItems: 2
    example:
      - VerifiableCredential
      - ShipsDeliveryOrder
  credentialSchema:
    type: object
    description: 'Reference to the credential schema for validation'
    properties:
      id:
        type: string
        format: uri
        const: "https://un.opensource.unicc.org/unece/uncefact/spec-unvtd/ships-delivery-order-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:sdo-2025-au-001234"
  validFrom:
    example: 2025-03-14T00:00:00Z
    type: string
    format: date-time
    description: 'Credential validity start date'
  validTo:
    example: 2025-04-14T00:00:00Z
    type: string
    format: date-time
    description: 'Credential validity end date'
  issuer:
    description: 'Identifier of the carrier or agent issuing the delivery order (e.g., DID)'
    type: string
    format: uri
    example: did:web:pacificshipping.example.com
  credentialSubject:
    name: ShipsDeliveryOrder
    description: "Ship's delivery order details"
    type: object
    required:
      - billOfLadingNumber
      - carrier
      - consignee
      - originalLoadingLocation
      - baseportUnloadingLocation
      - deliveryLocation
      - grossWeight
      - shippingMarks
      - conveyanceReferenceNumber
      - transportMeansIdentifier
      - transportEquipmentIdentifier
      - sealIdentifier
    properties:
      billOfLadingNumber:
        example: POSL-2025-001234
        type: string
        description: Reference number of the original bill of lading from which this delivery order is derived.
      consignee:
        description: Party authorised to receive delivery of the cargo.
        type: object
        properties:
          type:
            type: string
            default: Consignee
            enum:
            - Consignee
          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: VA
            type: string
            description: The state component of the address.
          zip:
            example: 23185
            type: number
            description: Postal code.
          country:
            example: US
            type: string
            description: Country.
      carrier:
        description: Carrier who issued the original bill of lading and is releasing the goods.
        type: object
        properties:
          type:
            type: string
            default: Carrier
            enum:
            - Carrier
          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.
          country:
            example: AU
            type: string
            description: Country.
      despatchPickupParty:
        description: Party responsible for despatching or picking up the cargo at the port.
        type: object
        properties:
          type:
            type: string
            default: DespatchPickupParty
            enum:
            - DespatchPickupParty
          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.
          country:
            example: US
            type: string
            description: Country.
      originalLoadingLocation:
        description: Port at which the cargo was originally loaded onto the vessel.
        type: object
        properties:
          name:
            example: Port of Gold Coast
            type: string
            description: Location name.
          city:
            example: Gold Coast
            type: string
            description: City.
          country:
            example: AU
            type: string
            description: Country.
          unlocode:
            example: https://service.unece.org/trade/locode/au.htm#AUGOL
            type: string
            format: uri
            description: UN/LOCODE identifier.
      baseportUnloadingLocation:
        description: Port at which the cargo is discharged from the vessel.
        type: object
        properties:
          name:
            example: Port of Los Angeles
            type: string
            description: Location name.
          city:
            example: Los Angeles
            type: string
            description: City.
          country:
            example: US
            type: string
            description: Country.
          unlocode:
            example: https://service.unece.org/trade/locode/us.htm#USLAX
            type: string
            format: uri
            description: UN/LOCODE identifier.
      deliveryLocation:
        description: Location where the cargo is to be delivered to the consignee.
        type: object
        properties:
          name:
            example: Wave Rider Supplies Warehouse
            type: string
            description: Location name.
          street:
            example: 210 Ocean Road
            type: string
            description: Street address.
          city:
            example: Williamsburg
            type: string
            description: City.
          state:
            example: VA
            type: string
            description: State.
          country:
            example: US
            type: string
            description: Country.
      actualArrivalDate:
        example: '2025-03-14T07:30:00Z'
        type: string
        format: date-time
        description: Actual date and time the vessel arrived at the unloading port.
      grossWeight:
        description: Total gross weight of the cargo to be released.
        type: object
        properties:
          amount:
            example: 520.0
            type: number
            format: float
            description: Weight amount.
          unit:
            example: KGS
            type: string
            description: Weight unit.
      shippingMarks:
        example: "SURFPRO/WRS/001-018"
        type: string
        description: Marks and numbers on the packages identifying the cargo to be released.
      conveyanceReferenceNumber:
        example: VOYAGE-2025-AU-001
        type: string
        description: Voyage number or other journey identifier of the carrying vessel.
      transportMeansIdentifier:
        example: PACIFIC VOYAGER
        type: string
        description: Name of the vessel carrying the cargo.
      vehicleRegistrationNumber:
        example: IMO9876543
        type: string
        description: IMO number or other registration identifier of the vessel.
      transportEquipmentIdentifier:
        example: POSU1234567
        type: string
        description: Identifier of the container or other transport equipment.
      sealIdentifier:
        example: SEAL123456
        type: string
        description: Identifier of the seal affixed to the transport equipment.
