API Reference

Services

Manage reusable service templates with pricing and warranty defaults

A service is a reusable template for the work you do — "Standard Diagnostic", "Battery Replacement", "Annual Tune-Up". Each service carries its own pricing model (fixed, hourly rate, or variable) and optional warranty defaults that flow through to quotes and invoices.

Endpoints

  • GET/organisations/{orgId}/services — List service templates (paginated)
  • POST/organisations/{orgId}/services — Create service template
  • GET/organisations/{orgId}/services/{serviceId} — Get service
  • PUT/organisations/{orgId}/services/{serviceId} — Update service
  • DELETE/organisations/{orgId}/services/{serviceId} — Delete service

List supports search (matches title and description) plus standard cursor pagination via limit and startAfter.

Pricing models

priceTypeMeaning
fixedA flat price regardless of duration
rateA per-unit rate — set priceTimeRate to hour, day, week, or month
variableQuoted on a per-job basis; the price field is treated as a starting point
GET
/organisations/{orgId}/services
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)

Default50
Range1 <= value <= 100
startAfter?string

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

search?string

Response Body

application/json

application/json

application/json

curl -X GET "https://developer.servicebay.io/api/v1/organisations/string/services"
{
  "success": true,
  "data": {
    "services": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "notes": "string",
        "priceType": "fixed",
        "price": 0,
        "priceTimeRate": "hour",
        "warranty": true,
        "warrantyDuration": 0,
        "warrantyPeriod": "day",
        "quantity": 0,
        "taxRateId": "string",
        "index": 0,
        "createdAt": "2019-08-24T14:15:22Z"
      }
    ],
    "pagination": {
      "limit": 0,
      "hasMore": true,
      "nextCursor": "string"
    }
  }
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
POST
/organisations/{orgId}/services
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://developer.servicebay.io/api/v1/organisations/string/services" \  -H "Content-Type: application/json" \  -d '{    "title": "string"  }'
{
  "success": true,
  "data": {
    "id": "string",
    "title": "string",
    "description": "string",
    "notes": "string",
    "priceType": "fixed",
    "price": 0,
    "priceTimeRate": "hour",
    "warranty": true,
    "warrantyDuration": 0,
    "warrantyPeriod": "day",
    "quantity": 0,
    "taxRateId": "string",
    "index": 0,
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
GET
/organisations/{orgId}/services/{serviceId}
X-API-Key<token>

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

In: header

Path Parameters

orgId*string

Organisation ID

serviceId*string

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://developer.servicebay.io/api/v1/organisations/string/services/string"
{
  "success": true,
  "data": {
    "id": "string",
    "title": "string",
    "description": "string",
    "notes": "string",
    "priceType": "fixed",
    "price": 0,
    "priceTimeRate": "hour",
    "warranty": true,
    "warrantyDuration": 0,
    "warrantyPeriod": "day",
    "quantity": 0,
    "taxRateId": "string",
    "index": 0,
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
PUT
/organisations/{orgId}/services/{serviceId}
X-API-Key<token>

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

In: header

Path Parameters

orgId*string

Organisation ID

serviceId*string

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://developer.servicebay.io/api/v1/organisations/string/services/string" \  -H "Content-Type: application/json" \  -d '{    "title": "string"  }'
{
  "success": true,
  "data": {
    "id": "string",
    "title": "string",
    "description": "string",
    "notes": "string",
    "priceType": "fixed",
    "price": 0,
    "priceTimeRate": "hour",
    "warranty": true,
    "warrantyDuration": 0,
    "warrantyPeriod": "day",
    "quantity": 0,
    "taxRateId": "string",
    "index": 0,
    "createdAt": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
DELETE
/organisations/{orgId}/services/{serviceId}
X-API-Key<token>

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

In: header

Path Parameters

orgId*string

Organisation ID

serviceId*string

Response Body

application/json

application/json

application/json

application/json

curl -X DELETE "https://developer.servicebay.io/api/v1/organisations/string/services/string"
{
  "success": true,
  "data": {
    "message": "Operation completed successfully"
  }
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}
{
  "success": false,
  "error": "An error occurred"
}

Machine-readable version: OpenAPI 3.1 spec.

On this page