Skip to content

API docs

How to call the Ops API with a token.

Base URL

Every path in these docs starts here.

Authentication

Send the token in the Authorization header.

Header
Authorization: Bearer {token}

Make a token on the page API tokens

Scopes

A token has one scope for each resource and operation, and the scope of the app.

Resource Read Write Delete
Customers customers:read customers:write customers:delete
Invoices invoices:read invoices:write invoices:delete
Parts parts:read parts:write parts:delete
Sites sites:read sites:write sites:delete
Stock movements stock-movements:read stock-movements:write stock-movements:delete
Technicians technicians:read technicians:write technicians:delete
Work orders work-orders:read work-orders:write work-orders:delete

app:ops is always on the token. Write does not include Read. Older tokens can carry read, write, delete for all resources.

Rate limit

60 requests in one minute for each token. The next request gets 429.

Lists

search
Text to find.
filter[field]
Filter by one field. Use filter[field]=value for one value, filter[field]=a,b for a list, filter[field][from] and filter[field][to] for a range, and filter[field]=null or not_null for a null check.
sort
A field. Add - for descending.
page
Starts at 1.
per_page
25 by default, 100 at most.

Errors

Every error is JSON.

Error body
{"message": "..."}
Code Meaning
401 No token, or the token is unknown, revoked or expired.
403 The token has no scope for this call, or no access to this app.
404 The record does not exist.
422 The input is not valid. The body names each field.
429 Too many requests in one minute.

Customers

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /customers customers:read List the customers of the ops app.
GET /customers/{id} customers:read Get one customers of the ops app by its id.
POST /customers customers:write Create one customers in the ops app.
PATCH /customers/{id} customers:write Change the given fields of one customers of the ops app.
DELETE /customers/{id} customers:delete Delete one customers of the ops app.
GET /customers/{id}/comments customers:read List the comments of one customers of the ops app, newest first.
POST /customers/{id}/comments customers:write Add a comment to one customers of the ops app. The body is plain text, and each mentions id is a member of the ops app.
DELETE /customers/{id}/comments/{comment} customers:delete Delete one comment of one customers of the ops app.
GET /customers/{id}/files customers:read List the files of one customers of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /customers/{id}/files customers:write Add one file to one customers of the ops app.
GET /customers/{id}/files/{file} customers:read Download one file of one customers of the ops app. The answer is the file content as an attachment, not JSON.
DELETE /customers/{id}/files/{file} customers:delete Delete one file of one customers of the ops app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
name string, max 120 Yes
type enum: residential, commercial No Can be null.
email email, max 255 No Can be null.
phone string, max 40 No Can be null.
notes string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
type Exact filter[type]=residential

Sorts and search

Sort by name, created_at. Search matches name, email, phone.

Examples

List the customers of the ops app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers?sort=-name"
Get one customers of the ops app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers/$ID"
Create one customers in the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example"}' "https://demo.velosyd.com/ops/api/v1/customers"
Change the given fields of one customers of the ops app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example"}' "https://demo.velosyd.com/ops/api/v1/customers/$ID"
Delete one customers of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers/$ID"
List the comments of one customers of the ops app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers/$ID/comments"
Add a comment to one customers of the ops app. The body is plain text, and each mentions id is a member of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/ops/api/v1/customers/$ID/comments"
Delete one comment of one customers of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers/$ID/comments/$COMMENT"
List the files of one customers of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers/$ID/files"
Add one file to one customers of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/ops/api/v1/customers/$ID/files"
Download one file of one customers of the ops app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers/$ID/files/$FILE"
Delete one file of one customers of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/customers/$ID/files/$FILE"

