Timesheets
Get a timesheet record
Fetch one timesheet record by id.
GET
/
timesheet
/
{id}
Get a timesheet record
curl --request GET \
--url https://{instance}/api/v2/timesheet/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://{instance}/api/v2/timesheet/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/timesheet/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "attendance",
"workerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shiftWorkHours": {
"startTime": "08:00",
"endTime": "17:00",
"breaks": [
{
"startTime": "12:00",
"durationInSec": 1800
}
],
"timezone": "America/New_York"
},
"breakTimeInSec": 123,
"payTypes": {
"REG": 28800,
"OT": 3600
},
"isEdited": true,
"lastUpdatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"costCode": "WELD-100",
"unionCode": "LOCAL-7"
},
"externalSource": "<string>",
"externalSync": "synced",
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buildOrderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"overheadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"rawStart": "2023-11-07T05:31:56Z",
"rawEnd": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}Authorizations
Organization-scoped API key. Create one in the BuildingSwell app under Organization settings, API keys.
Path Parameters
Record id.
Query Parameters
Fields to return. Comma-separated or repeated parameters are equivalent; an explicit selection includes only requested fields. Nested JSON paths are supported.
Response
The timesheet record.
Every time-tracking record in one place: attendance check-ins and deliverable work sessions, read through a single shape.
Show child attributes
Show child attributes
⌘I
Get a timesheet record
curl --request GET \
--url https://{instance}/api/v2/timesheet/{id} \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://{instance}/api/v2/timesheet/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/timesheet/{id}"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text){
"value": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organizationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"type": "attendance",
"workerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"endDate": "2023-11-07T05:31:56Z",
"deliverableId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"shiftWorkHours": {
"startTime": "08:00",
"endTime": "17:00",
"breaks": [
{
"startTime": "12:00",
"durationInSec": 1800
}
],
"timezone": "America/New_York"
},
"breakTimeInSec": 123,
"payTypes": {
"REG": 28800,
"OT": 3600
},
"isEdited": true,
"lastUpdatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"metadata": {
"costCode": "WELD-100",
"unionCode": "LOCAL-7"
},
"externalSource": "<string>",
"externalSync": "synced",
"stageId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"buildOrderId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"overheadId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"rawStart": "2023-11-07T05:31:56Z",
"rawEnd": "2023-11-07T05:31:56Z"
}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}{
"error": {
"message": "<string>",
"code": "BAD_REQUEST",
"requestId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>",
"code": "<string>"
}
],
"missingPermissions": [
"<string>"
]
},
"context": {}
}