Work sessions
Save work session assignments
POST
/
deliverable
/
work-sessions
/
save
Save work session assignments
curl --request POST \
--url https://{instance}/api/v2/deliverable/work-sessions/save \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"assignments": {},
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"shouldStopEntireBatch": false
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assignments: {},
shopId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
startDate: '2023-11-07T05:31:56Z',
shouldStopEntireBatch: false
})
};
fetch('https://{instance}/api/v2/deliverable/work-sessions/save', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/deliverable/work-sessions/save"
payload = {
"assignments": {},
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"shouldStopEntireBatch": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)⌘I
Save work session assignments
curl --request POST \
--url https://{instance}/api/v2/deliverable/work-sessions/save \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"assignments": {},
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"shouldStopEntireBatch": false
}
'const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
assignments: {},
shopId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
startDate: '2023-11-07T05:31:56Z',
shouldStopEntireBatch: false
})
};
fetch('https://{instance}/api/v2/deliverable/work-sessions/save', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{instance}/api/v2/deliverable/work-sessions/save"
payload = {
"assignments": {},
"shopId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"startDate": "2023-11-07T05:31:56Z",
"shouldStopEntireBatch": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)