Batch creation
This function allows you to create a work order batch.
Input Parameters
Parameter | Type | Description |
---|---|---|
Id | Integer | Batch ID |
agentName | String | Agent assigned to the batch |
externalLaboratoryName | String | Laboratory name |
externalReferenceId | String | External ID |
serviceId | Integer | Service ID |
serviceName | String | Service name |
shortDescription | String | Description |
Output Parameters
Parameter | Type | Description |
---|---|---|
id | Integer | Batch Id |
agentId | Integer | Agent id assigned to the batch |
agentName | String | Agent name assigned to the batch |
closedDate | Date | Closed date |
dedicatedTime | Double | Dedicated time (hours) |
externalLaboratoryId | Integer | Laboratory Id |
externalLaboratoryName | String | Laboratory name |
externalReferenceId | String | External Id |
familyId | Integer | Family Id |
familyName | String | Family name |
isExternalCalibration | Boolean | Indicates if it is an external calibration |
openDate | Date | Open date |
plannedClosedDate | Date | Planned closed date |
plannedOpenDate | Date | Planned open date |
serviceId | Integer | Service Id |
serviceName | String | Service name |
serviceType | String | Service Type. Values: D = Allowances I = On Site LABEXT = External Calibration MO = Labour Cost NA = Does not apply P = Permanent Lab. S = Supplement SUPPY = Supply |
shortDescription | String | Description |
statusId | String | Status id. Values: OPEN = Open PROGRESS = In progress FINAL = Closed |
registeredClosedDate | Date | Registered closed date |
registeredOpenDate | Date | Registered open date |
Error codes
Code | Description |
---|---|
1000 | Generic error |
16000 | No data received |
16001 | Error in batch creation |
16002 | Unknown agent |
16003 | Unknown service identifier |
16004 | Unknown service name |
16005 | Error in data validation |
16006 | Unknown laboratory |
Examples
Call (POST Method)
https://server:8443/calibry-rest-api/rest/cif/batch
Headers:
Authorization
Content-Type = application/json
Body:
{
"agentName":"user123",
"externalLaboratoryName":"Laboratory 003",
"shortDescription":"Batch XYZ"
}
Responses
OK:
{
"id": 137,
"statusId": "OPEN",
"familyId": null,
"familyName": null,
"serviceId": null,
"serviceName": null,
"openDate": 1572354081957,
"closedDate": null,
"agentId": 385,
"agentName": "user123",
"plannedOpenDate": "1572397200000",
"plannedClosedDate": "1572483600000",
"registeredOpenDate": null,
"registeredClosedDate": null,
"dedicatedTime": "18.0",
"shortDescription": "Batch XYZ",
"serviceType": "P",
"isExternalCalibration": "false",
"externalLaboratoryId": 133,
"externalLaboratoryName": "Laboratory 003",
"externalReferenceId": "ext_123456"
}
Error:
{"code":"16001"}