Create a work session
Create one work session, or several at once by sending an array.
Leave shiftWorkHours out and BuildingSwell fills it from the person’s shop shift for startDate, stamping the shop timezone onto it. Leave metadata.costCode out and it is resolved from the deliverable, then its station, then its ancestors, then the project, then the route; if none of those carry one, the key is left off entirely.
One person can hold only one open session per deliverable. A second attempt comes back as 409.
Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Body
- object
- object[]
Leave shiftWorkHours out and BuildingSwell fills it from the person's shop shift for startDate, stamping the shop timezone onto it. Leave metadata.costCode out and it is resolved from the deliverable, then its station, then its ancestors, then the project, then the route; if none of those carry one, the key is left off entirely.
One person can hold only one open session per deliverable. A second attempt comes back as 409.
Deliverable the time was logged against.
Person who did the work.
Department the session belongs to.
When the session started, in UTC.
Unique id. Generated on create unless you supply one.
When the session ended, in UTC. null means it is still open.
true when someone has edited the session by hand.
Who last changed the session.
The shift the record was worked against. Break times are local wall-clock, not UTC.
System the session came from, for example quickbase.
Sync state for the external system.
"synced"
Free-form key-value store. No key is guaranteed to be present, and a missing key is not the same as a null one. See the resource guide for which paths populate costCode and unionCode.
When the record was created.
When the record last changed.
Response
The created work session. An array request returns values instead of value.
- Option 1
- Option 2
Time one person logged against one deliverable. An open session has no endDate.