Skip to main content

API Overview

The SPN API is built with FastAPI and follows REST conventions.

Base URL

http://localhost:8000/api/v1

Authentication

The API uses JWT (JSON Web Tokens) for authentication.

Getting a Token

curl -X POST http://localhost:8000/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "yourpassword"}'

Using the Token

Include the token in the Authorization header:
curl http://localhost:8000/api/v1/companies \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Rate Limits

TierLimitEndpoints
AUTH20/minLogin, register, password reset
GENERAL120/minAuthenticated CRUD
UPLOAD10/minFile uploads
PUBLIC60/minPublic endpoints

Endpoints Summary

ModulePathDescription
Auth/authLogin, Register, OAuth, Password Reset
Companies/companiesCompany CRUD, search, domain check
Catalog/catalogProducts, bulk upload, XML feed
Contacts/contactsContact management
Enquiries/enquiriesLead management, WhatsApp verify
Users/usersProfile, password change, picture
Try-On/tryonAI virtual try-on
System/systemConfiguration

Response Format

Success

{
  "data": {
    "id": "uuid",
    "name": "Example"
  }
}

Error

{
  "detail": "Error message"
}

OpenAPI Documentation

Interactive API documentation is available at:

Next Steps