Shifts
API calls concerning shifts
Create a shift
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:18080/api/v1/shifts" \ -H "Content-Type: application/json" \ -d '{ "employees": [ "string" ], "end": "2019-08-24T14:15:22Z", "manager": "string", "start": "2019-08-24T14:15:22Z", "stockSiteId": "string", "subsidiaryId": "string" }'{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Delete by list of ids in current tenant
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
curl -X DELETE "http://localhost:18080/api/v1/shifts" \ -H "Content-Type: application/json" \ -d '[ "string" ]'{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Find by list of ids in current tenant
In: header
Query Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/shifts/find?ids=string"[
{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}
]{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Find all for current tenant
In: header
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/shifts/find-all"[
{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}
]{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Find by id in current tenant
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/shifts/find/string"{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Get page by page number and size with optional sorting based on field to sortBy and direction
In: header
Query Parameters
int32int32"ASC" | "DESC"Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/shifts/page"{
"content": [
{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}
],
"empty": true,
"first": true,
"last": true,
"number": 0,
"numberOfElements": 0,
"pageable": {
"offset": 0,
"pageNumber": 0,
"pageSize": 0,
"paged": true,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"unpaged": true
},
"size": 0,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"totalElements": 0,
"totalPages": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Get shift statistics
In: header
Query Parameters
date-timedate-timeResponse Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/shifts/stats"{
"countsByStatus": {
"property1": 0,
"property2": 0
},
"totalShifts": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Get page by page number and size with optional sorting based on field to sortBy and direction
In: header
Query Parameters
int32int32"ASC" | "DESC"Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/shifts/user/page?pageNumber=0"{
"content": [
{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}
],
"empty": true,
"first": true,
"last": true,
"number": 0,
"numberOfElements": 0,
"pageable": {
"offset": 0,
"pageNumber": 0,
"pageSize": 0,
"paged": true,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"unpaged": true
},
"size": 0,
"sort": {
"empty": true,
"sorted": true,
"unsorted": true
},
"totalElements": 0,
"totalPages": 0
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Update a shift
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "http://localhost:18080/api/v1/shifts/string" \ -H "Content-Type: application/json" \ -d '{ "employees": [ "string" ], "end": "2019-08-24T14:15:22Z", "manager": "string", "start": "2019-08-24T14:15:22Z", "stockSiteId": "string", "subsidiaryId": "string" }'{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Delete by id in current tenant
In: header
Path Parameters
Response Body
application/json
application/json
application/json
curl -X DELETE "http://localhost:18080/api/v1/shifts/string"{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Add sales orders to shift
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "http://localhost:18080/api/v1/shifts/string/add-sales-orders" \ -H "Content-Type: application/json" \ -d '[ "string" ]'{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Approve a shift
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "http://localhost:18080/api/v1/shifts/string/approve"{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Approve waste entry of a shift
In: header
Path Parameters
Query Parameters
falseResponse Body
application/json
application/json
application/json
application/json
curl -X PATCH "http://localhost:18080/api/v1/shifts/string/approve-waste/string"{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Cancel a shift
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "http://localhost:18080/api/v1/shifts/string/cancel"{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Comment on a shift
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
curl -X POST "http://localhost:18080/api/v1/shifts/string/comment" \ -H "Content-Type: application/json" \ -d 'string'{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Unapprove a shift
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "http://localhost:18080/api/v1/shifts/string/unapprove"{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Unapprove waste entry of a shift
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X PATCH "http://localhost:18080/api/v1/shifts/string/unapprove-waste/string"{
"approvedBy": "string",
"canceled": true,
"created": "2019-08-24T14:15:22Z",
"createdBy": "string",
"employees": [
"string"
],
"end": "2019-08-24T14:15:22Z",
"events": [
{
"authorId": "string",
"date": "2019-08-24T14:15:22Z",
"description": "string",
"id": "string",
"type": "CREATE"
}
],
"id": "string",
"manager": "string",
"note": "string",
"salesOrders": [
"string"
],
"shiftStatus": "PLANNED",
"start": "2019-08-24T14:15:22Z",
"stockSiteId": "string",
"subsidiaryId": "string",
"tenantId": "string",
"updated": "2019-08-24T14:15:22Z",
"updatedBy": "string",
"waste": [
"string"
]
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}Get waste analysis for shift
In: header
Path Parameters
Response Body
application/json
application/json
application/json
application/json
curl -X GET "http://localhost:18080/api/v1/shifts/string/waste-analysis"{
"property1": {
"children": [
{}
],
"delta": 0.1,
"expectedUse": 0.1,
"imageAssets": [
{
"blobId": "string",
"created": "2019-08-24T14:15:22Z",
"extension": "string",
"fileSize": 0,
"name": "string",
"type": "IMAGE"
}
],
"productId": "string",
"productName": "string",
"totalCost": 0.1,
"waste": 0.1
},
"property2": {
"children": [
{}
],
"delta": 0.1,
"expectedUse": 0.1,
"imageAssets": [
{
"blobId": "string",
"created": "2019-08-24T14:15:22Z",
"extension": "string",
"fileSize": 0,
"name": "string",
"type": "IMAGE"
}
],
"productId": "string",
"productName": "string",
"totalCost": 0.1,
"waste": 0.1
}
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}{
"detail": "string",
"time": "2019-08-24T14:15:22Z",
"title": "string"
}