Check Digit Calculator: Container OCR API

Instantly verify container numbers with built-in mathematical validation. Upload your raw logistics captures to test our check digit calculator for free, ensuring flawless data entry.

Visual breakdown of a shipping container number highlighting the final check digit, with a free test upload button powered by StructOCR.

The High Cost of Invalid Container Data

A single mistyped digit in a container number can disrupt an entire supply chain. The ISO 6346 standard uses a specific mathematical formula to generate a final check digit based on the owner code and serial number. When gate clerks or crane operators manually type these codes, human error inevitably leads to invalid check digits, causing database rejections, lost cargo, and billing disputes. Standard OCR tools merely read text without verifying the math, passing corrupt strings into your system. To see how our engine structurally prevents these errors, you can upload a test image to explore our core Container OCR capabilities completely free.

Algorithmic Verification on the Fly

Delivered strictly as a lightweight REST API to ensure seamless integration without the burden of heavy SDK dependencies, this endpoint is powered by our Logistics Container OCR engine. It acts as an automated gatekeeper for your data. The engine applies strict ISO 6346 validation automatically, calculating the mod-11 check digit in milliseconds to guarantee that only mathematically sound Container Codes enter your logistics software.

Live Demo: Container OCR

No registration required. Upload a file to test the extraction.

1
Upload
2
Results

Drop files here or click to browse

JPG · PNG · WebP  ·  up to 500 files · max 4.5 MB each

No files selected
Need more testing? Create a free account to get 200 free credits (equals 200 Container scans).

Check Digit Application Scenarios

Automated Gate Entry Validation

Prevent trucks with invalid paperwork from entering the yard. The API instantly calculates and compares the visual check digit against the printed manifest. Ready to secure your terminal data? View flexible pricing to scale your processing limits using modern payment rails like USDT/USDC.

Intelligent Error Correction

Reconstruct missing characters effortlessly. If a serial digit is obscured by rust or dents, the API reverse-engineers the missing number using the visible check digit formula.

TOS Database Cleansing

Run historical audits on your Terminal Operating System (TOS) inventory by feeding existing images through the API to verify check digits and flag corrupted database records.

Mobile Verification Apps

Empower yard spotters with mobile tools that instantly highlight invalid container numbers with a red warning if the calculated check digit fails to match the visual read.

Technical Specs

  • Mod-11 Algorithm: Natively executes the complex ISO 6346 Modulo 11 weighting formula in milliseconds.
  • Edge Optimization: Deployed on Cloudflare's global edge network, ensuring ultra-low t1/t2 latency for rapid mathematical verification.
  • Input Versatility: Fully supports raw Base64 strings and direct multipart file uploads—ideal for secure logistics intranets.
  • Dependency-Free: Pure REST API architecture ensures zero dependency conflicts, avoiding the maintenance overhead of language-specific SDKs.

Key Features

  • Free Image Testing: Instantly upload container photos to test the check digit calculation accuracy before writing any integration code.
  • Granular Output: Cleanly separates the alphanumeric string, providing the exact `check_digit` and an `is_valid` boolean flag in a structured JSON object.
  • Harsh Environment Recovery: Mitigates deep shadows and peeling paint by utilizing the check digit logic to mathematically confirm borderline visual reads.

Integration & AI Prompts

Call the endpoint directly via HTTP. The API is designed for maximum security and edge performance, natively accepting direct multipart file uploads or Base64-encoded strings to keep your operations off public URLs.

import requests
import base64

# Prepare Base64 Image to calculate and verify the check digit
with open("container_side_capture.jpg", "rb") as image_file:
    base64_image = base64.b64encode(image_file.read()).decode('utf-8')

url = "https://api.structocr.com/v1/container"
headers = {
    "x-api-key": "YOUR_API_KEY",
    "Content-Type": "application/json"
}
payload = {
    "img": base64_image
}

