Update Kiosk GetRecords

Purpose

Use this API to update an existing GetRecords configuration in a draft Kiosk. This API supports only draft Kiosks.

You can update the following fields:

  • name
  • criteria
  • sort_order
  • result_type
  • limit

Use the Get All Kiosks API to retrieve the Kiosk ID and use the Kiosk GetRecords API to retrieve the available GetRecords configurations for a 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

  • PUT /settings/kiosks/{kiosk_ID}/get_records/{getrecord_ID}

Request Details

Request URL

{api-domain}/crm/{version}/settings/kiosks/{kiosk_ID}/get_records/{get_record_ID}

Header

Authorization: Zoho-oauthtoken d92d4xxxxxxxxxxxxx15f52

Scope

ZohoCRM.settings.kiosks.UPDATE
(or)
ZohoCRM.settings.ALL

Sample Request

Copiedcurl "https://www.zohoapis.com/crm/v8/settings/kiosks/5725767000011187708/get_records/5725767000011192244"
-X PUT
-H "Authorization: Zoho-oauthtoken 1000.8cb99dxxxxxxxxxxxxx9be93.9b8xxxxxxxxxxxxxxxf"
-d "@kiosksGetRecord.json"

Input JSON

The get_records JSON array is the root key. It must contain exactly one object representing the GetRecords configuration to update for the specified Kiosk. Provide the following keys within the object.

  • selection_detailsJSON object, optional

    Specify the record selection behavior configured for the GetRecords configuration, including whether users can select records, whether a single or multiple records are displayed, and the maximum number of records that can be displayed.

    • result_typestring, mandatory

      Represents the number of records returned by the GetRecords configuration during Kiosk execution.

      Possible values:

      single - Returns a single record.
      multiple - Returns multiple records.
      all - Returns all matching records.

      When result_type is single, the value of limit must be 1.
      When result_type is multiple, the maximum supported value is 100.

    • limitinteger, mandatory

      Specify the maximum number of records a user is allowed to select from the fetched records.

      Maximum supported value: 100.

  • criteriaJSON object, optional

    Provide the criteria configuration to filter the records fetched from the module.

    • group_operatorstring, optional

      Specify the logical operator used to combine multiple criteria conditions. This key is required only when multiple criteria conditions are provided. 

      Possible values: AND, OR.

    • groupJSON array, optional

      Provide the list of criteria conditions to apply while fetching records. This key is required only when multiple criteria conditions are provided.

      • comparatorstring, mandatory

        Specify the comparison operator to use in the criteria condition. Example: contains, less_equal, equals.

      • fieldJSON object, mandatory

        Provide the field details to use in the criteria condition. Use the Fields Metadata API to retrieve the field details.

        • api_namestring, mandatory

          Specify the API name of the field.

        • idstring, mandatory

          Provide the unique ID of the field.

      • typestring, mandatory

        Specify the criteria type. Example: value.

      • valuestring, mandatory

        Provide the value to use for comparison in the criteria condition.

  • namestring, optional

    Specify the name of the GetRecords configuration.

  • sort_orderJSON object, optional

    Provide the configuration to sort the fetched records.

    • order_by_namestring, mandatory

      Specify the sorting order. 

      Possible values: ascending, descending.

    • order_by_fieldJSON object, mandatory

      Provide the field details to sort the records.

      • api_namestring, mandatory

        Specify the API name of the sorting field. Use the Fields Metadata API to retrieve the field details.

      • idstring, mandatory

        Provide the unique ID of the sorting field. Use the Fields Metadata API to retrieve the field details.

Note

  • This API won't work for the Active Kiosks. The system will throw the NOT_ALLOWED error.

Sample Input

Copied{
    "get_records": [
        {
            "criteria": { //Adding aditional criteria to the existing one
                "group_operator": "AND",
                "group": [
                    {
                        "comparator": "contains",
                        "field": {
                            "api_name": "Company",
                            "id": "5725767000000002591"
                        },
                        "type": "value",
                        "value": "Zoho"
                    },
                    {
                        "comparator": "less_equal",
                        "field": {
                            "api_name": "Annual_Revenue",
                            "id": "5725767000000002617"
                        },
                        "type": "value",
                        "value": "10000"
                    }
                ]
            },
            "name": "Leads get records with Kiosk", //updating the Kiosk name
            "sort_order": {
                "order_by_name": "descending",
                "order_by_field": {
                    "api_name": "Modified_Time", //updating the order by field
                    "id": "5725767000000002629"
                }
            }
        }
    ]
}

Possible Errors

  • INVALID_DATAHTTP 400
    • Invalid ID has been given
      Resolution: Specify a valid Kiosk ID. Use the Get All Kiosks API to retrieve the Kiosk ID.
    • Invalid GetRecords ID has been given.
      Resolution: Specify a valid GetRecords ID. Use the Get Kiosk GetRecords API to retrieve the available GetRecords IDs for the Kiosk.
    • Invalid field ID or field API name has been given in the criteria or sorting configuration.
      Resolution: Specify valid field details. Use the Fields Metadata API to retrieve the field ID and API name.
    • Invalid criteria configuration has been given.
      Resolution: Ensure the comparator, group operator, and criteria structure are valid. Refer to the Input JSON section for more details.
    • Invalid selection configuration has been given.
      Resolution: Specify valid values for selection_type and result_type. Refer to the Input JSON section for more details.
    • Invalid sorting configuration has been given.
      Resolution: Specify a valid sorting field and order.
    • Invalid value has been given for limit or range.
      Resolution: Specify valid positive integer values for limit and range. Refer to the Input JSON section for more details.
  • MANDATORY_NOT_FOUNDHTTP 400

    One or more mandatory fields are missing
    Resolution: Refer to the Input JSON section to know the mandatory fields.

  • INVALID_REQUEST_METHODHTTP 400

    The http request method type is not a valid one
    Resolution: You have specified an invalid HTTP method to access the API URL. Specify a valid request method. Refer to the Endpoints section for more details. 

  • OAUTH_SCOPE_MISMATCHHTTP 401

    Unauthorized
    Resolution: The client does not have a valid scope to update the GetRecords configuration for a specific Kiosk. Create a new token with valid scope. Refer to the Scope section for more details.

  • AUTHENTICATION_FAILUREHTTP 401

    Authentication 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: The request URL specified is incorrect. Specify a valid request URL. Refer to the Request URL section for more details.

  • INTERNAL_ERRORHTTP 500

    Internal Server Error
    Resolution: Unexpected and unhandled exception in the server. Contact support team.

Sample Response

Copied{
    "get_records": [
        {
            "code": "SUCCESS",
            "details": {
                "id": "5725767000011192244"
            },
            "message": "Get record updated successfully",
            "status": "success"
        }
    ]
}