upsertWorkCenter
DESTRUCTIVEUpsert work center.
POST /api/v1/resources/upsertWorkCenter
curl -X POST '<your-host>/api/v1/resources/upsertWorkCenter' \
-H 'Authorization: Bearer <api-key>' \
-H 'Content-Type: application/json' \
-d '{
"name": "string",
"description": "string",
"defaultStandardFactor": "Hours/Piece",
"laborRate": 0,
"locationId": "string",
"machineRate": 0,
"overheadRate": 0,
"_operation": "create"
}'Response
{
"id": "string"
}Parameters
ParameterType
Required. 'create' inserts a new record, 'update' modifies the existing record with this id.
"create""update"
"Hours/Piece""Hours/100 Pieces""Hours/1000 Pieces""Minutes/Piece""Minutes/100 Pieces""Minutes/1000 Pieces""Pieces/Hour""Pieces/Minute""Seconds/Piece""Total Hours""Total Minutes"
min 0
min length 1
min 0
min length 1
min 0
min 1max 9007199254740991
min 1max 9007199254740991
Input schema
schema
{
"type": "object",
"properties": {
"name": {
"type": "string",
"minLength": 1
},
"description": {
"type": "string"
},
"defaultStandardFactor": {
"type": "string",
"enum": [
"Hours/Piece",
"Hours/100 Pieces",
"Hours/1000 Pieces",
"Minutes/Piece",
"Minutes/100 Pieces",
"Minutes/1000 Pieces",
"Pieces/Hour",
"Pieces/Minute",
"Seconds/Piece",
"Total Hours",
"Total Minutes"
]
},
"departmentId": {
"type": "string"
},
"laborRate": {
"type": "number",
"minimum": 0
},
"locationId": {
"type": "string",
"minLength": 1
},
"machineRate": {
"type": "number",
"minimum": 0
},
"overheadRate": {
"type": "number",
"minimum": 0
},
"processes": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"shifts": {
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"alwaysOn": {
"type": "boolean"
},
"batchCapacity": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"minimumBatchQuantity": {
"type": "integer",
"minimum": 1,
"maximum": 9007199254740991
},
"customFields": {},
"id": {
"type": "string"
},
"_operation": {
"type": "string",
"enum": [
"create",
"update"
],
"description": "Required. 'create' inserts a new record, 'update' modifies the existing record with this id."
}
},
"required": [
"name",
"description",
"defaultStandardFactor",
"laborRate",
"locationId",
"machineRate",
"overheadRate",
"_operation"
]
}