{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://unvtd.unece.org/insurance-certificate-schema.json",
  "title": "Insurance Certificate",
  "description": "A document certifying that insurance coverage has been effected for particular goods being shipped, detailing the risks covered, sum insured, and terms of coverage.",
  "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/insurance-certificate-context.jsonld"
      ]
    },
    "type": {
      "type": "array",
      "description": "Credential types.",
      "const": [
        "VerifiableCredential",
        "InsuranceCertificateCredential"
      ]
    },
    "name": {
      "type": "string",
      "description": "Human-readable name of the credential, for display.",
      "example": "Insurance Certificate"
    },
    "credentialSchema": {
      "type": "object",
      "description": "Reference to the credential schema for validation",
      "properties": {
        "id": {
          "type": "string",
          "format": "uri",
          "const": "https://unvtd.unece.org/insurance-certificate-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:ic-2025-pacific-001"
    },
    "validFrom": {
      "example": "2025-03-10:10:00",
      "type": "string",
      "format": "date-time",
      "description": "Credential validity start date"
    },
    "validUntil": {
      "example": "2026-03-10:10:00",
      "type": "string",
      "format": "date-time",
      "description": "Date until which this credential is valid."
    },
    "issuer": {
      "name": "Issuer",
      "description": "Identifier of the company issuing the insurance certificate (e.g., DID)",
      "type": "string",
      "format": "uri",
      "example": "did:web:pacificmarineinsurance.example.com"
    },
    "credentialSubject": {
      "name": "InsuranceCertificate",
      "description": "Insurance certificate details",
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the business document.",
          "const": "InsuranceCertificate"
        },
        "certificateNumber": {
          "example": "MIC-2025-AU-001234",
          "type": "string",
          "description": "Reference number to identify an insurance certificate."
        },
        "policyNumber": {
          "example": "POL-MAR-2025-456789",
          "type": "string",
          "description": "Reference number to identify an insurance policy."
        },
        "issueDate": {
          "example": "2025-03-10T00:00:00Z",
          "type": "string",
          "format": "date-time",
          "description": "Date that a document was issued."
        },
        "insuredParty": {
          "description": "Party which benefits from insurance coverage.",
          "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."
                }
              }
            }
          }
        },
        "insuranceCompany": {
          "description": "Details related to the company engaged in the business of insurance.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "Party",
              "enum": [
                "Party"
              ]
            },
            "id": {
              "example": "did:web:pacificmarineinsurance.example.com",
              "type": "string",
              "format": "uri",
              "description": "A unique party identifier."
            },
            "name": {
              "example": "Pacific Marine Insurance Co.",
              "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": "200 Insurance Plaza",
                  "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."
                }
              }
            }
          }
        },
        "insuranceClaimsAdjuster": {
          "description": "Name and address of the insurance claims adjuster.",
          "type": "object",
          "properties": {
            "name": {
              "example": "Marine Claims Services Pty Ltd",
              "type": "string",
              "description": "Adjuster name"
            },
            "streetAddress": {
              "example": "50 Claims Avenue",
              "type": "string",
              "description": "Street address"
            },
            "addressLocality": {
              "example": "Sydney",
              "type": "string",
              "description": "City"
            },
            "addressRegion": {
              "example": "NSW",
              "type": "string",
              "description": "State"
            },
            "postalCode": {
              "example": "2001",
              "type": "string",
              "description": "Postal code"
            },
            "addressCountry": {
              "example": "AU",
              "type": "string",
              "description": "Country"
            }
          }
        },
        "placeOfIssue": {
          "description": "Location where a document was issued.",
          "type": "object",
          "properties": {
            "addressLocality": {
              "example": "Sydney",
              "type": "string",
              "description": "City"
            },
            "addressRegion": {
              "example": "NSW",
              "type": "string",
              "description": "State"
            },
            "addressCountry": {
              "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."
        },
        "contractNumber": {
          "example": "CTR-2025-SURF-001",
          "type": "string",
          "description": "Identifier of a contract concluded between parties."
        },
        "documentaryCreditIdentifier": {
          "example": "LC-2025-001",
          "type": "string",
          "description": "Reference number to identify a documentary credit."
        },
        "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": "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."
                }
              }
            }
          }
        },
        "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."
                }
              }
            }
          }
        },
        "transportMeansIdentifier": {
          "example": "PACIFIC VOYAGER",
          "type": "string",
          "description": "Name of a specific means of transport such as the vessel name."
        },
        "transportMeansRegistration": {
          "example": "IMO9876543",
          "type": "string",
          "description": "Identifier of a specific means of transport."
        },
        "conveyanceReferenceNumber": {
          "example": "VOYAGE-2025-AU-001",
          "type": "string",
          "description": "Identifier of a journey of a means of transport."
        },
        "estimatedTimeOfDeparture": {
          "example": "2025-03-12T08:00:00Z",
          "type": "string",
          "format": "date-time",
          "description": "Date and time when a transport means is scheduled to depart."
        },
        "estimatedTimeOfArrival": {
          "example": "2025-03-13T14:00:00Z",
          "type": "string",
          "format": "date-time",
          "description": "Date and time of the estimated arrival of means of transport."
        },
        "originalLoadingLocation": {
          "description": "Seaport, airport, freight terminal, rail station or other location where the goods were first loaded onto the means of transport (UID:3099).",
          "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": "The place or port at which the cargo is discharged from the main vessel (UID:3356).",
          "type": "object",
          "properties": {
            "name": {
              "example": "Port of Sydney",
              "type": "string",
              "description": "Location name"
            },
            "addressLocality": {
              "example": "Sydney",
              "type": "string",
              "description": "City"
            },
            "addressRegion": {
              "example": "NSW",
              "type": "string",
              "description": "State"
            },
            "addressCountry": {
              "example": "AU",
              "type": "string",
              "description": "Country"
            },
            "unLocode": {
              "example": "https://service.unece.org/trade/locode/au.htm#AUSYD",
              "type": "string",
              "format": "uri",
              "description": "UN/LOCODE identifier"
            }
          }
        },
        "placeOfDeparture": {
          "description": "Port from which a means of transport is scheduled to depart.",
          "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"
            }
          }
        },
        "arrivalLocation": {
          "description": "Port at which a means of transport is scheduled to arrive.",
          "type": "object",
          "properties": {
            "name": {
              "example": "Port of Sydney",
              "type": "string",
              "description": "Location name"
            },
            "addressLocality": {
              "example": "Sydney",
              "type": "string",
              "description": "City"
            },
            "addressRegion": {
              "example": "NSW",
              "type": "string",
              "description": "State"
            },
            "addressCountry": {
              "example": "AU",
              "type": "string",
              "description": "Country"
            }
          }
        },
        "insuredValueAmount": {
          "description": "Total sum covered by insurance for a particular consignment.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "MonetaryAmount",
              "enum": [
                "MonetaryAmount"
              ]
            },
            "amount": {
              "example": 80575,
              "type": "number",
              "format": "float",
              "description": "Monetary amount (110% of goods value)"
            },
            "currency": {
              "example": "USD",
              "type": "string",
              "description": "Currency code"
            }
          }
        },
        "insuranceAmount": {
          "description": "Amount of premium payable to the insurance company.",
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "default": "MonetaryAmount",
              "enum": [
                "MonetaryAmount"
              ]
            },
            "amount": {
              "example": 805.75,
              "type": "number",
              "format": "float",
              "description": "Premium amount (1% of insured value)"
            },
            "currency": {
              "example": "USD",
              "type": "string",
              "description": "Currency code"
            }
          }
        },
        "insuranceConditions": {
          "example": "Institute Cargo Clauses (A) - All Risks coverage including loading, transit, and unloading",
          "type": "string",
          "description": "Reference to the general conditions of contract under which insurance is issued."
        },
        "goodsDescription": {
          "example": "Surfboards, fins and wetsuits for water sports retail - 175 items total",
          "type": "string",
          "description": "Plain language description of the nature of goods."
        },
        "riskObject": {
          "example": "Marine cargo - sporting goods",
          "type": "string",
          "description": "Free form description of the object sub-type of a risk."
        },
        "authentication": {
          "example": "This certificate is issued under and subject to the terms of the above mentioned policy",
          "type": "string",
          "description": "Proof that a document has been authenticated."
        }
      },
      "required": [
        "type",
        "certificateNumber",
        "policyNumber",
        "issueDate",
        "insuredParty",
        "insuranceCompany",
        "insuredValueAmount",
        "originalLoadingLocation",
        "baseportUnloadingLocation",
        "insuranceClaimsAdjuster",
        "invoiceNumber",
        "estimatedTimeOfDeparture",
        "placeOfDeparture",
        "insuranceConditions",
        "goodsDescription"
      ],
      "additionalProperties": true
    }
  },
  "additionalProperties": true
}
