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 parameters | Type | Required | Description |
---|---|---|---|
cdprod | Numeric | Yes | Product codeConstant value: 109 |
classname | String | Yes | Class name used in WADLConstant value: assetcheckoutinsert |
classpath | String | Yes | Path to the class used in WADLConstant value: ast_import |
Supported attributes:
Request body parameter | Type | Required | Description |
---|---|---|---|
checkoutdate | String | Yes | Check-out date |
checkouttime | String | No | Check-out time |
checkoutdeadline | String | No | Check-in deadline |
destination | String | Yes | Recipient user ID |
assetid | String | Yes | Asset ID # |
quantity | String | Yes | Quantity |
checkoutlocationuser | String | No | Check-out location - User ID |
checkoutlocationid | String | No | Check-out location - Location ID # |
checkoutlocationlatitude | String | No | Check-out location - Latitude |
checkoutlocationlongitude | String | No | Check-out location - Longitude |
checkoutlocationcomment | String | No | Check-out location - Comments |
comments | String | No | Comments |
reservationid | String | Yes¹ | Reservation ID # |
type | String | No | Event 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": []
}