Get a Kiosk State
Purpose
To retrieve state information and all associated elements for the specified Kiosk state ID in Zoho CRM. Each state represents a stage in the Kiosk, such as a screen, action, decision, or GetRecords.
Prerequisite:
To obtain the state ID required for this request, use the Get Kiosk States API.
To obtain the Kiosk ID required for this request, use the Get Kiosks API.
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
- GET /settings/kiosks/{kiosk_ID}/states/{state_ID}
- {kiosk_ID} : The unique ID of the Kiosk for which to retrieve states.
- {state_ID} : The unique ID of the state for which to retrieve details.
Request Details
Request URL
{api-domain}/crm/{version}/settings/kiosks/{kiosk_ID}/states/{state_ID}
Header
Authorization: Zoho-oauthtoken <access_token>
Scope
ZohoCRM.settings.kiosks.ALL
(or)
ZohoCRM.settings.kiosks.READ
Sample Request
Copiedcurl "https://www.zohoapis.com/crm/v8/settings/kiosks/111111000000124466/states/4676645000000888498"
-X GET
-H "Authorization: Zoho-oauthtoken 1000.xxxxxxxxxxxxx"Response JSON
The response body contains a JSON object with a states array containing the details of a particular state of a Kiosk.
- idstring
Specifies the unique ID of the state.
- namestring
Specifies the name of the state.
- typestring
Specifies the type of state in the Kiosk.
Possible values:
start_state - Represents the starting point of the Kiosk flow.
screen - Represents a screen where fields are displayed.
get_records - Retrieves records from a module.
end_state - Represents the ending point of the Kiosk flow.
action - Represents an action state.
decision - Represents a decision state.
- associated_fieldsJSON array
The fields associated with the state. Each object in this array contains:
- api_namestring
The API name of the associated field.
- idstring
The unique ID of the associated field.
- from_transitionJSON object
Specifies the transition through which the current state is reached. This object contains the transition's name and ID. This field is null for the start state.
- detailsJSON object
Specifies the configuration details for the state. The structure of this object varies depending on the state type. Refer to the Create Kiosk State API for the details of the keys supported under the details object.
- For screen states: contains screen_details with width, title, and button_align.
- For decision states: contains path_details with default and filter conditions.
- For action states: contains action-specific keys.
- For get_records states: contains get_record details.
- For start_state and end_state states, this field is often null.
- configured_propertiesJSON array
Specifies the properties configured in the state. This key is returned only when the request includes the parameter include. Refer the paramters section for more details. Each object contains:
- detailsJSON object
Specifies the merge field details.
- typestring
Specifies the type of configured property associated with the Kiosk state.
Possible value: merge_field
- transitions JSON array
The transitions from the current state to the next state. Each object contains name and ID of the transition.
Possible Errors
- NO CONTENT HTTP 204The specified Kiosk does not exist, or the specified State does not exist for the given Kiosk.
Resolution: Verify that the provided Kiosk ID and State ID are valid, and that the specified State belongs to the specified Kiosk. Use the Get Kiosks API to retrieve valid Kiosk IDs, and the Get Kiosk States API to retrieve the valid State IDs for a particular Kiosk. - 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_PATTERN HTTP 404Please check if the URL trying to access is a correct one.
Resolution: Specify valid URL. Refer to the Endpoints section.
Sample Response
Copied{
"states": [
{
"associated_fields": [
{
"api_name": "GetRecords",
"id": "5039614000000906247"
}
],
"configured_properties": null,
"from_transition": {
"name": "Next",
"id": "5039614000000906266"
},
"name": "GetRecords",
"details": {
"get_record": {
"name": "GetRecords",
"id": "5039614000000906247"
}
},
"id": "5039614000000906258",
"type": "get_records",
"transitions": [
{
"name": "GetRecords",
"id": "5039614000000906268"
}
]
}
]
}