FoodGuard Mobile API
  1. Authentication
FoodGuard Mobile API
  • Authentication
    • User Login
      POST
    • User Logout
      POST
  • Lookups
    • Get All Branches
      GET
    • Get All Suppliers
      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
  • Schemas
    • User
    • Branch
    • Supplier
    • BatchInitResponse
    • AISampleResult
    • ErrorResponse
    • ValidationErrorResponse
  1. Authentication

User Login

POST
/auth/login

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/x-www-form-urlencodedRequired

Responses

🟢200
application/json
Login Successful
Body

Example
{
    "success": true,
    "message": "Login successful.",
    "data": {
        "token": "13|LaravelSanctumTokenString...",
        "user": {
            "id": 1,
            "name": "Ahmed Hassan",
            "email": "ahmed@foodguard.com",
            "role": "inspector",
            "branch_id": 5
        }
    }
}
🟠401
🟠422
Modified at 2025-12-18 11:07:47
Next
User Logout
Built with