Every call needs a service key. Create one in Proof under Settings, Service keys, then send it as Authorization: Bearer sk_.... Without the scope for the call you get a 403.
The workplaces in your environment, as Proof knows them. Workplaces are created inside Proof itself. Over the public API you list them, and you can update the name, description and internal code of one. Its identification, address and synchronisation settings are managed in Proof and do not change over the API.
The identification is the handle to use elsewhere. Setting the workplaces on a group takes identifications, not ids, and the update call has a by-identification variant for the same reason.
Changes the name, description or internal code of a workplace, and returns the
workplace as it is stored afterwards.
This is a partial update. Send only the fields you want to change: a field you
leave out keeps its stored value, and so does a field you send as null. An
empty string is how you clear description or internalCode. A body of {},
or one that repeats the stored values, is accepted and answers 200 with the
workplace unchanged. The rest of the workplace, its identification, its
address and its synchronisation settings, is managed inside Proof and does not
change.
internalCode is trimmed and has to be unique among the workplaces in your
environment, compared case-sensitively. A code that another workplace already
carries is rejected with 400 and nothing is changed. name cannot be blank,
and spaces only count as blank.
Know the workplace by its identification rather than its id? Use
Update workplace by identification below.
Path parameters
Name
Type
Required
Example
idId of the workplace, as `Get workplaces` returns it. A malformed id answers an empty 404, even without a key.
string
required
00000000-0000-0000-0000-000000000000
Request body (required)
object
Field
Type
Required
nameNew display name, 500 characters at most and not blank. Left out or `null`, the stored name stays.
string
optional
descriptionNew description, 500 characters at most. Left out or `null`, it stays. An empty string clears it.
string
optional
internalCodeYour own code, 50 characters at most, unique in your environment. Left out or `null`, it stays. An empty string clears it.
string
optional
{
"name": "Antwerp North site, phase 2",
"internalCode": "EQ-ANR-N2"
}
Responses
200OK. The workplace as stored after the update.
Field
Type
idId of the workplace.
string
identificationIdentification of the workplace. Not changed by this call.
string
nameDisplay name.
string
descriptionFree-text description, empty when none is set.
string
internalCodeYour own code for this workplace, null when none is set.
string
{
"id": "00000000-0000-0000-0000-000000000000",
"identification": "WP-0042",
"name": "Antwerp North site, phase 2",
"description": "Main northern construction site",
"internalCode": "EQ-ANR-N2"
}
400Validation failed. `errors` is keyed by field: `name` when it is blank or over 500 characters, `description` over 500 characters, `internalCode` over 50 characters or already in use by another workplace in your environment, `environmentId` with `OnlyOwnerCanModify` when the workplace belongs to another environment that shares it with you. The messages are Proof's own translation codes, so match on the field and on the part before the first `|`. A missing, empty or unparseable body gives `400` as well, with the reason in `detail` and no field keys in `errors`.
The same update as Update workplace, addressed by the workplace's
identification instead of its id. Handy when your system knows the workplace
by the handle you also use to set the workplaces on a group.
Same body, same rules, same response. Send only the fields you want to change,
an empty internalCode clears the code, and the identification itself cannot be
changed through this call. URL-encode it when it carries characters that are not
safe in a path segment.
Path parameters
Name
Type
Required
Example
identificationIdentification of the workplace, as `Get workplaces` returns it. Matched without regard to case.
string
required
WP-0042
Request body (required)
object
Field
Type
Required
nameNew display name, 500 characters at most and not blank. Left out or `null`, the stored name stays.
string
optional
descriptionNew description, 500 characters at most. Left out or `null`, it stays. An empty string clears it.
string
optional
internalCodeYour own code, 50 characters at most, unique in your environment. Left out or `null`, it stays. An empty string clears it.
string
optional
{
"description": "Main northern construction site, access via gate B"
}
Responses
200OK. The workplace as stored after the update.
Field
Type
idId of the workplace.
string
identificationIdentification of the workplace. Not changed by this call.
string
nameDisplay name.
string
descriptionFree-text description, empty when none is set.
string
internalCodeYour own code for this workplace, null when none is set.
string
{
"id": "00000000-0000-0000-0000-000000000000",
"identification": "WP-0042",
"name": "Antwerp North site",
"description": "Main northern construction site, access via gate B",
"internalCode": "EQ-ANR-N"
}
400Validation failed. Same shape and same field rules as `Update workplace`: `errors` is keyed by field, the messages are Proof's translation codes.
404No active workplace with this identification in the key's environment. Archived workplaces are not matched here; address those by id. Same plain problem document as on `Update workplace`.