# List Ticket Ids By Field Ids

{% hint style="warning" %}
All API requests should contain [authorization headers](https://developers.socialboards.com/docs/apis/tickets/authorization-headers).
{% endhint %}

#### Request

```url
POST /tickets/customFields/values/list
```

#### Query Parameters.

This endpoint doesn't require query parameters.

#### Request Body

```json
{
    "customFieldIds": [
        26690,
        26703,
        26704,
        26706
        
    ],
    "fromTicketCreationTime": "2023-01-15T00:00:00+00:00",
    "isAllFieldsInTicketRequired": true,
    "skip": 0,
    "take": 500,
    "toTicketCreationTime": "2024-01-17T00:00:00+00:00"
}
```

Body of request should contain the following model serialized to JSON.

<table data-full-width="true"><thead><tr><th width="249">Field</th><th width="171">Type</th><th width="166">Required</th><th>Comments</th></tr></thead><tbody><tr><td>customFieldIds</td><td>array of integers</td><td>no</td><td>An array of integers representing Custom Fields Ids. The search will match tickets based on these field ids. By default it is empty and a maximum count of field ids is limited to 50</td></tr><tr><td>fromTicketCreationTime</td><td>string</td><td>no</td><td>A datetime string in ISO 8601 format. Only tickets created after this time will be included in the search. By default it is null</td></tr><tr><td>isAllFieldsInTicketRequired</td><td>boolean</td><td>no</td><td>If true, all specified fields in the search request must be present in a tickets. If false, at least one field must match in a tickets. By default it is false</td></tr><tr><td>skip</td><td>nullable integer</td><td>no</td><td>Specifies the number of tickets to skip in the search results. By default it is 0</td></tr><tr><td>take</td><td>nullable integer</td><td>no</td><td>Specifies the maximum number of tickets to return. By default it is 250 and maximum count to take is limited to 500. The tickets are ordered by Id in ascending order</td></tr><tr><td>toTicketCreationTime</td><td>string</td><td>no</td><td>A datetime string in ISO 8601 format.  Only tickets before this time will be included in the search. By default it is null</td></tr></tbody></table>

#### Response

The tickets are ordered by ID in ascending order.

```json
{
    "data": [
        {
            "customFieldValues": [
                {
                    "id": 26690,
                    "value": "Magic Cloudy Shop"
                },
                {
                    "id": 26703,
                    "value": "Arrows with Frozen Darts"
                },
                {
                    "id": 26704,
                    "value": "100"
                },
                {
                    "id": 26706,
                    "value": "2024-01-23"
                }
            ],
            "ticketId": 256245
        }
    ],
    "errorCode": -1,
    "errorText": null
}
```

`Data` field will contain an array of [TicketIdWithFieldValue](https://developers.socialboards.com/docs/apis/tickets/reference/objects/ticket-id-with-field-value) models.
