Menu
Theme
Back to Developers

API Reference

Complete REST API documentation for the GetPartyOps platform.

Base URL:https://bh-saas-django-api.fly.dev/api/

Authentication

The API supports three authentication methods. Choose the one that fits your integration.

API Key

Recommended

Generate an API key from Settings → API Keys in your dashboard. Pass it in the X-API-Key header.

curl -H "X-API-Key: tk_your_api_key" \
  https://bh-saas-django-api.fly.dev/api/rental-items/

JWT Bearer Token

Exchange your credentials for a JWT access token. Include it in the Authorization header as a Bearer token.

curl -X POST https://bh-saas-django-api.fly.dev/api/token/ \
  -H "Content-Type: application/json" \
  -d '{"username":"user","password":"pass"}'

Session Authentication

Admin Panel

Cookie-based session auth is used by the admin panel and browsable API. Log in through the web interface and session cookies are handled automatically.

Response Format

All list endpoints return a Payload-compatible paginated response format.

{
  "docs": [...],
  "totalDocs": 100,
  "limit": 10,
  "totalPages": 10,
  "page": 1,
  "hasNextPage": true,
  "hasPrevPage": false
}
docsArray of resource objects
totalDocsTotal matching documents
limitResults per page
totalPagesTotal number of pages
pageCurrent page number
hasNextPageWhether more pages exist
hasPrevPageWhether previous pages exist

Key Endpoints

Core resources available through the API.

Endpoint Method Description
/api/rental-items/
GETPOST
Manage rental inventory
/api/bookings/
GETPOST
Create and manage bookings
/api/customers/
GETPOST
Customer management
/api/categories/
GETPOST
Item categories
/api/invoices/
GETPOST
Invoice management
/api/documents/
GETPOST
Terms and contracts
/api/media/
GETPOST
File uploads
/api/webhooks/
GETPOST
Webhook configuration

Query Parameters

Use query parameters to paginate, sort, and filter results on any list endpoint.

Pagination

Control page size with limit and navigate with page.

GET /api/rental-items/?limit=10&page=2

Sorting

Sort by any field. Prefix with - for descending order.

GET /api/rental-items/?sort=name
GET /api/bookings/?sort=-created_at

Filtering

Filter results using the where query syntax. Supports operators like equals, not_equals, greater_than, and more.

GET /api/bookings/?where[status][equals]=active
GET /api/rental-items/?where[price][greater_than]=100