1. Phase 2: Label Analysis
FoodGuard Mobile API
  • Authentication
    • Resolve Company
      GET
    • User Login
      POST
    • User Logout
      POST
  • Lookups
    • List Branches
      GET
    • Get Branch Details
      GET
    • List Suppliers
      GET
    • Get Supplier Details
      GET
    • List Food Categories
      GET
    • List Shipment Types
      GET
  • Batch Management
    • List Batches
      GET
    • Create Batch
      POST
    • Get Batch Details
      GET
  • Phase 1: Truck Inspection
    • Submit Truck Inspection
      POST
    • Upload Escalation Photo
      POST
  • Phase 2: Label Analysis
    • Analyze Label (OCR)
      POST
    • Update Batch OCR Data
      PATCH
  • Phase 3: Sample Evaluation
    • List Batch Samples
      GET
    • Add Sample to Batch
      POST
    • Replace Sample Photo
      PATCH
    • Delete Sample
      DELETE
  • Phase 4: Finalize
    • Finalize Batch Inspection
      POST
  • Dashboard & History
    • Get Dashboard Stats
      GET
    • Get Inspection History
      GET
  • Settings
    • Get Temperature Thresholds
  • Schemas
    • Sample
    • ShipmentTypeObject
  1. Phase 2: Label Analysis

Analyze Label (OCR)

POST
/batches/{batch_id}/analyze-label
Uploads a product label image for OCR analysis. OCR data is stored at the batch level.

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Body Params multipart/form-dataRequired

Responses

🟢200
application/json
Label analyzed successfully
Body

Example
{
    "success": true,
    "data": {
        "batch_id": 0,
        "batch_code": "string",
        "ocr_result": {
            "expiry_date": "2019-08-24",
            "production_date": "2019-08-24",
            "batch_number": "string",
            "product_name": "string",
            "manufacturer": "string"
        },
        "confidence": 0.95,
        "requires_manual_review": true,
        "image_path": "string",
        "processed_at": "2019-08-24T14:15:22.123Z"
    }
}
🟠401
🟠404
🟠422
Modified at 2026-02-23 18:27:16
Previous
Upload Escalation Photo
Next
Update Batch OCR Data
Built with