Developers
Work giver API reference
A contractor on Crewzy makes the key under Connections and gives it to you, with the API address. Each key belongs to one contractor and one of your organisations or sites, and sees only the jobs it sent.
Calling it
Every call goes to the API address Crewzy gives you with the key, followed by /api/v1/work-giver, with the key as a bearer token: Authorization: Bearer crewzy_wg_.... Requests and answers are JSON.
| Call | What it does, and its answers |
|---|---|
GET /connection | Checks the key: the contractor's business, the connection's name and the callback address, if set.
|
PUT /connection | Sets the https address results go to. The answer carries a new signing secret, shown only there.
|
PUT /work-orders/{ref} | Sends a new job, or changes one, under your own reference for it.
|
GET /work-orders/{ref} | Where the job stands at the contractor's end.
|
PUT /connection
| Field | Type | Rules |
|---|---|---|
callbackUrl (required) | string | Up to 500 characters |
PUT /work-orders/{ref}
| Field | Type | Rules |
|---|---|---|
title (required) | string | Up to 200 characters |
description | string | Up to 5000 characters |
priority | string | One of low, normal, high, urgent |
reference | string | Up to 100 characters |
requestedBy | string | Up to 120 characters |
dueAt | string | A date and time with its offset |
site | object | |
site.address | string | Up to 200 characters |
site.suburb | string | Up to 100 characters |
site.postcode | string | Up to 10 characters |
site.name | string | Up to 120 characters |
updatedAt | string | A date and time with its offset |
cancelled | boolean | |
status | string | One of approved, rejected, closed |
Results back
Time, the sign-off and invoices go to your callback address as signed messages. How to check the signature, and every message, are in the full reference in the help centre.