Delete Reservation

Restriction: This API endpoint is not supported in the Free Trial cloud.

Deletes a specific device reservation. The reservation is indicated by the reservationID provided when the reservation was created.

URL

Copy
https://<YOUR_CLOUD>.app.perfectomobile.com/api/v1/device-reservation/reservations/<reservationId>

Method

Delete

For information on a previous version of this endpoint, see Delete Reservation | Legacy.

Header parameters

Name

Description

Perfecto-Authorization

The Perfecto security token. For more information, see Generate security tokens.

Request parameters

Name Type Default Description

admin 

boolean

false 

Set to true to allow users with administrative credentials to delete reservations for users in their group. 

This parameter is not available on a shared MCM.

scope 

string 

remaining

Available for active reservations only. Possible values:

  • remaining to delete the rest of a reservation with token refund.

  • (Only for admin users) entire to delete the entire reservation, without token refund. Tokens should be adjusted separately if required.

Success response

Code: 200 OK

Copy
Success response format
{
    "status": "Success"
}

Error response

Copy
Error response format
[
    {
        "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 feature is disable for the tenant.

  • The reservation is not found.

Copy
A wrong securityToken is passed in the request (Unauthorized Request Code - 401)
[
    {
        "userMessage": "Unable to authenticate bearer token",
        "developerMessage": "Unable to authenticate bearer token"
    }
]
Copy
The reservation is not found (Bad Request Code - 400)
[
    {
        "userMessage": "Reservation not found",
        "developerMessage": "d6775ff7760d414583f755fd74f046bd"
    }
]
Copy
The reservation is disabled for the tenant (Forbidden Request Code - 403)

[
    {
        "userMessage": "Reservation is disabled. Please contact support.",
        "developerMessage": "5f4fb4e9c44e424faf0280d40dbbc8f2"
    }
]