"$schema": https://json-schema.org/draft/2020-12/schema
title: Customs Bond
description: A financial guarantee issued by a surety company on behalf of an importer, assuring customs authorities that applicable duties, taxes, and fees will be paid and applicable regulations will be complied with.
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/customs-bond-context.json"
  type:
    type: array
    description: 'Credential types'
    items:
      type: string
      enum:
        - VerifiableCredential
        - CustomsBond
    minItems: 2
    maxItems: 2
    example:
      - VerifiableCredential
      - CustomsBond
  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/customs-bond-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:cb-2025-us-001234"
  validFrom:
    example: 2025-03-14T00:00:00Z
    type: string
    format: date-time
    description: 'Credential validity start date'
  validTo:
    example: 2026-03-14T00:00:00Z
    type: string
    format: date-time
    description: 'Credential validity end date'
  issuer:
    description: 'Identifier of the surety company issuing the customs bond (e.g., DID)'
    type: string
    format: uri
    example: did:web:globaltradesuretycorp.example.com
  credentialSubject:
    name: CustomsBond
    description: 'Customs bond details'
    type: object
    required:
      - importer
      - insuranceCompany
      - deliveryLocation
      - despatchLocation
      - exportationCountry
      - customsValue
      - statisticalValue
    properties:
      importer:
        description: Party importing the goods and principal obligor under the customs bond.
        type: object
        properties:
          type:
            type: string
            default: Importer
            enum:
            - Importer
          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.
      insuranceCompany:
        description: Surety company guaranteeing the importer's obligations to customs authorities.
        type: object
        properties:
          type:
            type: string
            default: InsuranceCompany
            enum:
            - InsuranceCompany
          id:
            example: did:web:globaltradesuretycorp.example.com
            type: string
            format: uri
            description: A unique party identifier.
          name:
            example: Global Trade Surety Corp
            type: string
            description: Trade party name.
          street:
            example: 100 Financial Plaza
            type: string
            description: The street component of the address.
          city:
            example: New York
            type: string
            description: The city component of the address.
          state:
            example: NY
            type: string
            description: The state component of the address.
          zip:
            example: 10004
            type: number
            description: Postal code.
          country:
            example: US
            type: string
            description: Country.
      deliveryLocation:
        description: Port of entry or customs office where the goods arrive and the bond is applied.
        type: object
        properties:
          name:
            example: Port of Los Angeles
            type: string
            description: Location name.
          city:
            example: Los Angeles
            type: string
            description: City.
          state:
            example: CA
            type: string
            description: State.
          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.
      despatchLocation:
        description: Country or place from which the goods are despatched for export.
        type: object
        properties:
          city:
            example: Gold Coast
            type: string
            description: City.
          country:
            example: AU
            type: string
            description: Country.
      exportationCountry:
        example: AU
        type: string
        description: Country from which the goods are exported.
      customsValue:
        description: Declared value of the goods for customs duty assessment purposes.
        type: object
        properties:
          amount:
            example: 45000.00
            type: number
            format: float
            description: Monetary amount.
          currency:
            example: USD
            type: string
            minLength: 3
            maxLength: 3
            description: ISO 4217 three-letter currency code.
      statisticalValue:
        description: Value of the goods for trade statistics reporting purposes.
        type: object
        properties:
          amount:
            example: 45000.00
            type: number
            format: float
            description: Monetary amount.
          currency:
            example: USD
            type: string
            minLength: 3
            maxLength: 3
            description: ISO 4217 three-letter currency code.
