{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://unvtd.unece.org/sea-waybill-schema.json",
  "title": "Sea Waybill",
  "description": "A non-negotiable sea transport document issued by a carrier acknowledging receipt of cargo and evidencing the contract of sea carriage, used when a negotiable bill of lading is not required.",
  "type": "object",
  "required": [
    "@context",
    "type",
    "issuer",
    "credentialSubject",
    "credentialSchema"
  ],
  "properties": {
    "@context": {
      "type": "array",
      "description": "JSON-LD contexts: the W3C Verifiable Credentials v2 context, followed by this document's context.",
      "const": [
        "https://www.w3.org/ns/credentials/v2",
        "https://unvtd.unece.org/sea-waybill-context.jsonld"
      ]
    },
    "type": {
      "type": "array",
      "description": "Credential types.",
      "const": [
        "VerifiableCredential",
        "SeaWaybillCredential"
      ]
    },
    "name": {
      "type": "string",
      "description": "Human-readable name of the credential, for display.",
      "example": "Sea Waybill"
    },
    "credentialSchema": {
      "type": "object",
      "description": "Reference to the credential schema for validation",
      "properties": {
        "id": {
          "type": "string",
          "format": "uri",
          "const": "https://unvtd.unece.org/sea-waybill-schema.json",
          "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:sw-2025-au-001234"
    },
    "validFrom": {
      "example": "2025-03-11T00:00:00.000Z",
      "type": "string",
      "format": "date-time",
      "description": "Credential validity start date"
    },
    "validUntil": {
      "example": "2026-03-11T00:00:00.000Z",
      "type": "string",
      "format": "date-time",
      "description": "Date until which this credential is valid."
    },
    "issuer": {
      "description": "Identifier of the carrier issuing the sea waybill (e.g., DID)",
      "type": "string",
      "format": "uri",
      "example": "did:web:pacificshipping.example.com"
    },
    "credentialSubject": {
      "name": "SeaWaybill",
      "description": "Sea waybill details",
      "type": "object",
      "required": [
        "type",
        "seaWaybillNumber",
        "freightForwarderReferenceNumber",
        "carrier",
        "consignor",
        "consignee",
        "notifyParty",
        "originalLoadingLocation",
        "baseportUnloadingLocation",
        "deliveryLocation",
        "paymentLocation",
        "grossWeight",
        "volume",
        "descriptionOfGoods",
        "numberOfPackages",
        "shippingMarks",
        "modeOfTransport",
        "containerSizeAndType",
        "fullOrEmptyContainer",
        "transportMeansIdentifier",
        "transportEquipmentIdentifier"
      ],
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the business document.",
          "const": "SeaWaybill"
        },
        "seaWaybillNumber": {
          "example": "SW-2025-AU-001234",
          "type": "string",
          "description": "Reference number of the sea waybill issued by the carrier."
        },
        "bookingReferenceNumber": {
          "example": "BKG123456789",
          "type": "string",
          "description": "Reference number assigned by a carrier to identify a specific consignment booking."
        },
        "contractNumber": {
          "example": "CTR-2025-SURF-001",
          "type": "string",
          "description": "Identifier of a contract concluded between parties."
        },
        "freightForwarderReferenceNumber": {
          "example": "GFS-2025-001234",
          "type": "string",
          "description": "Reference number assigned by the freight forwarder to identify a consignment."
        },
        "consignor": {
          "description": "Party consigning goods as stipulated in the transport contract.",
          "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."
                }
              }
            }
          }
        },
        "consignee": {
          "description": "Party to which goods are consigned.",
          "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": "VA",
                  "type": "string",
                  "description": "The state component of the address."
                },
                "postalCode": {
                  "example": "23185",
                  "type": "string",
                  "description": "Postal code."
                },
                "addressCountry": {
                  "example": "US",
                  "type": "string",
                  "description": "Country."
                }
              }
            }
          }
        },
        "notifyParty": {
          "description": "Party to be notified of the cargo's arrival.",
          "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"
                  ]
                },
                "addressCountry": {
                  "example": "US",
                  "type": "string",
                  "description": "Country."
                }
              }
            }
          }
        },
        "carrier": {
          "description": "Party providing the ocean transport of goods.",
          "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"
                  ]
                },
                "addressCountry": {
                  "example": "AU",
                  "type": "string",
                  "description": "Country."
                }
              }
            }
          }
        },
        "originalLoadingLocation": {
          "description": "Port at which the cargo is first loaded onto the vessel.",
          "type": "object",
          "properties": {
            "name": {
              "example": "Port of Gold Coast",
              "type": "string",
              "description": "Location name."
            },
            "addressLocality": {
              "example": "Gold Coast",
              "type": "string",
              "description": "City."
            },
            "addressRegion": {
              "example": "QLD",
              "type": "string",
              "description": "State."
            },
            "addressCountry": {
              "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."
            },
            "addressLocality": {
              "example": "Los Angeles",
              "type": "string",
              "description": "City."
            },
            "addressCountry": {
              "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 to which the consignment is to be delivered to the consignee.",
          "type": "object",
          "properties": {
            "name": {
              "example": "Wave Rider Supplies Warehouse",
              "type": "string",
              "description": "Location name."
            },
            "streetAddress": {
              "example": "210 Ocean Road",
              "type": "string",
              "description": "Street address."
            },
            "addressLocality": {
              "example": "Williamsburg",
              "type": "string",
              "description": "City."
            },
            "addressRegion": {
              "example": "VA",
              "type": "string",
              "description": "State."
            },
            "addressCountry": {
              "example": "US",
              "type": "string",
              "description": "Country."
            }
          }
        },
        "paymentLocation": {
          "description": "Place where freight charges have been or are to be paid.",
          "type": "object",
          "properties": {
            "addressLocality": {
              "example": "Gold Coast",
              "type": "string",
              "description": "City."
            },
            "addressRegion": {
              "example": "QLD",
              "type": "string",
              "description": "State."
            },
            "addressCountry": {
              "example": "AU",
              "type": "string",
              "description": "Country."
            }
          }
        },
        "tradeTermsConditionsDescription": {
          "example": "Free On Board",
          "type": "string",
          "description": "Plain language description of the trade terms applicable to the consignment."
        },
        "tradeTermsConditionsCode": {
          "example": "FOB",
          "type": "string",
          "description": "Code specifying the trade terms (Incoterms) applicable to the consignment."
        },
        "grossWeight": {
          "description": "Total gross weight of the consignment including packaging.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "Quantity",
              "enum": [
                "Quantity"
              ]
            },
            "amount": {
              "example": 520,
              "type": "number",
              "format": "float",
              "description": "Weight amount."
            },
            "unit": {
              "example": "KGS",
              "type": "string",
              "description": "Weight unit."
            }
          }
        },
        "transportTemperature": {
          "description": "Required temperature range for transport of temperature-sensitive goods.",
          "type": "object",
          "properties": {
            "minimum": {
              "example": 2,
              "type": "number",
              "format": "float",
              "description": "Minimum temperature."
            },
            "maximum": {
              "example": 8,
              "type": "number",
              "format": "float",
              "description": "Maximum temperature."
            },
            "unit": {
              "example": "CEL",
              "type": "string",
              "description": "Temperature unit code."
            }
          }
        },
        "volume": {
          "description": "Total volume of the consignment.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "Quantity",
              "enum": [
                "Quantity"
              ]
            },
            "amount": {
              "example": 8.5,
              "type": "number",
              "format": "float",
              "description": "Volume amount."
            },
            "unit": {
              "example": "CBM",
              "type": "string",
              "description": "Volume unit."
            }
          }
        },
        "descriptionOfGoods": {
          "example": "Surfboards, fins and wetsuits for water sports retail",
          "type": "string",
          "description": "Plain language description of the nature of the goods."
        },
        "numberOfPackages": {
          "example": 18,
          "type": "number",
          "description": "Number of packages in the consignment."
        },
        "shippingMarks": {
          "example": "SURFPRO/WRS/001-018",
          "type": "string",
          "description": "Marks and numbers on transport units or packages."
        },
        "hsCode": {
          "example": "950630",
          "type": "string",
          "description": "Harmonized System code specifying the type of goods for customs purposes."
        },
        "modeOfTransport": {
          "example": "1",
          "type": "string",
          "description": "Code specifying the mode of transport (1 = maritime transport)."
        },
        "containerSizeAndType": {
          "example": "22G1",
          "type": "string",
          "description": "Code specifying the size and type of transport equipment."
        },
        "fullOrEmptyContainer": {
          "example": "5",
          "type": "string",
          "description": "Code specifying how full the transport equipment is (5 = Full)."
        },
        "transportMeansIdentifier": {
          "example": "PACIFIC VOYAGER",
          "type": "string",
          "description": "Name of the vessel."
        },
        "vehicleRegistrationNumber": {
          "example": "IMO9876543",
          "type": "string",
          "description": "IMO number or other registration identifier of the vessel."
        },
        "transportEquipmentIdentifier": {
          "example": "POSU1234567",
          "type": "string",
          "description": "Identifier of the transport equipment (e.g., container number)."
        }
      },
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
