GOBE E-Commerce API Documentation

Welcome to the official API documentation for the GOBE E-Commerce platform.

Base URL

All API endpoints are relative to the following base URL:
Local: http://localhost:8000/api
Prod: https://goba-ecommerce.sunmedagency.com/api

Authentication

Most routes are protected and require a bearer token for access. To authenticate, obtain a token by using the /auth/login or /auth/register endpoints. Include this token in the Authorization header for subsequent requests.

Authorization: Bearer <your-api-token>


Seeding

To populate the database with dummy data, run the following command:

php artisan db:seed

This will seed products (with tags), categories, order requests, and more.


API Endpoints

Public API Endpoints

Authentication

Products

Categories

Orders

Wishlist

Cart

Blog / Posts

Miscellaneous

Tags (API)


Request Validation

All incoming API requests are validated according to predefined rules. If a request fails validation, the API will return a 422 Unprocessable Entity status code with a JSON response detailing the validation errors. The error response will typically look like this:

{
    "message": "The given data was invalid.",
    "errors": {
        "field_name": [
            "The field_name field is required.",
            "The field_name must be at least 8 characters."
        ]
        // ... other fields with their respective errors
    }
}

API Endpoints Validation Rules

Public API Endpoints Validation

Authentication

Products

Orders

Miscellaneous

Cart

Blog / Posts

Products (Reviews)

Wishlist

Users

Tags (API)

Tags (Web/Admin)


Admin API Endpoints

All endpoints require admin authentication. Base path: /api/admin

Dashboard

Products

Categories

Product Types

Orders

Customers

Coupons

Popups

Sliders

Reviews

Tags (Admin)

Settings (Site)

Profile (Admin)


Note: All endpoints require authentication unless otherwise specified. For file uploads (e.g., avatar), use multipart/form-data.

For more details on request/response formats, see the controller code or ask for specific examples.