Docs
API Reference

Jobs

Create and manage service jobs (instore, offsite, or remote)

Jobs are the work you do for a customer — repairs, installations, on-site visits. A job links a customer to a scheduled time window, an optional technician, and a service location.

Naming note

Jobs are exposed under the /tickets collection. The Servicebay mobile and web apps use the term ticket internally; both terms refer to the same resource. The endpoint paths below all begin with /tickets.

Endpoints

  • GET/organisations/{orgId}/tickets — List jobs (paginated)
  • POST/organisations/{orgId}/tickets — Create job
  • GET/organisations/{orgId}/tickets/{ticketId} — Get job
  • PUT/organisations/{orgId}/tickets/{ticketId} — Update job
  • DELETE/organisations/{orgId}/tickets/{ticketId} — Delete job

List supports filtering by status, customerId, and assignedTechnician.

Service location

When creating or updating a job, set serviceLocation to one of:

ValueMeaning
instoreJob performed at the business premises
offsiteJob performed at the customer's address
remoteJob performed remotely (no physical location)

Combined with customerId, serviceTime, and endTime, this is everything an external intake form needs to book a job after a customer-lookup match.

Status

status is a free-form string. The Servicebay app commonly uses Open, In Progress, and Closed, but any value is accepted — integrators can define their own workflow states.

Calendar sync

Creating or updating a job through the API keeps the organisation calendar in sync — the same behaviour as the Servicebay mobile app.

Automatic calendar events

When both serviceTime and endTime are set, the API upserts one calendar event linked to the job (ticketId). Clearing serviceTime removes linked events. Setting only serviceTime without endTime does not create an event. Deleting a job removes its linked events too.

You do not need a separate calendar call for the standard book-a-job flow — POST the job with customer, location, and time window and the calendar entry appears automatically.

Standalone calendar events

Use the calendar endpoints directly when you need events that are not tied to a job (internal reminders, blocked-out slots, etc.).

GET
/organisations/{orgId}/tickets
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Query Parameters

limit?integer

Maximum number of items to return (max 100)

Range1 <= value <= 100
Default50
startAfter?string

Cursor for pagination - ID of the last item from previous page

status?string

Filter by ticket status

Value in

  • "Open"
  • "In Progress"
  • "Closed"
customerId?string

Filter by customer ID

assignedTechnician?string

Filter by assigned technician ID

Response Body

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/tickets"
{  "success": true,  "data": {    "tickets": [      {        "id": "string",        "ticketId": 0,        "status": "Open",        "timestamp": "2019-08-24T14:15:22Z",        "ticketClosedTimestamp": "2019-08-24T14:15:22Z",        "customerId": "string",        "customerName": "string",        "customerEmail": "user@example.com",        "customerPhone": "string",        "customerDeviceName": "string",        "customerDeviceType": "string",        "deviceId": "string",        "assignedTechnician": "string",        "serviceRequired": "string",        "serviceNotes": "string",        "serviceTime": "2019-08-24T14:15:22Z",        "endTime": "2019-08-24T14:15:22Z",        "serviceAddress": "string",        "serviceLocation": "instore",        "warrantyRepair": true,        "alternativeCustomerAddress": true,        "additionalItems": [          {}        ],        "messageRooms": {},        "stationId": "string"      }    ],    "pagination": {      "limit": 0,      "hasMore": true,      "nextCursor": "string"    }  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

POST
/organisations/{orgId}/tickets
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/organisations/string/tickets" \  -H "Content-Type: application/json" \  -d '{    "customerId": "customer123",    "customerName": "John Doe",    "customerEmail": "john@example.com",    "serviceRequired": "Device Repair",    "status": "Open"  }'
{  "success": true,  "data": {    "id": "string",    "ticketId": 0,    "status": "Open",    "timestamp": "2019-08-24T14:15:22Z",    "ticketClosedTimestamp": "2019-08-24T14:15:22Z",    "customerId": "string",    "customerName": "string",    "customerEmail": "user@example.com",    "customerPhone": "string",    "customerDeviceName": "string",    "customerDeviceType": "string",    "deviceId": "string",    "assignedTechnician": "string",    "serviceRequired": "string",    "serviceNotes": "string",    "serviceTime": "2019-08-24T14:15:22Z",    "endTime": "2019-08-24T14:15:22Z",    "serviceAddress": "string",    "serviceLocation": "instore",    "warrantyRepair": true,    "alternativeCustomerAddress": true,    "additionalItems": [      {}    ],    "messageRooms": {},    "stationId": "string"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

GET
/organisations/{orgId}/tickets/{ticketId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

ticketId*string

Ticket ID

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/organisations/string/tickets/string"
{  "success": true,  "data": {    "id": "string",    "ticketId": 0,    "status": "Open",    "timestamp": "2019-08-24T14:15:22Z",    "ticketClosedTimestamp": "2019-08-24T14:15:22Z",    "customerId": "string",    "customerName": "string",    "customerEmail": "user@example.com",    "customerPhone": "string",    "customerDeviceName": "string",    "customerDeviceType": "string",    "deviceId": "string",    "assignedTechnician": "string",    "serviceRequired": "string",    "serviceNotes": "string",    "serviceTime": "2019-08-24T14:15:22Z",    "endTime": "2019-08-24T14:15:22Z",    "serviceAddress": "string",    "serviceLocation": "instore",    "warrantyRepair": true,    "alternativeCustomerAddress": true,    "additionalItems": [      {}    ],    "messageRooms": {},    "stationId": "string"  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
PUT
/organisations/{orgId}/tickets/{ticketId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

ticketId*string

Ticket ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/organisations/string/tickets/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "success": true,  "data": {    "id": "string",    "ticketId": 0,    "status": "Open",    "timestamp": "2019-08-24T14:15:22Z",    "ticketClosedTimestamp": "2019-08-24T14:15:22Z",    "customerId": "string",    "customerName": "string",    "customerEmail": "user@example.com",    "customerPhone": "string",    "customerDeviceName": "string",    "customerDeviceType": "string",    "deviceId": "string",    "assignedTechnician": "string",    "serviceRequired": "string",    "serviceNotes": "string",    "serviceTime": "2019-08-24T14:15:22Z",    "endTime": "2019-08-24T14:15:22Z",    "serviceAddress": "string",    "serviceLocation": "instore",    "warrantyRepair": true,    "alternativeCustomerAddress": true,    "additionalItems": [      {}    ],    "messageRooms": {},    "stationId": "string"  }}
{  "success": false,  "error": "An error occurred"}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}
DELETE
/organisations/{orgId}/tickets/{ticketId}
X-API-Key<token>

API key for authentication. Get your key from the Developer Dashboard.

In: header

Path Parameters

orgId*string

Organisation ID

ticketId*string

Ticket ID

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://example.com/organisations/string/tickets/string"
{  "success": true,  "data": {    "message": "Operation completed successfully"  }}
{  "success": false,  "error": "An error occurred"}

{  "success": false,  "error": "You do not have access to this organisation"}

{  "success": false,  "error": "An error occurred"}

Machine-readable version: OpenAPI 3.1 spec.