Skip to content

Commit 63a5bd4

Browse files
Correct the ticket search fields, sorting and page size (#748)
* Correct the ticket search fields, sorting and page size Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * Exclude title and description from ticket search sort fields Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent e0546c4 commit 63a5bd4

2 files changed

Lines changed: 18 additions & 12 deletions

File tree

‎descriptions/0/api.intercom.io.yaml‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27968,7 +27968,7 @@ paths:
2796827968
{% admonition type="warning" name="Optimizing search queries" %}
2796927969
Search queries can be complex, so optimizing them can help the performance of your search.
2797027970
Use the `AND` and `OR` operators to combine multiple filters to get the exact results you need and utilize
27971-
pagination to limit the number of results returned. The default is `20` results per page.
27971+
pagination to limit the number of results returned. The default is `20` results per page and maximum is `150`.
2797227972
See the [pagination section](https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/pagination/#example-search-conversations-request) for more details on how to use the `starting_after` param.
2797327973
{% /admonition %}
2797427974

@@ -27982,19 +27982,18 @@ paths:
2798227982
### Accepted Fields
2798327983

2798427984
Most keys listed as part of the Ticket model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as `created_at` accepts a date, the `value` cannot be a string such as `"foobar"`).
27985-
The `source.body` field is unique as the search will not be performed against the entire value, but instead against every element of the value separately. For example, when searching for a conversation with a `"I need support"` body - the query should contain a `=` operator with the value `"support"` for such conversation to be returned. A query with a `=` operator and a `"need support"` value will not yield a result.
27985+
Fields not in the table below, such as `source.body`, are rejected with a `400` error.
2798627986

2798727987
| Field | Type |
2798827988
| :---------------------------------------- | :--------------------------------------------------------------------------------------- |
27989-
| id | String |
27989+
| id | Integer |
2799027990
| created_at | Date (Unix timestamp in seconds) |
2799127991
| updated_at | Date (Unix timestamp in seconds) |
2799227992
| title | String |
2799327993
| description | String |
2799427994
| category | String |
27995-
| ticket_type_id | String |
27995+
| ticket_type_id | Integer |
2799627996
| contact_ids | String |
27997-
| teammate_ids | String |
2799827997
| admin_assignee_id | Integer |
2799927998
| team_assignee_id | Integer |
2800027999
| open | Boolean |
@@ -28009,6 +28008,10 @@ paths:
2800928008
* For **Tracker** category tickets, use the term `tracker`.
2801028009
{% /admonition %}
2801128010

28011+
### Sorting
28012+
28013+
You can sort the results with a `sort` object, for example `{"field": "created_at", "order": "ascending"}`. `field` must be one of the fields in the table above, other than `ticket_attribute.{id}`, `title` and `description`. `order` is `ascending` or `descending`, and any other value is treated as `descending`. Without `sort`, results are sorted by `updated_at`, newest first.
28014+
2801228015
### Accepted Operators
2801328016

2801428017
{% admonition type="info" name="Searching based on `created_at`" %}

‎descriptions/2.17/api.intercom.io.yaml‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25108,7 +25108,7 @@ paths:
2510825108
{% admonition type="warning" name="Optimizing search queries" %}
2510925109
Search queries can be complex, so optimizing them can help the performance of your search.
2511025110
Use the `AND` and `OR` operators to combine multiple filters to get the exact results you need and utilize
25111-
pagination to limit the number of results returned. The default is `20` results per page.
25111+
pagination to limit the number of results returned. The default is `20` results per page and maximum is `150`.
2511225112
See the [pagination section](https://developers.intercom.com/docs/build-an-integration/learn-more/rest-apis/pagination/#example-search-conversations-request) for more details on how to use the `starting_after` param.
2511325113
{% /admonition %}
2511425114

@@ -25122,21 +25122,20 @@ paths:
2512225122
### Accepted Fields
2512325123

2512425124
Most keys listed as part of the Ticket model are searchable, whether writeable or not. The value you search for has to match the accepted type, otherwise the query will fail (ie. as `created_at` accepts a date, the `value` cannot be a string such as `"foobar"`).
25125-
The `source.body` field is unique as the search will not be performed against the entire value, but instead against every element of the value separately. For example, when searching for a conversation with a `"I need support"` body - the query should contain a `=` operator with the value `"support"` for such conversation to be returned. A query with a `=` operator and a `"need support"` value will not yield a result.
25125+
Fields not in the table below, such as `source.body`, are rejected with a `400` error.
2512625126

2512725127
| Field | Type |
2512825128
| :---------------------------------------- | :--------------------------------------------------------------------------------------- |
25129-
| id | String |
25129+
| id | Integer |
2513025130
| created_at | Date (UNIX timestamp) |
2513125131
| updated_at | Date (UNIX timestamp) |
2513225132
| title | String |
2513325133
| description | String |
2513425134
| category | String |
25135-
| ticket_type_id | String |
25135+
| ticket_type_id | Integer |
2513625136
| contact_ids | String |
25137-
| teammate_ids | String |
25138-
| admin_assignee_id | String |
25139-
| team_assignee_id | String |
25137+
| admin_assignee_id | Integer |
25138+
| team_assignee_id | Integer |
2514025139
| open | Boolean |
2514125140
| state | String |
2514225141
| snoozed_until | Date (UNIX timestamp) |
@@ -25149,6 +25148,10 @@ paths:
2514925148
* For **Tracker** category tickets, use the term `tracker`.
2515025149
{% /admonition %}
2515125150

25151+
### Sorting
25152+
25153+
You can sort the results with a `sort` object, for example `{"field": "created_at", "order": "ascending"}`. `field` must be one of the fields in the table above, other than `ticket_attribute.{id}`, `title` and `description`. `order` is `ascending` or `descending`, and any other value is treated as `descending`. Without `sort`, results are sorted by `updated_at`, newest first.
25154+
2515225155
### Accepted Operators
2515325156

2515425157
{% admonition type="info" name="Searching based on `created_at`" %}

0 commit comments

Comments
 (0)