Invoices

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /invoices invoices:read List the invoices of the ops app.
GET /invoices/{id} invoices:read Get one invoices of the ops app by its id.
POST /invoices invoices:write Create one invoices in the ops app.
PATCH /invoices/{id} invoices:write Change the given fields of one invoices of the ops app.
POST /invoices/{id}/mark-paid invoices:write Run the mark-paid action on one invoices of the ops app.
DELETE /invoices/{id} invoices:delete Delete one invoices of the ops app.
GET /invoices/{id}/comments invoices:read List the comments of one invoices of the ops app, newest first.
POST /invoices/{id}/comments invoices:write Add a comment to one invoices of the ops app. The body is plain text, and each mentions id is a member of the ops app.
DELETE /invoices/{id}/comments/{comment} invoices:delete Delete one comment of one invoices of the ops app.
GET /invoices/{id}/files invoices:read List the files of one invoices of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /invoices/{id}/files invoices:write Add one file to one invoices of the ops app.
GET /invoices/{id}/files/{file} invoices:read Download one file of one invoices of the ops app. The answer is the file content as an attachment, not JSON.
DELETE /invoices/{id}/files/{file} invoices:delete Delete one file of one invoices of the ops app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
number string, max 20 No Can be null.
customer_id uuid Yes
work_order_id uuid No Can be null.
status enum: draft, sent, paid, void No Can be null.
issued_at date-time Yes
due_at date-time Yes
paid_at date-time No Can be null.
total decimal string No Read only.
notes string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
status Exact filter[status]=draft
customer_id Exact filter[customer_id]=019a0000-0000-7000-8000-000000000000

Sorts and search

Sort by number, issued_at, due_at, created_at. Search matches number, notes.

Examples

List the invoices of the ops app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices?sort=-number"
Get one invoices of the ops app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID"
Create one invoices in the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"customer_id":"019a0000-0000-7000-8000-000000000000","issued_at":"Example","due_at":"Example","lines.*.description":"Example","lines.*.quantity":100,"lines.*.unit_price":100}' "https://demo.velosyd.com/ops/api/v1/invoices"
Change the given fields of one invoices of the ops app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"number":"Example"}' "https://demo.velosyd.com/ops/api/v1/invoices/$ID"
Run the mark-paid action on one invoices of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID/mark-paid"
Delete one invoices of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID"
List the comments of one invoices of the ops app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID/comments"
Add a comment to one invoices of the ops app. The body is plain text, and each mentions id is a member of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/ops/api/v1/invoices/$ID/comments"
Delete one comment of one invoices of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID/comments/$COMMENT"
List the files of one invoices of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID/files"
Add one file to one invoices of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/ops/api/v1/invoices/$ID/files"
Download one file of one invoices of the ops app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID/files/$FILE"
Delete one file of one invoices of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/invoices/$ID/files/$FILE"

Parts

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /parts parts:read List the parts of the ops app.
GET /parts/{id} parts:read Get one parts of the ops app by its id.
POST /parts parts:write Create one parts in the ops app.
PATCH /parts/{id} parts:write Change the given fields of one parts of the ops app.
DELETE /parts/{id} parts:delete Delete one parts of the ops app.
GET /parts/{id}/comments parts:read List the comments of one parts of the ops app, newest first.
POST /parts/{id}/comments parts:write Add a comment to one parts of the ops app. The body is plain text, and each mentions id is a member of the ops app.
DELETE /parts/{id}/comments/{comment} parts:delete Delete one comment of one parts of the ops app.
GET /parts/{id}/files parts:read List the files of one parts of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /parts/{id}/files parts:write Add one file to one parts of the ops app.
GET /parts/{id}/files/{file} parts:read Download one file of one parts of the ops app. The answer is the file content as an attachment, not JSON.
DELETE /parts/{id}/files/{file} parts:delete Delete one file of one parts of the ops app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
sku string, max 40 Yes
name string, max 120 Yes
unit_price decimal string Yes
quantity_on_hand integer No Can be null.
minimum_quantity integer No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

This resource has no filters.

Sorts and search

Sort by sku, name, quantity_on_hand, created_at. Search matches sku, name.

Examples

