{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/portbase/main/json-schema/portbase-container-list-item-schema.json",
  "title": "ContainerListItem",
  "description": "Container list item representation",
  "x-generated": "2026-10-18",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/portbase-hinterland-container-notification-openapi.yml#/components/schemas/ContainerListItem",
  "required": [
    "equipmentNumber",
    "full"
  ],
  "type": "object",
  "properties": {
    "equipmentNumber": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an..11 |\n|**Occurrence**| 1..1 |\n|**Format**| 'AAAA9999999' |\n|**Description**| Equipment number|\n"
    },
    "bookingOrderReference": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an..35 |\n|**Occurrence**| 1..1 |\n|**Description**| Release Order Reference (import) or Acceptance Order Reference (export) |\n"
    },
    "full": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Occurrence**| 1..1 |\n|**Description**| Indicator if the container is full or empty. True = full equipment, False = empty equipment |\n"
    },
    "loading": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Occurrence**| 1..1 |\n|**Description**| Loading or discharge. True = loading, False = discharge |\n"
    },
    "sizeType": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an4 |\n|**Occurrence**| 0..1 |\n|**Description**| ISO Size Type code, ie 22G1 |\n"
    },
    "notificationType": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| a1 |\n|**Occurrence**| 1..1 |\n|**Description**| Notification type |\n|**Possible values**| 'N' = Notification |\n ||'R' = Status Request |\n||'B' = booking (status request without visit)|\n||'O' = No notification/request |\n",
      "enum": [
        "N, R, B, O,"
      ]
    },
    "equipmentUuid": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an..32 |\n|**Occurrence**| 1..1 |\n|**Description**| Universal Unique Identifier for the equipment as generated by the PCS |\n"
    },
    "notificationStatus": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an..50 |\n|**Occurrence**| 1..1 |\n|**Description**| EAN number of charter party that will execute the physical transport |\n|**Possible values**|'NEW' = Not Sent|\n||'DECLARED' = Sent|\n||'ACCEPTED' = Accepted by terminal|\n||'REJECTED' = Rejected by terminal|\n||'UPDATED' = Updated|\n||'CANCEL_SEND' = Cancelled|\n"
    },
    "isoDateMsgSent": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 0..1 |\n|**Format**| YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| date/time message sent to terminal, ISO datetime  |\n",
      "format": "date-time"
    },
    "rejectCode": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an..3 |\n|**Occurrence**| 0..1 |\n|**Description**| Terminal reject codes |\n"
    },
    "messageAcceptedOnce": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an..5 |\n|**Occurrence**| 0..1 |\n|**Description**| Message has been accepted by terminal: true= has been accepted at least one time, false= has never been accepted |\n"
    },
    "operatorShortname": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| an..35 |\n|**Occurrence**| 0..1 |\n|**Description**| Operator shortname |\n"
    },
    "dateCreated": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 1..1 |\n|**Format**| YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| date/time equipment created, ISO datetime  |\n",
      "format": "date-time"
    },
    "dateModified": {
      "type": [
        "string",
        "null"
      ],
      "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 1..1 |\n|**Format**| YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| date/time equipment modified, ISO datetime  |\n",
      "format": "date-time"
    },
    "visit": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/$defs/VisitListItem"
        }
      ]
    },
    "equipmentStatus": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/$defs/EquipmentStatusListItem"
        }
      ]
    },
    "handlingStatus": {
      "nullable": true,
      "allOf": [
        {
          "$ref": "#/$defs/HandlingStatusBase"
        }
      ]
    }
  },
  "$defs": {
    "EquipmentStatusListItem": {
      "type": "object",
      "properties": {
        "aggregatedStatus": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Container status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "O, N, U,"
          ]
        },
        "available": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Available status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS"
          ]
        },
        "bookingApproved": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Booking approved status (*deprecated*) |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS"
          ]
        },
        "bookingPresent": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Booking present status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS"
          ]
        },
        "commercialRelease": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Commercial release status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS"
          ]
        },
        "customsDocument": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Customs document status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS"
          ]
        },
        "sizeTypeApproved": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Size type approved status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS"
          ]
        },
        "customsRelease": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Blocked status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported, IB = Is Blocked, NB = Not Blocked |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS, IB, NB"
          ]
        },
        "cargoOpening": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an2 |\n|**Occurrence**| 1..1 |\n|**Description**| Cargo opening status |\n|**Possible values:**| U = Unknown, O = OK, N = Not OK, NA = Not Applicable, NS = Not Supported |\n",
          "enum": [
            "N",
            "O",
            "U",
            "NA",
            "NS",
            "IB",
            "NB",
            "U, O, N, NA, NS"
          ]
        }
      }
    },
    "HandlingStatusBase": {
      "type": "object",
      "properties": {
        "handlingTimeActual": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 0..1 |\n|**Format**| ISO datetime, YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| Actual handling (loading or discharge) date/time |\n",
          "format": "date-time"
        }
      },
      "description": "Equipment handling status representation"
    },
    "VisitListItem": {
      "type": "object",
      "properties": {
        "visitId": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an..12 |\n|**Occurrence**| 0..1 |\n|**Description**| Barge Call ID, Terminal Voyage Number (treknumber) or TAR (Truck Appointment Reference) |\n"
        },
        "visitUuid": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an..32 |\n|**Occurrence**| 1..1 |\n|**Description**| Universal Unique Identifier for the visit as generated by the PCS |\n"
        },
        "modality": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| n1 |\n|**Occurrence**| 1..1 |\n|**Description**| Modality |\n|**Possible values:**| 2 = Rail, 3 = Road, 8 = Barge |\n",
          "enum": [
            "2,3,8"
          ]
        },
        "handlingTimeActual": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 0..1 |\n|**Format**| YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| Actual handling (loading or discharge) date/time , ISO datetime  |\n",
          "format": "date-time"
        },
        "timeSlotStartDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 0..1 |\n|**Format**| YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| Timeslot end date/time as issued by the terminal, ISO datetime  |\n",
          "format": "date-time"
        },
        "timeSlotEndDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 0..1 |\n|**Format**| YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| Timeslot start date/time as issued by the terminal, ISO datetime  |\n",
          "format": "date-time"
        },
        "truckLicenseId": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an..17 |\n|**Occurrence**| 0..1 |\n|**Description**| Truck license ID |\n"
        },
        "expectedArrivalDateTime": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| datetime |\n|**Occurrence**| 0..1 |\n|**Format**| YYYY-MM-DDThh:mm:ss+TZD |\n|**Description**| Expected arrival date/time (ETA), ISO datetime  |\n",
          "format": "date-time"
        },
        "terminalDisplayName": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an..200 |\n|**Occurrence**| 1..1 |\n|**Description**| Terminal display name |\n"
        },
        "terminalShortName": {
          "type": [
            "string",
            "null"
          ],
          "description": "| | |\n|----|----|\n|**Length**| an..35 |\n|**Occurrence**| 0..1 |\n|**Description**| Terminal short name |\n"
        }
      },
      "description": "Container list item representation"
    }
  }
}