Skip to content

Retrieves custom fields for offline messages

Method get.offline_message_user_fields
Description Retrieves custom fields for offline messages
Available to Agent, Client

Request parameters

Name Type Required Description
access_token string yes Access token used to authenticate the request.
user_id number no Unique ID of the client user on whose behalf the agent is making the request. Required for agents. To retrieve a list of client users, use the "get.customer_users" method.
limit number no Maximum number of records to return. See the "Paging" section.
offset number no Zero-based offset of the first record to return. The default is 0. See the "Paging" section.
filter object no See the "Filters" section.
fields array no See the "Viewing returned data" section.
sort array no See the "Sorting" section.

Response parameters

Name Type Filtering Sorting Description
ext_id string yes yes External ID of the custom field.
name string yes yes Custom field name.
data_type string yes yes Field data type.

Example request

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.offline_message_user_fields",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "filter":{
    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

Example response

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "data": [
            {
                "ext_id": "string",
                "name": "string",
                "data_type": "string"
            }
        ],
        "metadata": "object"
    }
}

Example response

{
    "jsonrpc": "2.0",
    "id": "number",
    "result": {
        "data": [
            {
                "name": "Request status",
                "ext_id": "field_2021012203_1",
                "data_type": "string"
            },
            {
                "name": "Contract value",
                "ext_id": "field_2021012203_2",
                "data_type": "numeric"
            }
        ],
        "metadata": {
            "total_items": 2,
            "version": null,
            "limits": {
                "day_limit": 3000,
                "day_remaining": 2987,
                "day_reset": 51959,
                "minute_limit": 60,
                "minute_remaining": 59,
                "minute_reset": 59
            }
        }
    }
}

Possible errors

See the "Errors for get methods" section.