List the parts of the ops app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts?sort=-sku"
Get one parts of the ops app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts/$ID"
Create one parts in the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"sku":"Example","name":"Example","unit_price":100}' "https://demo.velosyd.com/ops/api/v1/parts"
Change the given fields of one parts of the ops app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"sku":"Example"}' "https://demo.velosyd.com/ops/api/v1/parts/$ID"
Delete one parts of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts/$ID"
List the comments of one parts of the ops app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts/$ID/comments"
Add a comment to one parts of the ops app. The body is plain text, and each mentions id is a member of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/ops/api/v1/parts/$ID/comments"
Delete one comment of one parts of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts/$ID/comments/$COMMENT"
List the files of one parts of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts/$ID/files"
Add one file to one parts of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/ops/api/v1/parts/$ID/files"
Download one file of one parts of the ops app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts/$ID/files/$FILE"
Delete one file of one parts of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/parts/$ID/files/$FILE"

Sites

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /sites sites:read List the sites of the ops app.
GET /sites/{id} sites:read Get one sites of the ops app by its id.
POST /sites sites:write Create one sites in the ops app.
PATCH /sites/{id} sites:write Change the given fields of one sites of the ops app.
DELETE /sites/{id} sites:delete Delete one sites of the ops app.
GET /sites/{id}/comments sites:read List the comments of one sites of the ops app, newest first.
POST /sites/{id}/comments sites:write Add a comment to one sites of the ops app. The body is plain text, and each mentions id is a member of the ops app.
DELETE /sites/{id}/comments/{comment} sites:delete Delete one comment of one sites of the ops app.
GET /sites/{id}/files sites:read List the files of one sites of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /sites/{id}/files sites:write Add one file to one sites of the ops app.
GET /sites/{id}/files/{file} sites:read Download one file of one sites of the ops app. The answer is the file content as an attachment, not JSON.
DELETE /sites/{id}/files/{file} sites:delete Delete one file of one sites of the ops app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
customer_id uuid Yes
name string, max 120 Yes
street string, max 255 Yes
city string, max 255 Yes
postal_code string, max 20 Yes
access_notes string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
customer_id Exact filter[customer_id]=019a0000-0000-7000-8000-000000000000

Sorts and search

Sort by name, city, created_at. Search matches name, city.

Examples

List the sites of the ops app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites?sort=-name"
Get one sites of the ops app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites/$ID"
Create one sites in the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"customer_id":"019a0000-0000-7000-8000-000000000000","name":"Example","street":"Example","city":"Example","postal_code":"Example"}' "https://demo.velosyd.com/ops/api/v1/sites"
Change the given fields of one sites of the ops app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"customer_id":"019a0000-0000-7000-8000-000000000000"}' "https://demo.velosyd.com/ops/api/v1/sites/$ID"
Delete one sites of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites/$ID"
List the comments of one sites of the ops app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites/$ID/comments"
Add a comment to one sites of the ops app. The body is plain text, and each mentions id is a member of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/ops/api/v1/sites/$ID/comments"
Delete one comment of one sites of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites/$ID/comments/$COMMENT"
List the files of one sites of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites/$ID/files"
Add one file to one sites of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/ops/api/v1/sites/$ID/files"
Download one file of one sites of the ops app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites/$ID/files/$FILE"
Delete one file of one sites of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/sites/$ID/files/$FILE"

Stock movements

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /stock-movements stock-movements:read List the stock-movements of the ops app.
GET /stock-movements/{id} stock-movements:read Get one stock-movements of the ops app by its id.
POST /stock-movements stock-movements:write Create one stock-movements in the ops app.
PATCH /stock-movements/{id} stock-movements:write Change the given fields of one stock-movements of the ops app.
DELETE /stock-movements/{id} stock-movements:delete Delete one stock-movements of the ops app.
GET /stock-movements/{id}/comments stock-movements:read List the comments of one stock-movements of the ops app, newest first.
POST /stock-movements/{id}/comments stock-movements:write Add a comment to one stock-movements of the ops app. The body is plain text, and each mentions id is a member of the ops app.
DELETE /stock-movements/{id}/comments/{comment} stock-movements:delete Delete one comment of one stock-movements of the ops app.
GET /stock-movements/{id}/files stock-movements:read List the files of one stock-movements of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /stock-movements/{id}/files stock-movements:write Add one file to one stock-movements of the ops app.
GET /stock-movements/{id}/files/{file} stock-movements:read Download one file of one stock-movements of the ops app. The answer is the file content as an attachment, not JSON.
DELETE /stock-movements/{id}/files/{file} stock-movements:delete Delete one file of one stock-movements of the ops app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
part_id uuid Yes
work_order_id uuid No Can be null.
type enum: in, out Yes
quantity integer Yes
reference string, max 60 Yes
note string, max 255 No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
part_id Exact filter[part_id]=019a0000-0000-7000-8000-000000000000
work_order_id Exact filter[work_order_id]=019a0000-0000-7000-8000-000000000000
type Exact filter[type]=in

