v2.0.0 ● System Operational

API Overview

Welcome to the Foodlify API v2.0 documentation. This API allows you to interact with the Foodlify platform, enabling features for customers, vendors, riders, and administrators.

Base URL: http://127.0.0.1:8080/api/v2

Authentication

Most endpoints require endpoints to be authenticated using a JWT (JSON Web Token). Include the token in the Authorization header.

Authorization: Bearer

Public Endpoints

Endpoints accessible without authentication (unless configured otherwise).

GET /public/locations

Retrieve a list of supported locations.

curl -X GET http://127.0.0.1:8080/api/v2/public/locations
GET /public/catalog/collections

Fetch curated food collections (e.g., "Trending", "Breakfast").

User Management

POST /auth/register

Register a new user account.

Parameter Type Description
email string User's email address
password string Strong password
phone string Verified phone number

Admin Authentication

POST /admin/auth/login

Authenticate as an admin.

Parameter Type Description
email string Admin email
password string Password

Admin Management

Manage admin accounts, roles, and access.

GET /admin/list

List all admin accounts with pagination.

GET /api/v2/admin/list?page=1&limit=10
PATCH /admin/:id/status

Block or Unblock an admin account.

PATCH /api/v2/admin/{id}/status { "status": "blocked" // or "active" }
PATCH /admin/:id

Update admin details (e.g. Role).

PATCH /api/v2/admin/{id} { "role": "agent", "first_name": "NewName", "supported_location_ids": ["uuid1", "uuid2"] }