FoodGuard Mobile API
  1. Food Safety
FoodGuard Mobile API
  • Authentication
    • User Login
      POST
    • User Logout
      POST
  • Lookups
    • Branches
      • List
      • Show
    • Suppliers
      • List
      • Show
    • List Food Categories
      GET
  • Inspection
    • Lookup Batch by QR/Barcode
      GET
    • Initialize Inspection Batch
      POST
    • Upload Sample Image for AI Analysis
      POST
    • Finalize Batch Inspection
      POST
  • History
    • Get Inspection History
      GET
  • Inspector Dashboard
    • Get Home Screen Stats
      GET
  • Food Safety
    • Submit Truck Inspection Data
      POST
    • Upload Sample Label Photo
      POST
    • Analyze Label Image (OCR)
      POST
  • Settings
    • Get Quality Thresholds
      GET
  • Schemas
    • User
    • Branch
    • Supplier
    • BatchInitResponse
    • AISampleResult
    • ErrorResponse
    • ValidationErrorResponse
    • TruckInspectionRequest
    • TruckInspectionResponse
    • Category
    • ThresholdSettings
  1. Food Safety

Analyze Label Image (OCR)

POST
/batches/analyze-label
Uploads a product label image for OCR analysis. Returns extracted data including expiry date, batch number, and production date.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params multipart/form-dataRequired

Responses

🟢200
application/json
Label analyzed successfully
Body

Example
{
    "success": true,
    "message": "Label analyzed successfully.",
    "data": {
        "ocr_result": {
            "expiry_date": "2026-06-15",
            "batch_number": "BTH-A1B2C3D4",
            "production_date": "2025-12-01",
            "product_name": "Detected Product",
            "manufacturer": "Detected Manufacturer"
        },
        "confidence": 0.95,
        "processed_at": "2025-12-24T10:30:00Z"
    }
}
🟠422
Modified at 2025-12-24 10:09:45
Previous
Upload Sample Label Photo
Next
Get Quality Thresholds
Built with