Sorts and search

Sort by quantity, created_at. Search matches reference, note.

Examples

List the stock-movements of the ops app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements?sort=-quantity"
Get one stock-movements of the ops app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID"
Create one stock-movements in the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"part_id":"019a0000-0000-7000-8000-000000000000","type":"in","quantity":1,"reference":"Example"}' "https://demo.velosyd.com/ops/api/v1/stock-movements"
Change the given fields of one stock-movements of the ops app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"part_id":"019a0000-0000-7000-8000-000000000000"}' "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID"
Delete one stock-movements of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID"
List the comments of one stock-movements of the ops app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID/comments"
Add a comment to one stock-movements of the ops app. The body is plain text, and each mentions id is a member of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID/comments"
Delete one comment of one stock-movements of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID/comments/$COMMENT"
List the files of one stock-movements of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID/files"
Add one file to one stock-movements of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID/files"
Download one file of one stock-movements of the ops app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID/files/$FILE"
Delete one file of one stock-movements of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/stock-movements/$ID/files/$FILE"

Technicians

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /technicians technicians:read List the technicians of the ops app.
GET /technicians/{id} technicians:read Get one technicians of the ops app by its id.
POST /technicians technicians:write Create one technicians in the ops app.
PATCH /technicians/{id} technicians:write Change the given fields of one technicians of the ops app.
DELETE /technicians/{id} technicians:delete Delete one technicians of the ops app.
GET /technicians/{id}/comments technicians:read List the comments of one technicians of the ops app, newest first.
POST /technicians/{id}/comments technicians:write Add a comment to one technicians of the ops app. The body is plain text, and each mentions id is a member of the ops app.
DELETE /technicians/{id}/comments/{comment} technicians:delete Delete one comment of one technicians of the ops app.
GET /technicians/{id}/files technicians:read List the files of one technicians of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /technicians/{id}/files technicians:write Add one file to one technicians of the ops app.
GET /technicians/{id}/files/{file} technicians:read Download one file of one technicians of the ops app. The answer is the file content as an attachment, not JSON.
DELETE /technicians/{id}/files/{file} technicians:delete Delete one file of one technicians of the ops app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
name string, max 120 Yes
email email, max 255 Yes
phone string, max 40 No Can be null.
skill enum: hvac, electrical, plumbing, general No Can be null.
hourly_rate decimal string Yes
is_active boolean No Can be null.
user_id integer No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
skill Exact filter[skill]=hvac
is_active Exact filter[is_active]=1

Sorts and search

Sort by name, created_at. Search matches name, email.

Examples

List the technicians of the ops app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians?sort=-name"
Get one technicians of the ops app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians/$ID"
Create one technicians in the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example","email":"name@example.com","hourly_rate":100}' "https://demo.velosyd.com/ops/api/v1/technicians"
Change the given fields of one technicians of the ops app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"name":"Example"}' "https://demo.velosyd.com/ops/api/v1/technicians/$ID"
Delete one technicians of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians/$ID"
List the comments of one technicians of the ops app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians/$ID/comments"
Add a comment to one technicians of the ops app. The body is plain text, and each mentions id is a member of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/ops/api/v1/technicians/$ID/comments"
Delete one comment of one technicians of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians/$ID/comments/$COMMENT"
List the files of one technicians of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians/$ID/files"
Add one file to one technicians of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/ops/api/v1/technicians/$ID/files"
Download one file of one technicians of the ops app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians/$ID/files/$FILE"
Delete one file of one technicians of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/technicians/$ID/files/$FILE"

