Service & Ticket Endpoints
Services represent professional services or projects linked to SVC-class entitlements. Tickets are individual requests created against services or environments, tracked with SLA status.
Service Endpoints
Base path: /wp-json/middag-account/v1/services
| Method | Endpoint | Auth | Scope | Description |
|---|---|---|---|---|
| GET | /services | JWT + Org | entitlements | List organization services |
| GET | /services/{id} | JWT + Org | entitlements | Service details |
| GET | /services/{id}/tickets | JWT + Org | entitlements | Service requests for service |
GET /services
Query filters:
| Parameter | Type | Values |
|---|---|---|
status | string | proposal, approved, in_progress, on_hold, delivered, closed, cancelled |
lifecycle | string | ongoing, project |
Response (200):
{
"success": true,
"data": [
{
"id": 801,
"name": "Moodle Customization Project",
"status": "in_progress",
"lifecycle": "project",
"entitlement_id": 103,
"entitlement_code": "SVC-2026030005",
"organization_id": 42,
"created_at": "2026-03-15T10:00:00Z"
}
],
"meta": {
"page": 1,
"per_page": 20,
"total": 1,
"pages": 1
}
}GET /services/:id
Full service details.
Response fields: id, name, status, lifecycle, description, entitlement_id, entitlement_code, organization_id, metadata, created_at, updated_at.
Ticket Endpoints
Base path: /wp-json/middag-account/v1/tickets
| Method | Endpoint | Auth | Scope | Description |
|---|---|---|---|---|
| GET | /tickets | JWT + Org | entitlements | List organization SRs |
| GET | /tickets/{id} | JWT + Org | entitlements | SR details |
| POST | /tickets | JWT + Org | entitlements | Create service request |
| GET | /tickets/{id}/history | JWT + Org | entitlements | Status transition history |
SR Number Format
Service request numbers follow the pattern SR-{YEAR}{SEQ:4d}. Example: SR-20260001, SR-20260042.
POST /tickets
Create a new service request. Clients can only create SRs for ENV-class entitlements (standalone). Admin users can create for any entitlement or service.
Request:
{
"title": "SSL Certificate Renewal",
"description": "The SSL certificate for lms.example.com expires soon. Please renew.",
"entitlement_id": 102,
"priority": "high"
}Response (201):
{
"success": true,
"data": {
"id": 901,
"number": "SR-20260042",
"status": "open",
"title": "SSL Certificate Renewal",
"entitlement_id": 102
},
"message": "Service request created"
}GET /tickets/:id/history
Returns the full status transition history for a service request.
Response (200):
{
"success": true,
"data": [
{
"from_status": null,
"to_status": "open",
"changed_at": "2026-04-01T10:00:00Z",
"changed_by": 15
},
{
"from_status": "open",
"to_status": "in_progress",
"changed_at": "2026-04-01T14:30:00Z",
"changed_by": 1
}
]
}Service Statuses
| Status | Description |
|---|---|
proposal | Service proposed, awaiting approval |
approved | Approved, work not yet started |
in_progress | Work actively underway |
on_hold | Temporarily paused |
delivered | Work completed, awaiting sign-off |
closed | Signed off and closed (terminal) |
cancelled | Cancelled before completion (terminal) |
Ticket Statuses
| Status | Description |
|---|---|
open | Newly created, awaiting assignment |
in_progress | Being worked on |
waiting | Blocked, waiting on client or third party |
resolved | Solution provided, awaiting confirmation |
closed | Confirmed resolved (terminal) |
cancelled | Cancelled (terminal) |