API Reference

Quotes

Create, send, and track quotes linked to a customer or job

Quotes are price proposals you send to customers. A quote can stand alone or be linked to an existing job (ticketId). Each quote tracks its own send, view, and accept dates so you can build customer-facing dashboards.

Endpoints

  • GET/organisations/{orgId}/quotes — List quotes (paginated)
  • POST/organisations/{orgId}/quotes — Create quote
  • GET/organisations/{orgId}/quotes/{quoteId} — Get quote
  • PUT/organisations/{orgId}/quotes/{quoteId} — Update quote
  • DELETE/organisations/{orgId}/quotes/{quoteId} — Delete quote

List supports customerId, ticketId, and accepted (true/false) filters.

Auto-incrementing index

When you create a quote, the server assigns the next available index automatically. You can override it by setting index in the request body, but we recommend letting Servicebay manage numbering so the sequence stays contiguous.

The services and inventoryItems arrays both hold LineItem objects (title, description, price, quantity, taxRateId), and discount takes either a percentage or fixed value — see the full schemas in the rendered operations below.

GET
/organisations/{orgId}/quotes
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

customerId?string
ticketId?string
accepted?boolean

Response Body

application/json

curl -X GET "https://developer.servicebay.io/api/v1/organisations/string/quotes"
{
  "success": true,
  "data": {
    "quotes": [
      {
        "id": "string",
        "index": 0,
        "ticketId": "string",
        "customerId": "string",
        "customerName": "string",
        "title": "string",
        "message": "string",
        "terms": "string",
        "totalPrice": 0,
        "depositRequest": true,
        "depositAmount": 0,
        "depositDueDays": 0,
        "balanceAmount": 0,
        "balanceDueDays": 0,
        "dueDays": 0,
        "expirationDays": 0,
        "expirationDate": "2019-08-24T14:15:22Z",
        "neverExpires": true,
        "accepted": true,
        "invoiced": true,
        "viewedByCustomer": true,
        "viewedDate": "2019-08-24T14:15:22Z",
        "acceptedDate": "2019-08-24T14:15:22Z",
        "invoicedDate": "2019-08-24T14:15:22Z",
        "sentDate": "2019-08-24T14:15:22Z",
        "createdOn": "2019-08-24T14:15:22Z",
        "services": [
          {
            "id": "string",
            "title": "string",
            "description": "string",
            "price": 0,
            "quantity": 0,
            "taxRateId": "string"
          }
        ],
        "inventoryItems": [
          {
            "id": "string",
            "title": "string",
            "description": "string",
            "price": 0,
            "quantity": 0,
            "taxRateId": "string"
          }
        ],
        "discount": {
          "type": "percentage",
          "value": 0,
          "reason": "string"
        }
      }
    ],
    "pagination": {
      "limit": 0,
      "hasMore": true,
      "nextCursor": "string"
    }
  }
}
POST
/organisations/{orgId}/quotes
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

curl -X POST "https://developer.servicebay.io/api/v1/organisations/string/quotes" \  -H "Content-Type: application/json" \  -d '{    "customerId": "string"  }'
{
  "success": true,
  "data": {
    "id": "string",
    "index": 0,
    "ticketId": "string",
    "customerId": "string",
    "customerName": "string",
    "title": "string",
    "message": "string",
    "terms": "string",
    "totalPrice": 0,
    "depositRequest": true,
    "depositAmount": 0,
    "depositDueDays": 0,
    "balanceAmount": 0,
    "balanceDueDays": 0,
    "dueDays": 0,
    "expirationDays": 0,
    "expirationDate": "2019-08-24T14:15:22Z",
    "neverExpires": true,
    "accepted": true,
    "invoiced": true,
    "viewedByCustomer": true,
    "viewedDate": "2019-08-24T14:15:22Z",
    "acceptedDate": "2019-08-24T14:15:22Z",
    "invoicedDate": "2019-08-24T14:15:22Z",
    "sentDate": "2019-08-24T14:15:22Z",
    "createdOn": "2019-08-24T14:15:22Z",
    "services": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "price": 0,
        "quantity": 0,
        "taxRateId": "string"
      }
    ],
    "inventoryItems": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "price": 0,
        "quantity": 0,
        "taxRateId": "string"
      }
    ],
    "discount": {
      "type": "percentage",
      "value": 0,
      "reason": "string"
    }
  }
}
{
  "success": false,
  "error": "An error occurred"
}
GET
/organisations/{orgId}/quotes/{quoteId}
X-API-Key<token>

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

