Skip to main content

Welcome to Urban Things API

Urban Things provides a comprehensive multi-tenant e-commerce platform API built with Laravel 11. This API enables you to manage products, categories, orders, team members, and more across multiple organizations.

Key Features

  • Multi-Tenant Architecture - Users can belong to multiple organizations
  • Role-Based Access Control - ADMIN and MEMBER roles per tenant
  • Team Member Management - Add, update, and remove team members
  • Product & Category Management - Full CRUD operations
  • Order Processing - Complete order management system
  • Event-Driven - Webhook integrations and event publishing
  • Secure Authentication - Laravel Sanctum token-based auth

Base URL

Authentication

All API endpoints require authentication using Bearer tokens (Laravel Sanctum).

Getting a Token

First, authenticate to receive a token:

Using the Token

Include the token in the Authorization header for all subsequent requests:

Multi-Tenancy

Most endpoints require a tenant context. Include the tenant ID in the header:
This ensures data isolation and proper access control across different organizations.

API Versioning

The API uses URL-based versioning:
  • v1: Public consumer-facing endpoints (/api/v1/...)
  • v2: Admin and management endpoints (/api/v2/admin/...)

Rate Limiting

API requests are rate-limited to ensure fair usage and system stability. If you exceed the limit, you’ll receive a 429 Too Many Requests response.

Response Format

All responses follow a consistent JSON format:

Success Response

Error Response

Validation Error

Pagination

List endpoints support pagination with the following parameters:
  • page - Page number (default: 1)
  • per_page - Items per page (default: 15)
Paginated responses include:

Common HTTP Status Codes

  • 200 - Success
  • 201 - Created
  • 400 - Bad Request
  • 401 - Unauthorized (missing or invalid token)
  • 403 - Forbidden (insufficient permissions)
  • 404 - Not Found
  • 422 - Validation Error
  • 429 - Too Many Requests
  • 500 - Server Error

Need Help?