Skip to main content
Version: 2.2.0

ASTCHECKOUTINSERT

This method allows creating the output 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: assetcheckoutinsert
classpathStringYesPath to the class used in WADL
Constant value: ast_import

Supported attributes:

Request body parameterTypeRequiredDescription
checkoutdateStringYesCheck-out date
checkouttimeStringNoCheck-out time
checkoutdeadlineStringNoCheck-in deadline
destinationStringYesRecipient user ID
assetidStringYesAsset ID #
quantityStringYesQuantity
checkoutlocationuserStringNoCheck-out location - User ID
checkoutlocationidStringNoCheck-out location - Location ID #
checkoutlocationlatitudeStringNoCheck-out location - Latitude
checkoutlocationlongitudeStringNoCheck-out location - Longitude
checkoutlocationcommentStringNoCheck-out location - Comments
commentsStringNoComments
reservationidStringYes¹Reservation ID #
typeStringNoEvent type: (1 - Usage)
info

Yes¹ - Required only when you have a reservation in that period.

Example request:

{
"checkoutdate": "2023-08-13",
"checkouttime": "07:50",
"checkoutdeadline": "2023-08-17",
"destination": "9901",
"assetid": "MVP-009",
"quantity": "1",
"checkoutlocationuser": "9901",
"checkoutlocationid": "BR-002",
"checkoutlocationlatitude": "-26.30222",
"checkoutlocationlongitude": "-48.85197",
"checkoutlocationcomment": "this is a comment",
"comments": "this is a comment",
"reservationid": "RES-0005",
"type": 1
}

Example of response in case of success: 200 OK

{
"success": true,
"message": "Operation successfully performed",
"code": 1,
"data": {
"protocol": 17
}
}

Example of response in case of error:

{
"success": false,
"message": "User does not have permission to use this asset",
"code": -19,
"data": []
}