VERIFIED DIRECTORY LIVE Multi-Sector Business Discovery • Direct Website & WhatsApp Access • 100% Admin-Verified
DEVELOPER & VENDOR ADMINISTRATOR API SPECIFICATION

Teeya Directories Stateless REST API (/api/v1/)

Teeya Directories provides two strictly separated authentication tiers: Account Secret Keys (tyd_...) for merchants managing their own business listings, and Vendor Administrator Keys (tyd_admin_...) for administrators creating or deleting user accounts and provisioning per-account secret keys.

Part 1 · Merchant & Account API

User Business Management Endpoints (tyd_...)

Pass your account secret key via Authorization: Bearer tyd_... or X-API-Key: tyd_.... All business endpoints are strictly scoped to the authenticated user's own businesses.

GET /api/v1/categories/ # 1. Fetch All 17 Sectors & 204 Sub-Categories (221 Total)

Returns the complete taxonomy of 17 main industry sectors and 204 specialized sub-categories (221 total), including verified business counts per sector.

# 1. Fetch All 17 Sectors & 204 Sub-Categories (221 Total)
GET /api/v1/categories/

curl -X GET "http://127.0.0.1:8000/api/v1/categories/"
GET /api/v1/businesses/ # 2. List Owned Businesses (Only the Authenticated User's Own Businesses)

Returns only the business listings owned by the authenticated account (`user = api_key.user`), including their `id` (UUID), `business_token` (`tyd_biz_...`), `slug`, `verification_status` (`pending`, `verified`, `delisted`), and engagement metrics.

# 2. List Owned Businesses (only their own businesses)
GET /api/v1/businesses/
Authorization: Bearer tyd_live_demo_secret_key_2026_teeya

curl -X GET "http://127.0.0.1:8000/api/v1/businesses/" \
  -H "Authorization: Bearer tyd_live_demo_secret_key_2026_teeya"
POST /api/v1/businesses/ # 3. Submit a Business Listing (Saved Private Pending Verification)

Creates a new business listing under the authenticated user's account. Newly submitted businesses are strictly saved with "verification_status": "pending" and "is_verified": false until verified by an Administrator. Returns the created business `id`, `business_token` (`tyd_biz_...`), and `slug`.

# 3. Submit a Business Listing (Saved Private Pending Verification)
POST /api/v1/businesses/
Authorization: Bearer tyd_live_demo_secret_key_2026_teeya

curl -X POST "http://127.0.0.1:8000/api/v1/businesses/" \
  -H "Authorization: Bearer tyd_live_demo_secret_key_2026_teeya" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Paystack Cloud Logistics",
    "tagline": "Automated fleet and parcel routing across Nigeria",
    "category_slug": "logistics-transportation",
    "subcategory_name": "Courier & Express Delivery Service",
    "description": "End-to-end parcel fulfillment and cold-chain logistics for e-commerce merchants.",
    "domain": "paystacklogistics.com.ng",
    "email": "ops@paystacklogistics.com.ng",
    "phone": "+234 809 000 1122",
    "whatsapp_number": "2348090001122",
    "state": "Lagos",
    "city": "Ikeja, Lagos"
  }'
GET PATCH DELETE /api/v1/businesses/<identifier>/ # 4. Get Owned Business Detail by UUID, Business Token (tyd_biz_...), or Slug

Retrieves (or updates/deletes) the full details of a specific business listing owned by the authenticated user. You can pass the business UUID (id), Business Token (tyd_biz_...), or Slug as <identifier>. Returns complete profile fields, services, verification status, click telemetry, recent customer enquiries, and reviews.

# 4. Get the information of an owned business listing detail by business ID, token (tyd_biz_...), or slug
GET /api/v1/businesses/<business_id_or_token_or_slug>/
Authorization: Bearer tyd_live_demo_secret_key_2026_teeya

# Example A: By Business UUID
curl -X GET "http://127.0.0.1:8000/api/v1/businesses/9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d/" \
  -H "Authorization: Bearer tyd_live_demo_secret_key_2026_teeya"

# Example B: By Business Token (tracking_id)
curl -X GET "http://127.0.0.1:8000/api/v1/businesses/tyd_biz_a1b2c3d4e5f6/" \
  -H "Authorization: Bearer tyd_live_demo_secret_key_2026_teeya"

# Example C: By Business Slug
curl -X GET "http://127.0.0.1:8000/api/v1/businesses/teeya-directories/" \
  -H "Authorization: Bearer tyd_live_demo_secret_key_2026_teeya"
Part 2 · Vendor Administrator API (Separate Admin-Only Keys)

Create & Delete User Accounts + Provision Account Secret Keys (tyd_admin_...)

Vendor Administrator API keys (tyd_admin_..., managed in Django Admin under Admin Vendor API Keys) are strictly separate from regular user keys. When the Vendor Administrator creates a user account, the endpoint returns the account info along with a newly created tyd_... secret key for that account so the vendor can manage the user's businesses through their secret key.

POST /api/v1/admin/accounts/ (Alias: /api/v1/admin/provision/)

Creates a new user account, configures their subscription tier, and generates a fresh tyd_... secret key for the account. Returns the account details + the newly created secret_key so the vendor can immediately manage the user's businesses via /api/v1/businesses/.

# Vendor Administrator: Create User Account & Return Newly Created Account Secret Key
POST /api/v1/admin/accounts/
Authorization: Bearer tyd_admin_live_master_vendor_key_2026_teeya

curl -X POST "http://127.0.0.1:8000/api/v1/admin/accounts/" \
  -H "Authorization: Bearer tyd_admin_live_master_vendor_key_2026_teeya" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "merchant@brandcompany.ng",
    "username": "brandcompany",
    "password": "StrongVendorPass2026!",
    "plan_tier": "growth",
    "business_name": "BrandCompany Nigeria Ltd",
    "domain": "brandcompany.ng",
    "category_slug": "technology"
  }'

# Response (201 Created):
{
  "status": "provisioned",
  "created_new_account": true,
  "account_id": 25,
  "username": "brandcompany",
  "email": "merchant@brandcompany.ng",
  "account": {
    "id": 25,
    "username": "brandcompany",
    "email": "merchant@brandcompany.ng",
    "raw_password": "StrongVendorPass2026!",
    "plan_tier": "growth",
    "is_verified": true
  },
  "secret_key": {
    "id": "...",
    "name": "Vendor Provisioned Key",
    "prefix": "tyd_9f8a7b6c",
    "api_key": "tyd_9f8a7b6c_...",
    "secret_key": "tyd_9f8a7b6c_...",
    "direct_login_url": "/login?secret=tyd_9f8a7b6c_..."
  },
  "business": {
    "id": "...",
    "business_token": "tyd_biz_...",
    "name": "BrandCompany Nigeria Ltd",
    "slug": "brandcompany-nigeria-ltd",
    "verification_status": "pending"
  }
}
DELETE /api/v1/admin/accounts/<account_identifier>/ (Also supports DELETE /api/v1/admin/accounts/ with JSON body)

Allows the Vendor Administrator to permanently delete a user account (along with all of its secret keys and business listings) by passing the user's ID, username, email, or account secret key (tyd_...).

# Vendor Administrator: Delete User Account by ID, Username, Email, or Account Secret Key
DELETE /api/v1/admin/accounts/brandcompany/
Authorization: Bearer tyd_admin_live_master_vendor_key_2026_teeya

curl -X DELETE "http://127.0.0.1:8000/api/v1/admin/accounts/brandcompany/" \
  -H "Authorization: Bearer tyd_admin_live_master_vendor_key_2026_teeya"