# List retrieval templates `GET` `/api/v1/crm-connections/{crm_connection_id}/retrievals/templates` Return retrieval templates for the given Salesforce CRM connection. Supports sorting and cursor-based pagination. Default page size is 50. Pass next_records_url from one response into the next request to paginate through large result sets. ## Path parameters | Name | Type | Required | Description | |------|------|----------|-------------| | crm_connection_id | string | yes | UUID of the CRM connection | ## Query parameters | Name | Type | Required | Description | |------|------|----------|-------------| | query | string | no | Search by template name (min 2 characters) | | sort_by | string | no | Field to sort by (default: LastModifiedDate) | | sort_direction | string | no | Sort direction: ASC or DESC (default: DESC) | | limit | string | no | Maximum number of templates to return (default: 50). | | next_records_url | string | no | Cursor returned by a previous response to fetch the next page. When provided, all other query params are ignored. | ## Response `200 OK` — `application/json` | Field | Type | Description | |-------|------|-------------| | templates | array[object] | List of retrieval template records | | templates.id | string | Retrieval template id | | templates.name | string | Template name | | templates.created_at | string | ISO-8601 creation timestamp | | templates.updated_at | string | ISO-8601 last-updated timestamp | | templates.retrieve_from | array[object] | Sources to retrieve from — reps or target books, including inactive reps | | templates.retrieve_from.type | string | Source type: 'Rep' or 'Target Book' | | templates.retrieve_from.id | string | Salesforce ID of the source | | templates.retrieve_from.name | string | Display name | | templates.conditions_operator | string | How conditions are combined: AND, OR, or CUSTOM | | templates.custom_condition_logic | string | Custom condition expression (e.g. '1 AND (2 OR 3)'), present when conditions_operator is CUSTOM | | templates.conditions | array[object] | Conditions for this template | | templates.conditions.id | string | Salesforce ID of the condition record | | templates.conditions.number | integer | Condition number, used in custom expressions | | templates.conditions.field | string | Salesforce field API name | | templates.conditions.operator | string | Comparison operator | | templates.conditions.value | string | Value to compare against | | next_records_url | string | Pass this value as next_records_url on the next request to fetch the following page. Null when all records have been returned. Only present when limit exceeds Salesforce's per-page maximum (2000 records). | ## Errors | Status | Description | |--------|-------------| | 400 | Bad Request | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 502 | Bad Gateway |