Retrieves custom deal fields.
| Method | get.deal_user_fields |
|---|---|
| API version | — |
| Description | Retrieves custom deal fields. |
Available to: Agents and clients
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 "get.customer_users". |
limit |
number | no | Maximum number of records to return. See the "Paging" section. |
offset |
number | no | Number of records to skip before returning results. Default: 0. See the "Paging" section. |
filter |
object | no | Filtering criteria. See the "Filters" section. |
fields |
array | no | Fields to include in the response. See the "Viewing returned data" section. |
sort |
array | no | Sorting criteria. See the "Data sorting" section. |
Response parameters
| Name | Type | Filtering | Sorting | Description |
|---|---|---|---|---|
ext_id |
string | yes | yes | External custom field ID. |
name |
string | yes | yes | Custom deal field name. |
data_type |
string | yes | yes | Field data type. |
Example request
{
"jsonrpc":"2.0",
"id":"number",
"method":"get.deal_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 with sample data
{
"jsonrpc": "2.0",
"id": "number",
"result": {
"data": [
{
"name": "Deal status",
"ext_id": "field_2021012203_1",
"data_type": "string"
},
{
"name": "Elephants sold",
"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.