Delete a Kiosk State
Purpose
Deletes the specified state from a Kiosk using the Kiosk ID and State ID. The Kiosk must be in draft status to perform this action.
Prerequisite:
To obtain the Kiosk ID required for this request, use the Get Kiosks API.
Use the Get States of a Kiosk API to retrieve the State ID of a specific Kiosk.
Note
Availability: Standard, Professional, Enterprise, and Ultimate editions.
Permission Required: Administrator profile, or profiles with either the Module Customization or Manage Automation permission enabled.
Endpoints
- DELETE /settings/kiosks/{kiosk_ID}/states/{state_ID}
- {kiosk_ID} : The unique kiosk ID for which the state will be deleted.
- {state_ID} : The unique ID of the state to get deleted.
Request Details
Request URL
{api-domain}/crm/{version}/settings/kiosks/{kiosk_ID}/states/{state_ID}
Header
Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52
Scope
ZohoCRM.settings.kiosks.ALL
(or)
ZohoCRM.settings.kiosks.DELETE
Parameters
- delete_dependent_statesBoolean, optional
When a state is deleted, all its associated configurations, transitions, and connected elements are removed. Use the delete_dependent_states query parameter to control whether dependent/child states should also be deleted or left as disconnected components. The default value is true.
Possible values: true, false
Note
Predefined states, start state and end state, cannot be deleted.
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/kiosks/111111000000124466/states/4676645000000888499"
-X DELETE
-H "Authorization: Zoho-oauthtoken 1000.xxxxxxxxxxxxx"Response JSON
The response body contains a JSON object with a states array. Each object in the array represents the result of a delete operation and contains the following fields:.
- codestring
Indicates the status of the operation.
- details JSON object
Contains additional details about the operation.
- idstring
The unique ID of the deleted state.
- messagestring
A human-readable message describing the result of the operation.
- statusstring
Indicates the overall status of the API response.
Possible Errors
- INVALID_DATAHTTP 400
No such state exists in Kiosk.
Resolution: Specify a valid state ID in the request URL. You can get the list of valid state IDs using the Get states of a Kiosk API. - NOT_ALLOWEDHTTP 400
Active kiosk does not allow perform given operation.
Resolution: The state cannot be deleted because the Kiosk is currently active. - NOT_ALLOWEDHTTP 400
Screen contains fields which are associated in other components.
Resolution: Identify the dependent components linked to this state. Remove the associations before attempting to delete the state. Alternatively, use the delete_dependent_states=true parameter to delete the state along with all its dependent states. - NOT_ALLOWEDHTTP 400
Predefined state not allow to perform any action.
Resolution: Predefined states like start and end state cannot be deleted. The Kiosk must be in draft status. - OAUTH_SCOPE_MISMATCHHTTP 401Invalid oauth scope to access this URL.
Resolution: Create a new token with the required scopes. Refer to the scope section. - AUTHENTICATION_FAILUREHTTP 401Authentication Failed.
Resolution: Pass the access token in the request header of the API call. - INVALID_URL_PATTERNHTTP 404
Please check if the URL trying to access is a correct one.
Resolution: Specify valid URL. Check the Endpoints section.
Sample Response
Copied{
"states": [
{
"code": "SUCCESS",
"details": {
"id": "5039614000000906258"
},
"message": "Kiosk state deleted successfully",
"status": "success"
}
]
}