{
  "$id": "https://raw.githubusercontent.com/api-evangelist/cargodocs/refs/heads/main/json-schema/cargodocs-bill-of-lading.json",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "CargoDocs Bill of Lading",
  "description": "An electronic bill of lading (eBoL) or sea waybill (SWB) managed through the CargoDocs platform, representing a document of title for shipped cargo.",
  "type": "object",
  "properties": {
    "documentId": {
      "type": "string",
      "description": "The unique identifier for the bill of lading document."
    },
    "documentType": {
      "type": "string",
      "description": "The type of bill of lading document.",
      "enum": [
        "eBoL",
        "SWB"
      ]
    },
    "transactionId": {
      "type": "string",
      "description": "The unique identifier for the transaction this bill of lading belongs to."
    },
    "status": {
      "type": "string",
      "description": "The current status of the bill of lading (e.g., draft, issued, surrendered)."
    },
    "draftId": {
      "type": "string",
      "description": "The unique identifier for the draft version of this bill of lading."
    },
    "shipperDetails": {
      "type": "object",
      "description": "Details of the shipper named on the bill of lading."
    },
    "consigneeDetails": {
      "type": "object",
      "description": "Details of the consignee named on the bill of lading."
    },
    "cargoDetails": {
      "type": "object",
      "description": "Details of the cargo described on the bill of lading."
    },
    "issuedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the bill of lading was issued."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "The timestamp when the bill of lading was created."
    }
  },
  "required": [
    "documentId",
    "documentType",
    "transactionId",
    "status"
  ]
}
