Skip to main content
PUT
Upsert many work sessions

Authorizations

X-API-Key
string
header
required

Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.

Query Parameters

update
string[]
required

Columns to overwrite when the row already exists. Repeat the parameter for each column: a single comma-separated value is read as one column name and fails at the database. Without the parameter the request is rejected with 400.

Body

application/json
deliverableId
string<uuid>
required

Deliverable the time was logged against.

workerId
string<uuid>
required

Person who did the work.

shopId
string<uuid>
required

Department the session belongs to.

startDate
string<date-time>
required

When the session started, in UTC.

id
string<uuid>

Unique id. Generated on create unless you supply one.

endDate
string<date-time> | null

When the session ended, in UTC. null means it is still open.

isEdited
boolean
default:false

true when someone has edited the session by hand.

lastUpdatedBy
string<uuid> | null

Who last changed the session.

shiftWorkHours
object | null

The shift the record was worked against. Break times are local wall-clock, not UTC.

externalSource
string | null

System the session came from, for example quickbase.

externalSync
string
default:not synced

Sync state for the external system.

Example:

"synced"

metadata
object

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.

Example:
createdAt
string<date-time>

When the record was created.

updatedAt
string<date-time>

When the record last changed.

Response

The upserted work sessions.

values
object[]
required