Ops Endpoints
All endpoints are prefixed with /api/v1/production/ops.
Customers
| Method | Path | Description |
|---|---|---|
GET | /customers | List all customers |
GET | /customers/:id | Full workspace — customer + all operational data |
POST | /customers/:id/assign | Assign agent to customer |
Customer workspace response
GET /customers/:id returns a single object with all customer operational data:
{ "customer": { ... }, "orders": [...], "policies": [...], "timeline": [...], "renewals": [...], "communications": [...], "tasks": [...], "documents": [...], "payments": [...], "residency_applications": [...], "work_permit_applications": [...], "citizenship_applications": [...], "real_estate_transactions": [...], "turquoise_applications": [...]}Timeline
| Method | Path | Description |
|---|---|---|
GET | /customers/:id/timeline?limit=100 | Customer timeline events |
POST | /customers/:id/timeline | Add a manual timeline event |
Communications
| Method | Path | Description |
|---|---|---|
GET | /customers/:id/communications?limit=100 | All communications |
POST | /customers/:id/communications | Log a communication |
POST | /customers/:id/notes | Add internal note |
PATCH | /customers/:id/communications/read | Mark all as read |
Tasks
| Method | Path | Description |
|---|---|---|
GET | /tasks | Global tasks queue |
POST | /tasks | Create a task |
GET | /customers/:id/tasks | Tasks for a customer |
PUT | /tasks/:task_id | Update a task |
PATCH | /tasks/:task_id/complete | Complete a task |
Tasks queue parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number |
limit | number | Results per page (default 50) |
status | string | Filter by status |
priority | string | Filter by priority |
assignee_id | string | Filter by assignee |
Renewals
| Method | Path | Description |
|---|---|---|
GET | /renewals | Global renewals queue |
POST | /renewals/refresh | Run the renewals refresh (cron target) |
GET | /customers/:id/renewals | Renewals for a customer |
POST | /customers/:id/renewals | Create a renewal |
PATCH | /renewals/:renewal_id/complete | Complete a renewal |
Renewals queue parameters
| Parameter | Type | Description |
|---|---|---|
days_window | number | Look-ahead window in days (default 90) |
service_type | string | Filter by service type |
status | string | Filter by status |
Policies
| Method | Path | Description |
|---|---|---|
GET | /policies | Global policies list |
GET | /customers/:id/policies | Policies for a customer |
POST | /customers/:id/policies | Create a policy |
PUT | /policies/:policy_id | Update a policy |
Policies queue parameters
| Parameter | Type | Description |
|---|---|---|
page | number | Page number |
limit | number | Results per page |
status | string | Filter by status |
Documents
| Method | Path | Description |
|---|---|---|
GET | /customers/:id/documents | Documents for a customer |
POST | /customers/:id/documents | Create a document record |
PUT | /documents/:doc_id | Update document status / notes |
Staff
| Method | Path | Description |
|---|---|---|
GET | /staff | List all staff members |