ATM Cassette Settlement OCR API

Automate the auditing of ATM and cash-recycler terminals. Our engine reads "CASSETTE TOTAL" slips from major vendors (NCR, Diebold, Wincor, Genmega, etc.), differentiating between denomination structures and remaining values. It natively computes mathematical validation (remaining count × denomination = total value) to ensure strict financial accuracy. Beyond printed text, the API effectively transcribes handwritten technician annotations, allowing for seamless reconciliation workflows without manual data entry.


Endpoint

POSThttps://api.structocr.com/v1/atm-cassette

Request Parameters

Important: This endpoint requires application/json Content-Type. Images must be sent as Base64 strings.

ParameterInRequiredDescription
x-api-keyHeaderRequiredYour unique API key generated from the dashboard.
Content-TypeHeaderRequiredMust be set to application/json.
imgBodyRequiredThe Base64 encoded string of the settlement receipt image.
  • Supports standard Data URI (e.g., data:image/jpeg;base64,...)
  • Supports raw Base64 strings
  • Max file size: 4.5MB
  • Formats: JPG, PNG, WebP, PDF
  • Other decoded formats return 415 UNSUPPORTED_FILE_FORMAT.
  • For best response time, compress to under 300 KB.

Response Schema

The following attributes are extracted into the data object. The engine automatically rejects retail POS formats and executes mathematical verifications on cassette capacities.

FieldTypeDescription
is_cassette_reportbooleanReturns true if recognized as an audit slip. False if it is a retail receipt.
terminal_idstring | nullThe printed TERMINAL # or specific device ID.
vendorenumGuessed machine vendor (e.g., ncr, diebold, wincor, genmega, triton, grg, other, unknown).
vendor_confidenceenumCertainty level (High, Medium, Low).
vendor_evidencestring | nullClues used to infer the vendor, such as specific handwritten notes or layout structures.
audit_periodobjectContains start_datetime and end_datetime as ISO 8601 strings.
currencystring | nullGuessed ISO currency code, inferred from symbols.
cassettesarray of objectsDetailed breakdown for each physical note cassette inside the machine.
↳ cassette_idstringIdentifier for the cassette (e.g., CST1, Type 2).
↳ denominationnumber | nullUnit face value of notes loaded in this cassette.
↳ loaded_countnumberTotal physical notes loaded into the cassette.
↳ dispensed_countnumberTotal physical notes dispensed from the cassette.
↳ rejected_countnumberTotal physical notes rejected by the machine.
↳ remaining_countnumberTotal physical notes left inside the cassette.
↳ remaining_valuenumber | nullThe printed total financial value remaining in the cassette.
↳ value_check_passedboolean | nullSystem-calculated verification: Returns true if (remaining_count * denomination) exactly matches remaining_value.
operator_annotationsarray of objectsTranscribed handwritten notes (e.g., machine numbers, technician initials) with individual confidence scores.
confidenceenumOverall extraction reliability (High, Medium, Low).

Code Examples

Request Implementation

curl -X POST https://api.structocr.com/v1/atm-cassette \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "img": "data:image/jpeg;base64,/9j/4AAQSkZJRg..."
  }'

Success Response (200 OK)

JSON EXAMPLE
{
  "success": true,
  "data": {
    "is_cassette_report": true,
    "terminal_id": "T-99824",
    "vendor": "ncr",
    "vendor_confidence": "High",
    "vendor_evidence": "handwritten note reads 'NCR 6622'",
    "audit_period": {
      "start_datetime": "2025-08-19T10:00:00",
      "end_datetime": "2025-08-20T09:34:51"
    },
    "currency": "USD",
    "cassettes": [
      {
        "cassette_id": "CST1",
        "denomination": 20,
        "loaded_count": 438,
        "dispensed_count": 40,
        "rejected_count": 0,
        "tested_count": 0,
        "remaining_count": 398,
        "remaining_value": 7960,
        "value_check_passed": true
      }
    ],
    "operator_annotations": [
      {
        "text": "NCR 6622",
        "confidence": "Medium"
      }
    ],
    "confidence": "High"
  }
}

Live API Test

Live Demo: ATM Cassette 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

Error Responses

400 Bad Request - Invalid Input

{
  "status": 400,
  "code": "INVALID_REQUEST_FORMAT",  
  "message":"The image data in 'img' field is malformed. Please check for illegal characters or incorrect Base64 encoding."
}

402 Payment Required - Insufficient Credits

{
  "status": 402,
  "code": "INSUFFICIENT_CREDITS",
  "message": "Your account balance is insufficient to complete this operation."
}

413 Payload Too Large

The Base64 decoded image size exceeds 4.5MB.

{
  "error": "FILE_TOO_LARGE"
}

415 Unsupported Media Type

{
  "error": "INVALID_CONTENT_TYPE_USE_JSON"
}

422 Unprocessable Entity - Policy Violation

{
  "status": 422,
  "code": "CONTENT_POLICY_VIOLATION",
  "message": "The document content could not be processed due to safety policies."
}

500 Internal Server Error

{
  "status": 500,
  "code": "PROCESSING_ERROR",
  "message": "An internal error occurred while processing the document..."
}

503 Service Unavailable - System Busy

{
  "status": 503,
  "code": "SYSTEM_BUSY",
  "message": "StructOCR is currently processing a high volume of requests..."
}

Status Code Definitions

CodeError CodeDescription
200SUCCESSRecognition success
400INVALID_REQUEST_FORMATInvalid payload or corrupted Base64 structure.
402INSUFFICIENT_CREDITSAccount balance too low
413FILE_TOO_LARGEDecoded image exceeds 4.5MB
415INVALID_CONTENT_TYPENot using application/json
422CONTENT_POLICY_VIOLATIONAI safety/policy block
500PROCESSING_ERRORDownstream processing fault
503SYSTEM_BUSYAPI Rate limit reached