Skip to main content
Version: 2.2.0

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 parametersTypeRequiredDescription
cdprodNumericYesProduct code
Constant value: 109
classnameStringYesClass name used in WADL
Constant value: assetcheckininsert
classpathStringYesPath to the class used in WADL
Constant value: ast_import

Supported attributes:

Request body parameterTypeRequiredDescription
protocolStringYesProtocol code
checkindateStringYesReturn date
checkintimeStringYesCheck-in time
conditionStringNoCondition
conditioncommentStringNoCondition comments
actionStringYesAction: (1 - Enable for use, 2 - Disable asset, 3 - Send to maintenance, 4 - Check-out for calibration)
checkinlocationuserStringNoReturn Location - User ID
checkinlocationidStringNoCheck-in location - Location ID #
checkinlocationlatitudeStringNoCheck-in location - Latitude
checkinlocationlongitudeStringNoCheck-in location - Longitude
checkinlocationcommentStringNoCheck-in location - Comments
commentsStringNoComments
assetidStringNoAsset identifier, if not passed it will try to execute for all protocol assets
typeStringNoEvent 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": []
}