{
    "openapi": "3.0.1",
    "info": {
        "title": "BIC Global Container Database",
        "description": "The BIC Boxtech Global Container Database contains technical attributes of shipping containers for use in applications and automation",
        "termsOfService": "https://www.bic-code.org/api-terms-of-use/",
        "version": "2.0.3",
        "contact": {
            "name": "BIC API Support",
            "email": "bic@bic-code.org",
            "url": "https://www.bic-boxtech.org"
        }
    },
    "externalDocs": {
        "description": "Boxtech Documentation",
        "url": "https://github.com/bic-org/Boxtech"
    },
    "servers": [
        {
            "url": "https://app.bic-boxtech.org/api/v2.0"
        },
        {
            "url": "https://uat.bic-boxtech.org/api/v2.0"
        }
    ],
    "paths": {
        "/oauth/token": {
            "post": {
                "summary": "Collect a token for authentication",
                "tags": [
                    "Authentication"
                ],
                "security": [
                    {
                        "BasicAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "accessToken": {
                                            "description": "A JWT used for Authorization",
                                            "type": "string",
                                            "example": "eyJhbGciOiJIUzI1Ni"
                                        },
                                        "access_token": {
                                            "description": "A JWT used for Authorization",
                                            "type": "string",
                                            "example": "eyJhbGciOiJIUzI1Ni"
                                        },
                                        "accessTokenExpiresAt": {
                                            "description": "UTC datetime for token expiry",
                                            "type": "string",
                                            "example": "2023-08-01T10:15:02.847559+00:00"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "description": "Plain text explanation of issue",
                                            "type": "string",
                                            "example": "Invalid Authorization Header: Authorization Header Missing"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        },
        "/codes/{bicCode}": {
            "get": {
                "summary": "Identify who owns a given BIC Code",
                "parameters": [
                    {
                        "name": "bicCode",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BICU"
                    }
                ],
                "tags": [
                    "BIC Code"
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "BIC Code Holder Detail",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/BICHolder"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "BIC Holder not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/container": {
            "post": {
                "summary": "Add container to your fleet",
                "tags": [
                    "Container"
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "description": "Array of Container Objects not exceeding 250",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "array",
                                "items": {
                                    "$ref": "#/components/schemas/FleetIn"
                                }
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Container operation result success",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "description": "Overall status of the request, can be 'success' or 'failed'",
                                            "enum": [
                                                "success"
                                            ]
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "General message for the status"
                                        },
                                        "upload_results": {
                                            "type": "array",
                                            "description": "List of individual container upload results",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "container_number": {
                                                        "type": "string",
                                                        "description": "Full Provided Container Number"
                                                    },
                                                    "upload": {
                                                        "type": "string",
                                                        "description": "Status of this container, can be 'success' or 'failed'",
                                                        "enum": [
                                                            "success"
                                                        ]
                                                    },
                                                    "message": {
                                                        "type": "string",
                                                        "description": "Message explaining the container status"
                                                    }
                                                },
                                                "required": [
                                                    "container_number",
                                                    "status",
                                                    "upload"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "message",
                                        "upload_results"
                                    ]
                                }
                            }
                        }
                    },
                    "207": {
                        "description": "Container operation result that has partial or full failure",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "status": {
                                            "type": "string",
                                            "description": "Overall status of the request, can be 'success' or 'failed'",
                                            "enum": [
                                                "success",
                                                "failed"
                                            ]
                                        },
                                        "message": {
                                            "type": "string",
                                            "description": "General message for the status"
                                        },
                                        "upload_results": {
                                            "type": "array",
                                            "description": "List of individual container upload results",
                                            "items": {
                                                "type": "object",
                                                "properties": {
                                                    "container_number": {
                                                        "type": "string",
                                                        "description": "Full Provided Container Number"
                                                    },
                                                    "upload": {
                                                        "type": "string",
                                                        "description": "Status of this container, can be 'success' or 'failed'",
                                                        "enum": [
                                                            "success",
                                                            "failed"
                                                        ]
                                                    },
                                                    "message": {
                                                        "type": "string",
                                                        "description": "Message explaining the container status"
                                                    }
                                                },
                                                "required": [
                                                    "container_number",
                                                    "upload",
                                                    "message"
                                                ]
                                            }
                                        }
                                    },
                                    "required": [
                                        "status",
                                        "message",
                                        "upload_results"
                                    ],
                                    "example": {
                                        "status": "failed",
                                        "message": "Partial failure during container operation",
                                        "upload_results": [
                                            {
                                                "container_number": "BICU1234565",
                                                "upload": "success",
                                                "message": "Container uploaded successfully"
                                            },
                                            {
                                                "container_number": "BICU1234561",
                                                "upload": "failed",
                                                "message": "Invalid Container Number"
                                            }
                                        ]
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions to Post Container",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/container/{containerNumber}": {
            "get": {
                "summary": "Get the technical details for a given container",
                "tags": [
                    "Container"
                ],
                "parameters": [
                    {
                        "name": "containerNumber",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BICU1234565"
                    }
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Container Technical Details",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/Container"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "404": {
                        "description": "Container not found",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            },
            "delete": {
                "summary": "Remove container from your fleet",
                "tags": [
                    "Container"
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "containerNumber",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BICU1234565"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Container Removed from Fleet"
                    },
                    "400": {
                        "description": "Invalid Input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/tare_kg/{containerNumber}": {
            "get": {
                "summary": "Get just the Tare Weight of a container",
                "tags": [
                    "Container"
                ],
                "parameters": [
                    {
                        "name": "containerNumber",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BICU1234565"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "A User object",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "number",
                                    "format": "double",
                                    "example": 3660
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                },
                "security": [
                    {
                        "BearerAuth": []
                    }
                ]
            }
        },
        "/max_gross_mass_kgs/{containerNumber}": {
            "get": {
                "summary": "Get just the Max Gross Weight of a container",
                "tags": [
                    "Container"
                ],
                "parameters": [
                    {
                        "name": "containerNumber",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BICU1234565"
                    }
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Container Technical Detail",
                        "content": {
                            "text/plain": {
                                "schema": {
                                    "type": "number",
                                    "format": "double",
                                    "example": 30480
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Input",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/iso/size_type_code/{sizeTypeCode}": {
            "get": {
                "summary": "Identify an ISO Size or Group Type Code",
                "parameters": [
                    {
                        "name": "sizeTypeCode",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "45G1"
                    }
                ],
                "tags": [
                    "ISO Codes"
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "ISO Size Type Code Detail",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/SizeTypeCode"
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Size Type Code",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/alert": {
            "post": {
                "summary": "Set an alert against the container",
                "tags": [
                    "Alert"
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "requestBody": {
                    "description": "Alert Type",
                    "required": true,
                    "content": {
                        "application/json": {
                            "schema": {
                                "allOf": [
                                    {
                                        "$ref": "#/components/schemas/Alert"
                                    },
                                    {
                                        "type": "object",
                                        "properties": {
                                            "container_number": {
                                                "type": "string",
                                                "example": "BICU1234565",
                                                "description": "Full Container Number"
                                            }
                                        },
                                        "required": [
                                            "container_number"
                                        ]
                                    }
                                ]
                            }
                        }
                    }
                },
                "responses": {
                    "200": {
                        "description": "Successful Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "description": "Success response message",
                                            "type": "string",
                                            "example": "Alert Added"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/alert/{containerNumber}/{alertType}": {
            "delete": {
                "summary": "Remove alert from a container in your fleet",
                "tags": [
                    "Alert"
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "parameters": [
                    {
                        "name": "containerNumber",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string"
                        },
                        "example": "BICU1234565"
                    },
                    {
                        "name": "alertType",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "$ref": "#/components/schemas/AlertType"
                        },
                        "example": "SOLD"
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "object",
                                    "properties": {
                                        "message": {
                                            "description": "Success response message",
                                            "type": "string",
                                            "example": "Alert Deactivated"
                                        }
                                    }
                                }
                            }
                        }
                    },
                    "400": {
                        "description": "Invalid Request",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/uploads": {
            "get": {
                "summary": "Collect all uploaded files",
                "description": "Endpoint to retrieve a list of all uploaded files.",
                "tags": [
                    "File Upload"
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successfully retrieved the list of uploaded CSV files",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "type": "array",
                                    "items": {
                                        "$ref": "#/components/schemas/Upload"
                                    }
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        },
        "/uploads/{uploadId}": {
            "get": {
                "summary": "Collect Pre-signed Url for Upload",
                "tags": [
                    "File Upload"
                ],
                "parameters": [
                    {
                        "name": "uploadId",
                        "in": "path",
                        "required": true,
                        "schema": {
                            "type": "string",
                            "format": "uuid"
                        },
                        "example": "0a7a75dd-9107-431f-a7e1-10041081d010"
                    },
                    {
                        "name": "fileType",
                        "in": "query",
                        "required": false,
                        "schema": {
                            "type": "string",
                            "enum": [
                                "FAILED",
                                "ORIGINAL"
                            ]
                        }
                    }
                ],
                "security": [
                    {
                        "BearerAuth": []
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Pre-signed Url for Upload",
                        "content": {
                            "application/json": {
                                "example": {
                                    "upload": "https://bucket.s3.amazonaws.com/myfile.csv?AWSAccessKeyId=AKIAIOSFODNN7EXAMPLE&Expires=1611614567&Signature=0fca6614f8b72b821ebfd8e72d7a4b4ce5bfb948d9298f4e515d54bcdf5a5f75"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Insufficient Permissions",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    },
                    "500": {
                        "description": "Internal Server Error",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ErrorResponse"
                                }
                            }
                        }
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "Upload": {
                "type": "object",
                "properties": {
                    "uploadId": {
                        "type": "string",
                        "format": "uuid",
                        "example": "0a7a75dd-9107-431f-a7e1-10041081d010"
                    },
                    "uploaderName": {
                        "type": "string",
                        "example": "David"
                    },
                    "uploadAction": {
                        "type": "string",
                        "enum": [
                            "FLEET_IN",
                            "FLEET_IN_API",
                            "OFF_HIRE",
                            "SMART_CONTAINER_ONLY"
                        ]
                    },
                    "uploadDatetime": {
                        "type": "string",
                        "format": "date-time",
                        "example": "2023-05-28T14:30:00Z"
                    },
                    "uploadError": {
                        "type": "integer",
                        "format": "int32",
                        "example": 0
                    },
                    "uploadInserted": {
                        "type": "integer",
                        "format": "int32",
                        "example": 100
                    },
                    "uploadStatus": {
                        "type": "string",
                        "enum": [
                            "failed",
                            "success"
                        ]
                    }
                }
            },
            "BICHolder": {
                "type": "object",
                "properties": {
                    "code": {
                        "type": "string",
                        "minLength": 4,
                        "maxLength": 4,
                        "example": "BICU",
                        "description": "BIC Code"
                    },
                    "name": {
                        "type": "string",
                        "description": "Name of the BIC Code Holder",
                        "example": "Bureau International des Containers"
                    },
                    "address": {
                        "type": "object",
                        "properties": {
                            "country": {
                                "type": "string",
                                "description": "Country of the BIC Code Holder",
                                "example": "France"
                            }
                        }
                    }
                }
            },
            "SizeTypeCode": {
                "description": "The ISO Size Type Code under ISO6346",
                "type": "object",
                "properties": {
                    "detail_st": {
                        "type": "string",
                        "description": "The ISO size type code under ISO6346",
                        "example": "45G1",
                        "nullable": true
                    },
                    "group_st": {
                        "type": "string",
                        "description": "The ISO type group code under ISO6346, a group of detail_st can be under a single group_st code",
                        "example": "45GP"
                    },
                    "dimensions": {
                        "type": "object",
                        "properties": {
                            "length_mm": {
                                "type": "string",
                                "description": "Exact value or expected range of the Length of the container in millimetres",
                                "example": "2991"
                            },
                            "length_ft": {
                                "type": "string",
                                "description": "Exact value or expected range of the Length of the container in feet",
                                "example": "10"
                            },
                            "height_mm": {
                                "type": "string",
                                "description": "Exact value or expected range of the Height of the container in millimetres",
                                "example": "9.6"
                            },
                            "height_ft": {
                                "type": "string",
                                "description": "Exact value or expected range of the Height of the container in feet",
                                "example": "2896"
                            },
                            "width_mm": {
                                "type": "string",
                                "description": "Exact value or expected range of the Width of the container in millimetres",
                                "example": "2438"
                            },
                            "width_ft": {
                                "type": "string",
                                "description": "Exact value or expected range of the width of the container in feet",
                                "example": "8"
                            }
                        }
                    },
                    "description": {
                        "type": "string",
                        "description": "Container type description",
                        "example": "General purpose container without ventilation"
                    },
                    "main_characteristics": {
                        "type": "string",
                        "description": "Main characteristics of the container",
                        "example": "General purpose container without ventilation: Passive vents at upper part of cargo space"
                    }
                }
            },
            "Address": {
                "type": "object",
                "properties": {
                    "street": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 70,
                        "example": "41, Rue R\u00e9aumur"
                    },
                    "city": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 35,
                        "example": "Paris"
                    },
                    "postCode": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 9,
                        "example": "75003"
                    },
                    "country": {
                        "type": "string",
                        "example": "France"
                    },
                    "countryCode": {
                        "type": "string",
                        "minLength": 2,
                        "maxLength": 2,
                        "example": "FR"
                    }
                },
                "required": [
                    "street",
                    "city",
                    "postCode",
                    "country"
                ]
            },
            "Alert": {
                "type": "object",
                "required": [
                    "type"
                ],
                "properties": {
                    "type": {
                        "$ref": "#/components/schemas/AlertType"
                    },
                    "message": {
                        "type": "string",
                        "description": "Message containing details provided by person setting the alert "
                    }
                }
            },
            "AlertType": {
                "type": "string",
                "enum": [
                    "SOLD",
                    "SCRAPPED",
                    "LOST",
                    "STOLEN"
                ],
                "description": "List of alert types available in Boxtech"
            },
            "Container": {
                "type": "object",
                "properties": {
                    "one_door_off_racking_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 10000
                    },
                    "external_width_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 7.9987
                    },
                    "one_door_off_racking_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 25000
                    },
                    "internal_length_mm": {
                        "type": "number",
                        "example": 12057
                    },
                    "prefix": {
                        "maxLength": 3,
                        "minLength": 3,
                        "type": "string",
                        "description": "Also known as the Owner prefix or the BIC Code"
                    },
                    "cubic_capacity_cuft": {
                        "type": "number",
                        "format": "double",
                        "example": 2386
                    },
                    "stacking_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 430000
                    },
                    "door_opening_width_mm": {
                        "type": "number",
                        "example": 2338
                    },
                    "one_door_off_end_wall_strength_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 5645
                    },
                    "group_st": {
                        "maxLength": 4,
                        "minLength": 4,
                        "type": "string",
                        "description": "The ISO type group code under ISO6346, a group of detail_st can be under a single group_st code",
                        "example": "40GP"
                    },
                    "racking_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 40000
                    },
                    "manufacture_date": {
                        "type": "string",
                        "format": "date",
                        "example": "2022-12-20"
                    },
                    "max_gross_mass_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 71650
                    },
                    "one_door_off_stacking_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 140000
                    },
                    "bic_code": {
                        "maxLength": 4,
                        "minLength": 4,
                        "type": "string",
                        "description": "The BIC Code used to identify the party operating the container",
                        "example": "BICU"
                    },
                    "customs_approval_type": {
                        "type": "string",
                        "example": "GB-L/749/2/7/22"
                    },
                    "racking_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 15290
                    },
                    "equipment_identifier": {
                        "maxLength": 1,
                        "minLength": 1,
                        "type": "string",
                        "description": "The identifier for the type of equipment under ISO6346",
                        "enum": [
                            "U",
                            "J",
                            "Z"
                        ]
                    },
                    "timber_treatment_approval": {
                        "type": "string",
                        "example": "IM/TAILILEUM 400/2020"
                    },
                    "max_payload_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 28840
                    },
                    "internal_width_mm": {
                        "type": "number",
                        "example": 2444
                    },
                    "container_number": {
                        "maxLength": 11,
                        "minLength": 11,
                        "type": "string",
                        "description": "The container number for the unit, a combination of the prefix, equipment_identifier, serial_number and check_digit",
                        "example": "BICU1234565"
                    },
                    "one_door_off_end_wall_strength_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 35000
                    },
                    "internal_height_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 7.8262
                    },
                    "racking_n": {
                        "type": "number",
                        "format": "double",
                        "example": 60000
                    },
                    "external_length_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 40
                    },
                    "max_payload_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 63580
                    },
                    "one_door_off_racking_n": {
                        "type": "number",
                        "format": "double",
                        "example": 60000
                    },
                    "cubic_capacity_cbm": {
                        "type": "number",
                        "format": "double",
                        "example": 67.6
                    },
                    "external_length_mm": {
                        "type": "number",
                        "example": 12192
                    },
                    "one_door_off_stacking_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 72000
                    },
                    "stacking_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 216000
                    },
                    "external_height_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 8.5007
                    },
                    "manufacturer": {
                        "type": "string",
                        "description": "The name of the manufacturer",
                        "example": "ABC Container Factory Co"
                    },
                    "check_digit": {
                        "type": "string",
                        "description": "The Check Digit for the container used to verify the number is valid",
                        "example": "1"
                    },
                    "current_operator": {
                        "type": "string",
                        "description": "The last known current operator of the container to Boxtech",
                        "example": "SHIPPING LLC"
                    },
                    "tare_kg": {
                        "type": "number",
                        "description": "The Tare weight of the container, typically used in VGM calculations",
                        "format": "double",
                        "example": 3660
                    },
                    "tare_lbs": {
                        "type": "number",
                        "format": "double",
                        "example": 8070
                    },
                    "internal_length_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 39.5311
                    },
                    "door_opening_height_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 7.4754
                    },
                    "customs_approval": {
                        "type": "string",
                        "example": "GB-L/749/2/7/22"
                    },
                    "door_opening_width_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 7.8689
                    },
                    "internal_width_ft": {
                        "type": "number",
                        "format": "double",
                        "example": 8.0131
                    },
                    "internal_height_mm": {
                        "type": "number",
                        "example": 2696
                    },
                    "serial_number": {
                        "type": "string",
                        "description": "The Serial number of the container, left to the owners option",
                        "example": "123456"
                    },
                    "detail_st": {
                        "maxLength": 4,
                        "minLength": 4,
                        "type": "string",
                        "description": "The ISO size type code under ISO6346",
                        "example": "45G1"
                    },
                    "max_gross_mass_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 32500
                    },
                    "csc_approval": {
                        "type": "string",
                        "example": "F/BV/15018/22"
                    },
                    "door_opening_height_mm": {
                        "type": "number",
                        "example": 2796
                    },
                    "external_width_mm": {
                        "type": "number",
                        "example": 2438
                    },
                    "manufacture_number": {
                        "type": "string",
                        "description": "The identifying number of the manufacturer",
                        "example": "NBA109026005"
                    },
                    "external_height_mm": {
                        "type": "number",
                        "example": 2896
                    },
                    "alerts": {
                        "$ref": "#/components/schemas/Alert"
                    },
                    "certificate_expired": {
                        "type": "boolean",
                        "description": "Indicates if the certificate has expired. [Permissions Required: CertificateViewer]",
                        "example": false
                    },
                    "inspection_date": {
                        "type": "string",
                        "description": "Date container has been inspected. [Permissions Required: CertificateViewer]",
                        "format": "date",
                        "example": "2022-12-20"
                    },
                    "next_inspection_date": {
                        "type": "string",
                        "description": "Date that the container should be inspected next. [Permissions Required: CertificateViewer]",
                        "format": "date",
                        "example": "2023-12"
                    },
                    "certificate_details_match": {
                        "type": "boolean",
                        "description": "Indicates if the certificate details match the container details. [Permissions Required: CertificateViewer]",
                        "example": true
                    }
                }
            },
            "FleetIn": {
                "type": "object",
                "required": [
                    "container_number",
                    "cubic_capacity_cbm",
                    "detail_st",
                    "max_gross_mass_kg",
                    "max_payload_kg",
                    "tare_kg"
                ],
                "properties": {
                    "container_number": {
                        "maxLength": 11,
                        "minLength": 11,
                        "type": "string",
                        "description": "The container number for the unit, a combination of the prefix, equipment_identifier, serial_number and check_digit",
                        "example": "BICU1234565"
                    },
                    "cubic_capacity_cbm": {
                        "type": "number",
                        "format": "double",
                        "example": 67.6
                    },
                    "detail_st": {
                        "maxLength": 4,
                        "minLength": 4,
                        "type": "string",
                        "description": "The ISO size type code under ISO6346",
                        "example": "45G1"
                    },
                    "max_gross_mass_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 32500
                    },
                    "max_payload_kg": {
                        "type": "number",
                        "format": "double",
                        "example": 28840
                    },
                    "tare_kg": {
                        "type": "number",
                        "description": "The Tare weight of the container, typically used in VGM calculations",
                        "format": "double",
                        "example": 3660
                    },
                    "dimensions": {
                        "type": "object",
                        "properties": {
                            "external_length_mm": {
                                "type": "number",
                                "example": 12192
                            },
                            "external_width_mm": {
                                "type": "number",
                                "example": 2438
                            },
                            "external_height_mm": {
                                "type": "number",
                                "example": 2896
                            },
                            "internal_length_mm": {
                                "type": "number",
                                "example": 11192
                            },
                            "internal_width_mm": {
                                "type": "number",
                                "example": 2238
                            },
                            "internal_height_mm": {
                                "type": "number",
                                "example": 2696
                            },
                            "door_opening_width_mm": {
                                "type": "number",
                                "example": 2338
                            },
                            "door_opening_height_mm": {
                                "type": "number",
                                "example": 2796
                            }
                        }
                    },
                    "smart_container": {
                        "$ref": "#/components/schemas/SmartContainer"
                    },
                    "tank_container": {
                        "$ref": "#/components/schemas/TankContainer"
                    },
                    "combined_data_plate": {
                        "$ref": "#/components/schemas/CombinedDataPlate"
                    }
                }
            },
            "CombinedDataPlate": {
                "type": "object",
                "required": [
                    "customs_approval",
                    "manufacture_number",
                    "manufacturer",
                    "csc_approval",
                    "manufacture_date",
                    "stacking_kg",
                    "one_door_off_stacking_kg",
                    "racking_n",
                    "one_door_off_racking_n",
                    "one_door_off_end_wall_strength_newtons",
                    "container_model"
                ],
                "properties": {
                    "customs_approval": {
                        "type": "string",
                        "example": "GB-L/749/2/7/22"
                    },
                    "manufacture_number": {
                        "type": "string",
                        "example": "NBA109026005"
                    },
                    "manufacturer": {
                        "type": "string",
                        "example": "ABC Container Factory Co"
                    },
                    "timber_treatment_approval": {
                        "type": "string",
                        "example": "IM/TAILILEUM 400/2020"
                    },
                    "csc_approval": {
                        "type": "string",
                        "example": "F/BV/15018/22"
                    },
                    "manufacture_date": {
                        "type": "string",
                        "example": "2022-12-20"
                    },
                    "stacking_kg": {
                        "type": "number",
                        "example": 216000
                    },
                    "one_door_off_stacking_kg": {
                        "type": "number",
                        "example": 72000
                    },
                    "racking_n": {
                        "type": "number",
                        "example": 150000
                    },
                    "one_door_off_racking_n": {
                        "type": "number",
                        "example": 74970
                    },
                    "one_door_off_end_wall_strength_newtons": {
                        "type": "number",
                        "example": 55370
                    },
                    "container_model": {
                        "type": "string",
                        "example": "1AAA-101W45G1G"
                    },
                    "acep_number": {
                        "type": "string",
                        "example": "FR-BV-2022-001"
                    }
                }
            },
            "SmartContainer": {
                "type": "object",
                "required": [
                    "smart_container",
                    "smart_container_certification",
                    "smart_container_activated"
                ],
                "properties": {
                    "smart_container": {
                        "type": "boolean"
                    },
                    "smart_container_certification": {
                        "type": "string",
                        "enum": [
                            "A1",
                            "A2",
                            "NONE"
                        ]
                    },
                    "smart_container_activated": {
                        "type": "boolean"
                    }
                }
            },
            "TankContainer": {
                "type": "object",
                "required": [
                    "capacity_litres",
                    "imdg_code",
                    "adr_rid_code",
                    "baffles"
                ],
                "properties": {
                    "capacity_litres": {
                        "type": "number",
                        "example": 24000
                    },
                    "imdg_code": {
                        "type": "string",
                        "example": "T22"
                    },
                    "adr_rid_code": {
                        "type": "string",
                        "pattern": "^[LS](G|1\\.5|2\\.65|4|10|15|21)[ABCD][VFNH]$",
                        "example": "L4BN"
                    },
                    "baffles": {
                        "type": "boolean"
                    }
                }
            },
            "ErrorResponse": {
                "type": "object",
                "properties": {
                    "message": {
                        "type": "string",
                        "description": "Plain text explanation of issue",
                        "example": "Request Failed due to X"
                    }
                },
                "required": [
                    "message"
                ]
            },
            "TotalContainersBySizeTypeCodeResponse": {
                "type": "object",
                "properties": {
                    "size_type_code_counts": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "detail_st": {
                                    "type": "string",
                                    "example": "Size Type Code"
                                },
                                "total_count": {
                                    "type": "integer",
                                    "example": 456
                                }
                            }
                        }
                    }
                },
                "description": "Total number of containers for each Detail_st"
            },
            "AverageWeightsBySizeTypeCodeResponse": {
                "type": "object",
                "properties": {
                    "average_weights": {
                        "type": "array",
                        "items": {
                            "type": "object",
                            "properties": {
                                "detail_st": {
                                    "type": "string",
                                    "example": "Size Type Code"
                                },
                                "avg_tare_kg": {
                                    "type": "number",
                                    "example": 1000.5
                                },
                                "p25_tare_kg": {
                                    "type": "number",
                                    "example": 900.0
                                },
                                "p75_tare_kg": {
                                    "type": "number",
                                    "example": 1100.0
                                },
                                "avg_max_payload_kg": {
                                    "type": "number",
                                    "example": 20000.5
                                },
                                "p25_max_payload_kg": {
                                    "type": "number",
                                    "example": 19000.0
                                },
                                "p75_max_payload_kg": {
                                    "type": "number",
                                    "example": 21000.0
                                },
                                "avg_max_gross_mass_kg": {
                                    "type": "number",
                                    "example": 21000.5
                                },
                                "p25_max_gross_mass_kg": {
                                    "type": "number",
                                    "example": 20500.0
                                },
                                "p75_max_gross_mass_kg": {
                                    "type": "number",
                                    "example": 21500.0
                                },
                                "container_count": {
                                    "type": "integer",
                                    "example": 123
                                }
                            }
                        }
                    }
                },
                "description": "Average weights (tare_kg, max_payload_kg, max_gross_mass_kg) for each detail_st"
            }
        },
        "securitySchemes": {
            "BasicAuth": {
                "type": "http",
                "scheme": "basic"
            },
            "BearerAuth": {
                "type": "http",
                "scheme": "bearer",
                "bearerFormat": "JWT",
                "description": "JWT token obtained from the /oauth/token endpoint"
            }
        }
    }
}