Skip to content

Service Job

The service job resource.

Base/serviceJob
GET/serviceJob

List service jobs

Retrieve a paginated list of service jobs. Filter, order, and select columns with PostgREST query parameters.

Query parameters

selectstring

Comma-separated columns to return. Defaults to all.

orderstring

Column to sort by, e.g. `createdAt.desc`.

limitinteger

Maximum rows to return.

offsetinteger

Rows to skip, for pagination.

GET/serviceJob
curl --request GET \
  --url '<your-host>/serviceJob?select=*&limit=10' \
  --header 'Authorization: Bearer <api-key>'
Response
[
  {
    "id": "abc123def456",
    "companyId": "xyz789",
    "readableId": "xyz789",
    "serviceJobKindId": "xyz789",
    "status": "string",
    "priority": "string",
    "scope": "string",
    "createdBy": "string"
  }
]
GET/serviceJob

Retrieve a service job

Fetch a single service job by filtering on `id`.

Query parameters

idstring

Match on the service job's `id`, e.g. `eq.{id}`.

GET/serviceJob
curl --request GET \
  --url '<your-host>/serviceJob?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "readableId": "xyz789",
  "serviceJobKindId": "xyz789",
  "status": "string",
  "priority": "string",
  "scope": "string",
  "createdBy": "string"
}
POST/serviceJob

Create a service job

Create a new service job.

Body parameters

readableIdstringrequired
customerIdstring

References customer.id

customerLocationIdstring

References customerLocation.id

serviceJobKindIdstringrequired
statusstringrequired
prioritystringrequired
scopestringrequired
salesOrderIdstring

References salesOrder.id

sourceReadableIdstring
notesstring
cancelReasonstring
commandIdstring
POST/serviceJob
curl --request POST \
  --url <your-host>/serviceJob \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"readableId":"xyz789","serviceJobKindId":"xyz789","status":"string","priority":"string","scope":"string"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "readableId": "xyz789",
  "serviceJobKindId": "xyz789",
  "status": "string",
  "priority": "string",
  "scope": "string",
  "createdBy": "string"
}
PATCH/serviceJob

Update a service job

Update an existing service job, matched on `id`.

Body parameters

readableIdstringrequired
customerIdstring

References customer.id

customerLocationIdstring

References customerLocation.id

serviceJobKindIdstringrequired
statusstringrequired
prioritystringrequired
scopestringrequired
salesOrderIdstring

References salesOrder.id

sourceReadableIdstring
notesstring
cancelReasonstring
commandIdstring
PATCH/serviceJob
curl --request PATCH \
  --url '<your-host>/serviceJob?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'Prefer: return=representation' \
  --data '{"readableId":"xyz789"}'
Response
{
  "id": "abc123def456",
  "companyId": "xyz789",
  "readableId": "xyz789",
  "serviceJobKindId": "xyz789",
  "status": "string",
  "priority": "string",
  "scope": "string",
  "createdBy": "string"
}
DELETE/serviceJob

Delete a service job

Delete a service job, matched on `id`. Returns 204 No Content.

Query parameters

idstring

The `id` of the service job to delete, e.g. `eq.{id}`.

DELETE/serviceJob
curl --request DELETE \
  --url '<your-host>/serviceJob?id=eq.%7Bid%7D' \
  --header 'Authorization: Bearer <api-key>'
204 No Content