ASTCHECKININSERT
This method allows creating the check-in from usage event records through a Rest web service.
POST /apigateway/se/generic/gn_webservice/gn_webservice_execute.php
Query parameters:
Query parameters | Type | Required | Description |
---|---|---|---|
cdprod | Numeric | Yes | Product codeConstant value: 109 |
classname | String | Yes | Class name used in WADLConstant value: assetcheckininsert |
classpath | String | Yes | Path to the class used in WADLConstant value: ast_import |
Supported attributes:
Request body parameter | Type | Required | Description |
---|---|---|---|
protocol | String | Yes | Protocol code |
checkindate | String | Yes | Return date |
checkintime | String | Yes | Check-in time |
condition | String | No | Condition |
conditioncomment | String | No | Condition comments |
action | String | Yes | Action: (1 - Enable for use, 2 - Disable asset, 3 - Send to maintenance, 4 - Check-out for calibration) |
checkinlocationuser | String | No | Return Location - User ID |
checkinlocationid | String | No | Check-in location - Location ID # |
checkinlocationlatitude | String | No | Check-in location - Latitude |
checkinlocationlongitude | String | No | Check-in location - Longitude |
checkinlocationcomment | String | No | Check-in location - Comments |
comments | String | No | Comments |
assetid | String | No | Asset identifier, if not passed it will try to execute for all protocol assets |
type | String | No | Event type: (1 - Usage) |
Example request:
{
"protocol": 17,
"checkindate": "2023-08-15",
"checkintime": "07:50",
"condition": "ST-01",
"conditioncomment": "this is a comment",
"action": 1,
"checkinlocationuser": "9901",
"checkinlocationid": "BR-008",
"checkinlocationlatitude": "-26.30222",
"checkinlocationlongitude": "-48.85197",
"checkinlocationcomment": "this is a comment",
"comments": "this is a comment",
"assetid": "MVP-009",
"type": 1
}
Example of response in case of success: 200 OK
{
"success": true,
"message": "Operation successfully performed",
"code": 1,
"data": []
}
Example of response in case of error:
{
"success": false,
"message": "Not found: [protocol: 90]",
"code": -15,
"data": []
}