# List rep opportunities `GET` `/api/v1/crm-connections/{crm_connection_id}/bookbuilder/reps/{rep_id}/opportunities` Returns a paginated list of opportunities for the rep, filtered by ``type``: ``open`` (currently open) or ``created`` (created within a date window). The ``scope`` query param filters to opportunities on accounts in the rep's book (default: all accounts). ## Path parameters | Name | Type | Required | Description | |------|------|----------|-------------| | crm_connection_id | string | yes | UUID of the CRM connection | | rep_id | string | yes | Salesforce User ID of the rep | ## Query parameters | Name | Type | Required | Description | |------|------|----------|-------------| | type | string | yes | `open` returns currently-open opportunities; `created` returns opportunities created within the date window. start_date and end_date are required when type=created and rejected when type=open. | | start_date | string | no | Start of the created-on window (inclusive), formatted as YYYY-MM-DD. Required when type=created; not allowed when type=open. | | end_date | string | no | End of the created-on window (inclusive), formatted as YYYY-MM-DD. Required when type=created; not allowed when type=open. | | scope | string | no | Filter to opportunities whose account is in the rep's book. | | sort_by | string | no | Opportunity SObject field to sort by (e.g. Name, StageName, Account.Name, CreatedDate). | | sort_direction | string | no | ASC or DESC | | offset | integer | no | Pagination offset (default 0, max 2000). | | limit | integer | no | Page size (default 50). | | hierarchy_rollup_enabled | string | no | When true, expands opportunity results to include child accounts via the org's configured account hierarchy. Only applies when type=open; ignored for type=created. Returns 400 if account hierarchy is not configured in the Salesforce org. | ## Response `200 OK` — `application/json` | Field | Type | Description | |-------|------|-------------| | opportunities | array[object] | — | | opportunities.id | string | — | | opportunities.name | string | — | | opportunities.account | object | — | | opportunities.account.id | string | — | | opportunities.account.name | string | — | | opportunities.owner | object | — | | opportunities.owner.id | string | — | | opportunities.owner.name | string | — | | opportunities.creator | object | Reflects the configured opportunity creator field, falling back to CreatedById. | | opportunities.creator.id | string | — | | opportunities.creator.name | string | — | | opportunities.type | string | — | | opportunities.stage_name | string | — | | opportunities.amount | number | Reflects the configured opportunity value field. Null when no opportunity value field is configured. | | offset | integer | — | | limit | integer | — | | total | integer | — | ## Errors | Status | Description | |--------|-------------| | 400 | Bad Request | | 403 | Forbidden | | 404 | Not Found | | 422 | Unprocessable Entity | | 502 | Bad Gateway |