Sensual Scents & Style
Sensual Scents REST API v1
API Gateway Operational

Developer API

The Sensual Scents & Style API is active and operational. External client applications, mobile apps, and authorized integrations can utilize the documented endpoints below.

BASE URL: https://api.sensualscents.co.ke
AUTHENTICATION RAIL Laravel Sanctum

Bearer Token authorization

MOBILE MONEY Safaricom M-Pesa

STK Push & Realtime IPN Callbacks

RESPONSE FORMAT JSON UTF-8

Consistent structured payloads

Valid API Endpoints

Accept: application/json
GET /products
Public

Fetch paginated fragrance collection with category info, pricing, and inventory stock status. Supports ?search= and ?category=.

GET /categories
Public

Retrieve active fragrance collections and scent families (e.g., Pour Femme, Pour Homme, Unisex) with total product counts.

POST /login
Public

Authenticates customer or staff credentials and issues a plaintext Bearer token for subsequent requests. Body: {email, password, device_name}.

Requires JSON Body 200 OK
POST /orders
Bearer Token

Submit luxury orders with automated stock validation, inventory decrement, transaction logging, and optional automatic M-Pesa STK Push. Supports mpesa and cod.

Authorization: Bearer 201 Created
POST /payments/initiate
Bearer Token

Dispatches Safaricom Lipa Na M-Pesa STK prompt to customer mobile device. Check progress with GET /payments/status/{ref}.

M-Pesa Express v2 200 OK
CRUD /addresses
Bearer Token

Manage customer shipping and billing coordinates with default selection flags for fast checkout completion.

Full Resource JSON
Example Response Structure HTTP/1.1 200 OK
{
  "status": "success",
  "message": "Sensual Scents & Style API Gateway is active",
  "version": "1.0.0",
  "data": {
    "environment": "production",
    "health": "healthy",
    "endpoints": [
      "/products",
      "/categories",
      "/orders",
      "/payments/initiate"
    ]
  }
}