In: header

Path Parameters

orgId*string

Organisation ID

quoteId*string

Response Body

application/json

application/json

curl -X GET "https://developer.servicebay.io/api/v1/organisations/string/quotes/string"
{
  "success": true,
  "data": {
    "id": "string",
    "index": 0,
    "ticketId": "string",
    "customerId": "string",
    "customerName": "string",
    "title": "string",
    "message": "string",
    "terms": "string",
    "totalPrice": 0,
    "depositRequest": true,
    "depositAmount": 0,
    "depositDueDays": 0,
    "balanceAmount": 0,
    "balanceDueDays": 0,
    "dueDays": 0,
    "expirationDays": 0,
    "expirationDate": "2019-08-24T14:15:22Z",
    "neverExpires": true,
    "accepted": true,
    "invoiced": true,
    "viewedByCustomer": true,
    "viewedDate": "2019-08-24T14:15:22Z",
    "acceptedDate": "2019-08-24T14:15:22Z",
    "invoicedDate": "2019-08-24T14:15:22Z",
    "sentDate": "2019-08-24T14:15:22Z",
    "createdOn": "2019-08-24T14:15:22Z",
    "services": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "price": 0,
        "quantity": 0,
        "taxRateId": "string"
      }
    ],
    "inventoryItems": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "price": 0,
        "quantity": 0,
        "taxRateId": "string"
      }
    ],
    "discount": {
      "type": "percentage",
      "value": 0,
      "reason": "string"
    }
  }
}
{
  "success": false,
  "error": "An error occurred"
}
PUT
/organisations/{orgId}/quotes/{quoteId}
X-API-Key<token>

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

In: header

Path Parameters

orgId*string

Organisation ID

quoteId*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X PUT "https://developer.servicebay.io/api/v1/organisations/string/quotes/string" \  -H "Content-Type: application/json" \  -d '{    "customerId": "string"  }'
{
  "success": true,
  "data": {
    "id": "string",
    "index": 0,
    "ticketId": "string",
    "customerId": "string",
    "customerName": "string",
    "title": "string",
    "message": "string",
    "terms": "string",
    "totalPrice": 0,
    "depositRequest": true,
    "depositAmount": 0,
    "depositDueDays": 0,
    "balanceAmount": 0,
    "balanceDueDays": 0,
    "dueDays": 0,
    "expirationDays": 0,
    "expirationDate": "2019-08-24T14:15:22Z",
    "neverExpires": true,
    "accepted": true,
    "invoiced": true,
    "viewedByCustomer": true,
    "viewedDate": "2019-08-24T14:15:22Z",
    "acceptedDate": "2019-08-24T14:15:22Z",
    "invoicedDate": "2019-08-24T14:15:22Z",
    "sentDate": "2019-08-24T14:15:22Z",
    "createdOn": "2019-08-24T14:15:22Z",
    "services": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "price": 0,
        "quantity": 0,
        "taxRateId": "string"
      }
    ],
    "inventoryItems": [
      {
        "id": "string",
        "title": "string",
        "description": "string",
        "price": 0,
        "quantity": 0,
        "taxRateId": "string"
      }
    ],
    "discount": {
      "type": "percentage",
      "value": 0,
      "reason": "string"
    }
  }
}
{
  "success": false,
  "error": "An error occurred"
}
DELETE
/organisations/{orgId}/quotes/{quoteId}
X-API-Key<token>

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

In: header

Path Parameters

orgId*string

Organisation ID

quoteId*string

Response Body

application/json

application/json

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

Machine-readable version: OpenAPI 3.1 spec.

On this page