Update Reservation
Updates a specific device reservation. The reservation is indicated by the reservationID
provided when the reservation was created.
URL |
Copy
|
Method |
|
For information on a previous version of this endpoint, see Update Reservation | Legacy.
Header parameters
Name |
Description |
---|---|
|
The Perfecto security token. For more information, see Generate security tokens. |
Request parameters
Name |
Type |
Default |
Description |
---|---|---|---|
|
boolean |
false |
Set to Users with administrative credentials can create reservations that are longer than the max time frame. Restriction: This parameter is not available on a shared MCM.
|
Request body
Name | Type | Description |
---|---|---|
|
long |
The reservation start time, measured in milliseconds, from midnight, January 1, 1970 UTC.* |
|
long |
The reservation end time, measured in milliseconds, from midnight, January 1, 1970 UTC.* |
|
string |
The user the device is reserved to. |
|
string |
The reservation description (free text). |
* Use this Timestamp converter to create the required time stamp for the new startTime and endTime values.
{
"startTime": "<<TIME_STAMP>>",
"endTime": "<<TIME_STAMP>>",
"description": "<<DESCRIPTION_IF_ANY>>",
"reservedTo": "<<USER_ID>>"
}
Success response
Code: 200 OK
Error response
[
{
"userMessage":"ERROR_MESSAGE",
"developerMessage": "1-63dbebb1-4521fab52df9f41a578221c8"
}
]
where:
-
userMessage
is the error message to be shown. -
developerMessage
is a value that you can send to Perfecto Support to check errors if further investigation is required.
An error is returned in the following cases:
-
The reservation is not found.
-
The reservation feature is disable for the tenant.
-
The reservation period is less than 15 minutes.
Sample error responses
[
{
"userMessage": "Unable to authenticate bearer token",
"developerMessage": "Unable to authenticate bearer token"
}
]
[
{
"userMessage": "Reservation not found",
"developerMessage": "d6775ff7760d414583f755fd74f046bd"
}
]
[
{
"userMessage": "Reservation is disabled. Please contact support.",
"developerMessage": "5f4fb4e9c44e424faf0280d40dbbc8f2"
}
]
[
{
"userMessage": "The minimum reservation period is 15 minutes",
"developerMessage": "3fed6bb17a08412cb376a932498f69ea"
}
]