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.

The OpenAPI file

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.

CallWhat it does, and its answers
GET /connectionChecks the key: the contractor's business, the connection's name and the callback address, if set.

200 The connection.

401 The key is not recognised, or was disconnected.

PUT /connectionSets the https address results go to. The answer carries a new signing secret, shown only there.

200 The address and its signing secret.

400 The address cannot be used.

PUT /work-orders/{ref}Sends a new job, or changes one, under your own reference for it.

200 The job was there and is updated.

201 The job is new.

400 The reference or the job cannot be used.

GET /work-orders/{ref}Where the job stands at the contractor's end.

200 The job.

404 Nothing with that id this key may see. Another business or enterprise answers the same.

PUT /connection

FieldTypeRules
callbackUrl (required)stringUp to 500 characters

PUT /work-orders/{ref}

FieldTypeRules
title (required)stringUp to 200 characters
descriptionstringUp to 5000 characters
prioritystringOne of low, normal, high, urgent
referencestringUp to 100 characters
requestedBystringUp to 120 characters
dueAtstringA date and time with its offset
siteobject
site.addressstringUp to 200 characters
site.suburbstringUp to 100 characters
site.postcodestringUp to 10 characters
site.namestringUp to 120 characters
updatedAtstringA date and time with its offset
cancelledboolean
statusstringOne 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.

All of the developer section