Creación de lote
Esta función permite crear un lote de órdenes de trabajo.
Parámetros de Entrada
Parámetro | Tipo | Descripción |
---|---|---|
Id | Integer | Identificador del lote |
agentName | String | Agente al que se le asigna el lote |
externalLaboratoryName | String | Nombre del Laboratorio |
externalReferenceId | String | Identificador externo |
serviceId | Integer | Identificador del servicio |
serviceName | String | Nombre del servicio |
shortDescription | String | Descripción |
Parámetros de Salida
Parámetro | Tipo | Descripción |
---|---|---|
id | Integer | Identificador del lote |
agentId | Integer | Identificador del agente |
agentName | String | Nombre del agente |
closedDate | Date | Fecha de cierre |
dedicatedTime | Double | Tiempo dedicado (en horas) |
externalLaboratoryId | Integer | Identificador del laboratorio |
externalLaboratoryName | String | Nombre del laboratorio |
externalReferenceId | String | Identificador externo |
familyId | Integer | Identificador de la familia |
familyName | String | Nombre de la familia |
isExternalCalibration | Boolean | Indica si es una calibración externa |
openDate | Date | Fecha de apertura |
plannedClosedDate | Date | Fecha fin prevista |
plannedOpenDate | Date | Fecha inicio prevista |
serviceId | Integer | Identificador del servicio |
serviceName | String | Nombre del servicio |
serviceType | String | Tipo de servicio Los posibles valores son: D = Dietas |
shortDescription | String | Descripción |
statusId | String | Los posibles valores son: OPEN = Abierto |
registeredClosedDate | Date | Fecha fin registrada |
registeredOpenDate | Date | Fecha inicio registrada |
Códigos Error
Código | Descripción |
---|---|
1000 | Error genérico |
16000 | No se han recibido datos |
16001 | Error en la creación del lote |
16002 | Agente desconocido |
16003 | Identificador de servicio desconocido |
16004 | Nombre del servicio desconocido |
16005 | Error en la validación de los datos recibidos |
16006 | Laboratorio desconocido |
Ejemplos
Llamada (Método GET)
https://servidor:8443/calibry-rest-api/rest/cif/batch
Headers:
Authorization
Content-Type = application/json
Body:
{
"agentName":"usuario123",
"externalLaboratoryName":"Laboratorio 003",
"shortDescription":"Lote XYZ"
}
Respuestas
Correcta:
{
"id": 137,
"statusId": "OPEN",
"familyId": null,
"familyName": null,
"serviceId": null,
"serviceName": null,
"openDate": 1572354081957,
"closedDate": null,
"agentId": 385,
"agentName": "usuario123",
"plannedOpenDate": "1572397200000",
"plannedClosedDate": "1572483600000",
"registeredOpenDate": null,
"registeredClosedDate": null,
"dedicatedTime": "18.0",
"shortDescription": "Lote XYZ",
"serviceType": "P",
"isExternalCalibration": "false",
"externalLaboratoryId": 133,
"externalLaboratoryName": "Laboratorio 003",
"externalReferenceId": "extRef-001"
}
Error:
{"code":"16001"}