Work orders

Operations, fields and examples.

Operations

Method Path Scope What it does
GET /work-orders work-orders:read List the work-orders of the ops app.
GET /work-orders/{id} work-orders:read Get one work-orders of the ops app by its id.
POST /work-orders work-orders:write Create one work-orders in the ops app.
PATCH /work-orders/{id} work-orders:write Change the given fields of one work-orders of the ops app.
DELETE /work-orders/{id} work-orders:delete Delete one work-orders of the ops app.
GET /work-orders/{id}/comments work-orders:read List the comments of one work-orders of the ops app, newest first.
POST /work-orders/{id}/comments work-orders:write Add a comment to one work-orders of the ops app. The body is plain text, and each mentions id is a member of the ops app.
DELETE /work-orders/{id}/comments/{comment} work-orders:delete Delete one comment of one work-orders of the ops app.
GET /work-orders/{id}/files work-orders:read List the files of one work-orders of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
POST /work-orders/{id}/files work-orders:write Add one file to one work-orders of the ops app.
GET /work-orders/{id}/files/{file} work-orders:read Download one file of one work-orders of the ops app. The answer is the file content as an attachment, not JSON.
DELETE /work-orders/{id}/files/{file} work-orders:delete Delete one file of one work-orders of the ops app.

Each record has comments and files. Post a comment with body (plain text, at most 5000 characters) and mentions (a list of user ids of active members of the app, at most 20). Upload one file in the multipart field file, at most 10 MB. The download is an attachment. The scope of the resource applies: read to list and download, write to post and upload, delete to delete.

Fields

Field Type Required on create Note
id uuid No Read only.
number string, max 20 No Can be null.
title string, max 160 Yes
description string No Can be null.
customer_id uuid Yes
site_id uuid No Can be null.
technician_id uuid No Can be null.
dispatcher_id integer No Can be null.
status enum: new, scheduled, in-progress, on-hold, completed, cancelled No Can be null.
priority enum: low, normal, high, urgent No Can be null.
scheduled_at date-time No Can be null.
due_at date-time No Can be null.
completed_at date-time No Read only.
labor_hours decimal string No Can be null.
created_at date-time No Read only.
updated_at date-time No Read only.

Filters

Filter Type Example
status Exact filter[status]=new
priority Exact filter[priority]=low
customer_id Exact filter[customer_id]=019a0000-0000-7000-8000-000000000000
technician_id Exact filter[technician_id]=019a0000-0000-7000-8000-000000000000

Sorts and search

Sort by number, scheduled_at, due_at, created_at. Search matches number, title.

Examples

List the work-orders of the ops app.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders?sort=-number"
Get one work-orders of the ops app by its id.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID"
Create one work-orders in the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"title":"Example","customer_id":"019a0000-0000-7000-8000-000000000000"}' "https://demo.velosyd.com/ops/api/v1/work-orders"
Change the given fields of one work-orders of the ops app.
curl -X PATCH -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"number":"Example"}' "https://demo.velosyd.com/ops/api/v1/work-orders/$ID"
Delete one work-orders of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID"
List the comments of one work-orders of the ops app, newest first.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID/comments"
Add a comment to one work-orders of the ops app. The body is plain text, and each mentions id is a member of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" -d '{"body":"Example"}' "https://demo.velosyd.com/ops/api/v1/work-orders/$ID/comments"
Delete one comment of one work-orders of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID/comments/$COMMENT"
List the files of one work-orders of the ops app, newest first. The answer gives the metadata and the REST download path, not the file content.
curl -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID/files"
Add one file to one work-orders of the ops app.
curl -X POST -H "Authorization: Bearer $TOKEN" -F "file=@report.pdf" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID/files"
Download one file of one work-orders of the ops app. The answer is the file content as an attachment, not JSON.
curl -OJ -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID/files/$FILE"
Delete one file of one work-orders of the ops app.
curl -X DELETE -H "Authorization: Bearer $TOKEN" "https://demo.velosyd.com/ops/api/v1/work-orders/$ID/files/$FILE"