try:
    print("Calculating Check Digit...")
    response = requests.post(url, headers=headers, json=payload)
    result = response.json()

    if result.get('success'):
        data = result['data']
        parsed = data.get('parsed', {})
        print("✅ Validation Complete!")
        print(f"Full ISO Code:  {data.get('container_number')}")
        print(f"Check Digit:    {parsed.get('check_digit')}")
        print(f"Math Valid:     {data.get('is_valid')}")
        print(f"Confidence:     {data.get('confidence')}")
    else:
        print(f"❌ Calculation Failed: {result.get('error')} - {result.get('message')}")

except Exception as e:
    print(f"An error occurred: {e}")

Standardized JSON Output

The API returns a cleanly parsed payload providing the full consolidated container number while explicitly highlighting the calculated check digit and validation status.

{
  "success": true,
  "data": {
    "container_number": "ZCSU8921655",
    "is_valid": true,
    "confidence": "High",
    "parsed": {
      "owner_code": "ZCS",
      "category": "U",
      "serial_number": "892165",
      "check_digit": "5"
    }
  }
}

Frequently Asked Questions

Can I test the check digit calculator API for free?

Absolutely. You can upload container images directly on our platform to see how the engine calculates and verifies the check digit completely free of charge.

How does the API use the check digit to fix OCR errors?

Because the API strictly enforces the ISO 6346 Mod-11 formula, if one character is unreadable due to physical damage, the engine can use the remaining characters and the check digit to mathematically deduce the missing value.

Do you provide SDKs for this calculation?

We focus entirely on providing a lightning-fast, universal REST API to prevent dependency conflicts across your stack. This ensures simple integration via standard HTTP requests whether you use Base64 strings or file uploads.

Explore More Container Solutions

SOLUTION

Enterprise Container Code Reader Software API

Integrate industrial container code reader software into your TOS or WMS via a lightweight REST API. Upload your images for a free accuracy test today.

Container
SOLUTION

Container OCR API for Canadian Terminals

High-accuracy ISO 6346 container number extraction built for extreme Canadian weather. Overcome snow, ice, and glare. Upload an image for a free test today.

Container
SOLUTION

Automated Crane Tally: Container OCR API

Automate crane tally operations with our Container OCR API. Upload STS or RTG crane camera captures to test our ISO 6346 extraction for free. Handles 180-degree rotations effortlessly.

Container
SOLUTION

Customs Clearance: Container OCR API

Accelerate cross-border freight clearance with our Container OCR API. Upload border checkpoint images to test our ISO 6346 extraction for free. Eliminate manual customs delays.

Container
SOLUTION

Damage Inspection: Container OCR API

Automate container damage inspection with our high-accuracy OCR API. Upload photos of dented or rusted containers to test ISO 6346 extraction for free.

Container
SOLUTION

Empty Depot Management: Container OCR API

Streamline your empty container depot operations with our high-accuracy OCR API. Upload yard captures to test our ISO 6346 extraction for free and eliminate lost units.

Container
SOLUTION

Container OCR API for European Terminals

High-accuracy ISO 6346 container number extraction for European automated ports and rail networks. Upload your image for a free test to verify accuracy instantly.

Container
SOLUTION

Intermodal Rail: Container OCR API

Automate intermodal rail operations with our high-accuracy Container OCR API. Upload rail yard captures to test our ISO 6346 extraction for free. Built for high-speed logistics.

Container
SOLUTION

ERP Integration: Container OCR API

Integrate container OCR data directly into your ERP system. Upload logistics photos to test our ISO 6346 extraction for free and eliminate manual data entry.

Container
SOLUTION

TOS Integration: Container OCR API

Integrate high-accuracy Container OCR directly into your Terminal Operating System (TOS). Upload terminal CCTV captures to test our ISO 6346 extraction for free.

Container

Technical Comparisons & Integrations

Explore platform integrations and competitive analysis

From tutorial to production in 5 minutes.

You've seen the code. Now get your API key, grab your 200 free credits, and see it work with your own images. No credit card required.

Instant Access Cancel Anytime 99.9% Uptime