> ## Documentation Index
> Fetch the complete documentation index at: https://learn.nexudus.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Search CrmOpportunities

> Search and list CrmOpportunity records with filtering, sorting, and pagination.

A **CrmOpportunity** represents a potential or existing deal linked to a customer record that moves through stages on a CRM board.

Opportunities track the lifecycle of a customer interaction — from initial enquiry or tour request through to a won or lost outcome. Each opportunity sits in a single CRM stage (`CrmBoardColumn`) and can be moved between stages manually or automatically via stage auto-assignment rules.

Key fields:

* **Status** — `InProgress`, `Won`, or `Lost`. Stages with `WinOpportunity` or `LoseOpportunity` update this automatically.
* **LeadSource** — how the opportunity was acquired (e.g. Web, Phone, Referral, Broker, GoogleSearch).
* **LossReason** — why the opportunity was lost (e.g. Price, Competition, Location). Only meaningful when Status is `Lost`.
* **Value** — expected revenue if the opportunity is won.
* **DueDate** — follow-up date for the opportunity.
* **UTM fields** — automatically populated from the URL the opportunity used to reach the sign-up or contact form.

There is a limit of 5,000 opportunities per location.

## Authentication

<Note>
  This endpoint requires OAuth2 authentication. Include a valid bearer token in the `Authorization` header.
  The authenticated user must be a full unrestricted administrator or have the **`CrmOpportunity-List`** role.
</Note>

## Enums

<Accordion title="eCrmOpportunitySource">
  | Value | Name               |
  | ----- | ------------------ |
  | 1     | Web                |
  | 2     | Phone              |
  | 4     | Webinar            |
  | 5     | Referral           |
  | 6     | PrintAdvert        |
  | 7     | PurchasedList      |
  | 8     | WordOfMouth        |
  | 9     | DirectEmail        |
  | 10    | EmailMarketing     |
  | 11    | Broker             |
  | 12    | PropertyAgent      |
  | 13    | Facebook           |
  | 14    | Linkedin           |
  | 15    | Instagram          |
  | 16    | Twitter            |
  | 17    | HubbleHq           |
  | 18    | LiquidSpace        |
  | 19    | GoogleSearch       |
  | 20    | SpacePool          |
  | 21    | InstantOffices     |
  | 22    | OfficeFreedom      |
  | 23    | FlexiOffices       |
  | 24    | Workthere          |
  | 25    | Kontor             |
  | 26    | Valve              |
  | 98    | OtherSocialNetwork |
  | 99    | Other              |
</Accordion>

<Accordion title="eCrmOpportunityLossReason">
  | Value | Name              |
  | ----- | ----------------- |
  | 1     | Timing            |
  | 2     | Need              |
  | 3     | PoorQualification |
  | 4     | Price             |
  | 5     | Feature           |
  | 6     | LostMomentum      |
  | 7     | Competition       |
  | 8     | ContractTerm      |
  | 9     | Duplicate         |
  | 10    | Waitlist          |
  | 11    | NotReturningCalls |
  | 12    | LackOfFacilities  |
  | 13    | NoPetPolicy       |
  | 14    | NoRightFit        |
  | 15    | Location          |
  | 16    | Entrance          |
  | 17    | Errors            |
  | 18    | Archived          |
  | 19    | SearchOnHold      |
  | 20    | RelocationOnHold  |
  | 99    | Other             |
</Accordion>

<Accordion title="eCrmOpportunityStatus — Status values">
  | Value | Name       |
  | ----- | ---------- |
  | 1     | InProgress |
  | 2     | Won        |
  | 3     | Lost       |
</Accordion>

## Query Parameters

### Pagination & Sorting

<ParamField query="page" type="integer" default="1">
  The page number to retrieve.
</ParamField>

<ParamField query="size" type="integer" default="25">
  The number of records per page.
</ParamField>

<ParamField query="orderBy" type="string">
  The property name to sort results by (e.g. `Name`, `CreatedOn`).
</ParamField>

<ParamField query="dir" type="integer">
  Sort direction. `0` for ascending, `1` for descending.
</ParamField>

### Filters

<ParamField query="CrmOpportunity_Name" type="string">
  Filter by optional tag to identify this opportunity, useful when the same customer appears in multiple boards.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn" type="integer">
  Filter by Crm Board Column Id.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn_Name" type="string">
  Filter by cRM stage name.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn_CrmBoard_Id" type="integer">
  Filter by cRM board ID.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn_CrmBoard_Name" type="string">
  Filter by cRM board name.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn_CrmBoard_Business_Id" type="integer">
  Filter by business ID of the CRM board.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn_CrmBoard_Business_Name" type="string">
  Filter by business name of the CRM board.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn_CrmBoard_Business_Currency_Id" type="integer">
  Filter by currency ID of the CRM board's business.
</ParamField>

<ParamField query="CrmOpportunity_CrmBoardColumn_CrmBoard_Business_Currency_Code" type="string">
  Filter by currency code of the CRM board's business.
</ParamField>

<ParamField query="CrmOpportunity_Coworker" type="integer">
  Filter by Coworker Id.
</ParamField>

<ParamField query="CrmOpportunity_Coworker_FullName" type="string">
  Filter by customer full name.
</ParamField>

<ParamField query="CrmOpportunity_Coworker_CoworkerType" type="string">
  Filter by customer record type.
</ParamField>

<ParamField query="CrmOpportunity_Coworker_CompanyName" type="string">
  Filter by customer company name.
</ParamField>

<ParamField query="CrmOpportunity_Coworker_Email" type="string">
  Filter by customer email address.
</ParamField>

<ParamField query="CrmOpportunity_Team" type="integer">
  Filter by Team Id.
</ParamField>

<ParamField query="CrmOpportunity_Team_Name" type="string">
  Filter by team name.
</ParamField>

<ParamField query="CrmOpportunity_Team_Description" type="string">
  Filter by team description.
</ParamField>

<ParamField query="CrmOpportunity_Team_ProfileWebsite" type="string">
  Filter by team profile website.
</ParamField>

<ParamField query="CrmOpportunity_OpportunityType" type="integer">
  Filter by opportunity type used to categorise and auto-populate general notes from a template.
</ParamField>

<ParamField query="CrmOpportunity_OpportunityType_Name" type="string">
  Filter by opportunity type name.
</ParamField>

<ParamField query="CrmOpportunity_Responsible" type="integer">
  Filter by admin user responsible for managing this opportunity.
</ParamField>

<ParamField query="CrmOpportunity_Responsible_FullName" type="string">
  Filter by responsible admin full name.
</ParamField>

<ParamField query="CrmOpportunity_Referrer" type="integer">
  Filter by customer who referred this opportunity.
</ParamField>

<ParamField query="CrmOpportunity_Agent" type="integer">
  Filter by external agent or broker who brought this opportunity.
</ParamField>

<ParamField query="CrmOpportunity_Notes" type="string">
  Filter by general notes visible to admins when viewing the opportunity. Auto-populated from the opportunity type template if a type is assigned.
</ParamField>

<ParamField query="CrmOpportunity_Completed" type="boolean">
  Filter by whether the opportunity has been completed (won or lost).
</ParamField>

<ParamField query="CrmOpportunity_DueDate" type="string">
  Filter by follow-up date for the opportunity.
</ParamField>

<ParamField query="CrmOpportunity_Value" type="number">
  Filter by expected revenue if the opportunity is won.
</ParamField>

<ParamField query="CrmOpportunity_Reminded" type="boolean">
  Filter by whether a follow-up reminder has been sent for this opportunity.
</ParamField>

<ParamField query="CrmOpportunity_LeadSource" type="integer">
  Filter by how the opportunity was acquired (e.g. Web, Phone, Referral, Broker, GoogleSearch).
</ParamField>

<ParamField query="CrmOpportunity_LossReason" type="integer">
  Filter by why the opportunity was lost (e.g. Price, Competition, Location). Only relevant when Status is Lost.
</ParamField>

<ParamField query="CrmOpportunity_Status" type="integer">
  Filter by opportunity status: InProgress (still active), Won (led to a sale), or Lost (did not lead to a sale).
</ParamField>

<ParamField query="CrmOpportunity_WonOn" type="string">
  Filter by date when the opportunity was marked as won.
</ParamField>

<ParamField query="CrmOpportunity_LostOn" type="string">
  Filter by date when the opportunity was marked as lost.
</ParamField>

<ParamField query="CrmOpportunity_CrmUpdatedOn" type="string">
  Filter by timestamp of the last CRM-related update to this opportunity.
</ParamField>

<ParamField query="CrmOpportunity_Position" type="integer">
  Filter by display order of the opportunity within its current stage.
</ParamField>

<ParamField query="CrmOpportunity_UtmSource" type="string">
  Filter by uTM source parameter captured from the URL the opportunity used.
</ParamField>

<ParamField query="CrmOpportunity_UtmMedium" type="string">
  Filter by uTM medium parameter captured from the URL the opportunity used.
</ParamField>

<ParamField query="CrmOpportunity_UtmCampaign" type="string">
  Filter by uTM campaign parameter captured from the URL the opportunity used.
</ParamField>

<ParamField query="CrmOpportunity_UtmContent" type="string">
  Filter by uTM content parameter captured from the URL the opportunity used.
</ParamField>

<ParamField query="CrmOpportunity_UtmTerm" type="string">
  Filter by uTM term parameter captured from the URL the opportunity used.
</ParamField>

### Range Filters

<ParamField query="from_CrmOpportunity_CrmBoardColumnCrmBoardId" type="integer">
  Filter by cRM board ID greater than or equal to this value.
</ParamField>

<ParamField query="to_CrmOpportunity_CrmBoardColumnCrmBoardId" type="integer">
  Filter by cRM board ID less than or equal to this value.
</ParamField>

<ParamField query="from_CrmOpportunity_CrmBoardColumnCrmBoardBusinessId" type="integer">
  Filter by business ID of the CRM board greater than or equal to this value.
</ParamField>

<ParamField query="to_CrmOpportunity_CrmBoardColumnCrmBoardBusinessId" type="integer">
  Filter by business ID of the CRM board less than or equal to this value.
</ParamField>

<ParamField query="from_CrmOpportunity_CrmBoardColumnCrmBoardBusinessCurrencyId" type="integer">
  Filter by currency ID of the CRM board's business greater than or equal to this value.
</ParamField>

<ParamField query="to_CrmOpportunity_CrmBoardColumnCrmBoardBusinessCurrencyId" type="integer">
  Filter by currency ID of the CRM board's business less than or equal to this value.
</ParamField>

<ParamField query="from_CrmOpportunity_DueDate" type="string">
  Filter by follow-up date for the opportunity greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CrmOpportunity_DueDate" type="string">
  Filter by follow-up date for the opportunity less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CrmOpportunity_Value" type="number">
  Filter by expected revenue if the opportunity is won greater than or equal to this value.
</ParamField>

<ParamField query="to_CrmOpportunity_Value" type="number">
  Filter by expected revenue if the opportunity is won less than or equal to this value.
</ParamField>

<ParamField query="from_CrmOpportunity_WonOn" type="string">
  Filter by date when the opportunity was marked as won greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CrmOpportunity_WonOn" type="string">
  Filter by date when the opportunity was marked as won less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CrmOpportunity_LostOn" type="string">
  Filter by date when the opportunity was marked as lost greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CrmOpportunity_LostOn" type="string">
  Filter by date when the opportunity was marked as lost less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CrmOpportunity_CrmUpdatedOn" type="string">
  Filter by timestamp of the last CRM-related update to this opportunity greater than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CrmOpportunity_CrmUpdatedOn" type="string">
  Filter by timestamp of the last CRM-related update to this opportunity less than or equal to this value. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CrmOpportunity_Position" type="integer">
  Filter by display order of the opportunity within its current stage greater than or equal to this value.
</ParamField>

<ParamField query="to_CrmOpportunity_Position" type="integer">
  Filter by display order of the opportunity within its current stage less than or equal to this value.
</ParamField>

<ParamField query="from_CrmOpportunity_CreatedOn" type="string">
  Filter records created on or after this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CrmOpportunity_CreatedOn" type="string">
  Filter records created on or before this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="from_CrmOpportunity_UpdatedOn" type="string">
  Filter records updated on or after this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

<ParamField query="to_CrmOpportunity_UpdatedOn" type="string">
  Filter records updated on or before this date. Format: `YYYY-MM-DDTHH:mm`.
</ParamField>

## Code Examples

### Simple listing

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/crm/crmopportunities?page=1&size=15&orderBy=CreatedOn&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/crm/crmopportunities?' + new URLSearchParams({
      page: 1,
      size: 15,
      orderBy: 'CreatedOn',
      dir: 1 // Ascending
    }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/crm/crmopportunities',
      params={
          'page': 1,
          'size': 15,
          'orderBy': 'CreatedOn',
          'dir': 0 // Ascending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

### Filtering by CreatedOn

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/crm/crmopportunities?CrmOpportunity_CreatedOn=example-value&orderBy=CreatedOn&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/crm/crmopportunities?' + new URLSearchParams({
      CrmOpportunity_CreatedOn: 'example-value',
      orderBy: 'CreatedOn',
      dir: 1
    }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/crm/crmopportunities',
      params={
          'CrmOpportunity_CreatedOn': 'example-value',
          'orderBy': 'CreatedOn',
          'dir': 0 // Ascending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

### Range filters

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET \
    "https://spaces.nexudus.com/api/crm/crmopportunities?from_CrmOpportunity_UpdatedOn=2025-01-01T00:00&to_CrmOpportunity_UpdatedOn=2025-12-31T23:59&orderBy=UpdatedOn&dir=0" \
    -H "Authorization: Bearer YOUR_TOKEN"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://spaces.nexudus.com/api/crm/crmopportunities?' + new URLSearchParams({
      from_CrmOpportunity_UpdatedOn: '2025-01-01T00:00',
      to_CrmOpportunity_UpdatedOn: '2025-12-31T23:59',
      orderBy: 'UpdatedOn',
      dir: 1 // Descending
     }),
    {
      headers: {
        'Authorization': 'Bearer YOUR_TOKEN'
      }
    }
  );

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://spaces.nexudus.com/api/crm/crmopportunities',
      params={
          'from_CrmOpportunity_UpdatedOn': '2025-01-01T00:00',
          'to_CrmOpportunity_UpdatedOn': '2025-12-31T23:59',
          'orderBy': 'UpdatedOn',
          'dir': 1 // Descending
      },
      headers={
          'Authorization': 'Bearer YOUR_TOKEN'
      }
  )

  data = response.json()
  ```
</CodeGroup>

## Response

### 200

<ResponseField name="Records" type="CrmOpportunity[]">
  The list of CrmOpportunity records matching the query. See the [Get one CrmOpportunity](/rest-api/crm/get-crmopportunities-by-id) endpoint for the full list of properties returned for each record.
</ResponseField>

<Warning>
  **Partial records** — The listing endpoint returns a summary representation of each CrmOpportunity. The following fields are **not populated** in the `Records[]` response: `TeamId`, `Notes`, `Value`, `Reminded`, `LeadSource`, `LossReason`, `Position`, `UtmSource`, `UtmMedium`, `UtmCampaign`, `UtmContent`, `UtmTerm`.

  To get all fields, fetch the full record using the [Get one CrmOpportunity](/rest-api/crm/get-crmopportunities-by-id) endpoint.

  **Important for updates:** When updating a record via `PUT`, always retrieve the full record with a `GET` request first, apply your changes to that complete data, and then send the updated record. Do not use data from a listing response as the base for a `PUT` request, as missing fields may be unintentionally cleared.
</Warning>

<ResponseField name="CurrentPage" type="integer">
  Current page number.
</ResponseField>

<ResponseField name="CurrentPageSize" type="integer">
  Number of records per page.
</ResponseField>

<ResponseField name="CurrentOrderField" type="string">
  The field used for sorting.
</ResponseField>

<ResponseField name="CurrentSortDirection" type="integer">
  The sort direction (`0` = ascending, `1` = descending).
</ResponseField>

<ResponseField name="FirstItem" type="integer">
  Index of the first item on the current page.
</ResponseField>

<ResponseField name="LastItem" type="integer">
  Index of the last item on the current page.
</ResponseField>

<ResponseField name="TotalItems" type="integer">
  Total number of matching records across all pages.
</ResponseField>

<ResponseField name="TotalPages" type="integer">
  Total number of pages.
</ResponseField>

<ResponseField name="HasNextPage" type="boolean">
  Whether there is a next page of results.
</ResponseField>

<ResponseField name="HasPreviousPage" type="boolean">
  Whether there is a previous page of results.
</ResponseField>

```json Example Response theme={null}
{
  "Records": [
    {
      "Name": null,
      "CrmBoardColumnId": 0,
      "CrmBoardColumnName": null,
      "CrmBoardColumnCrmBoardId": null,
      "CrmBoardColumnCrmBoardName": null,
      "CrmBoardColumnCrmBoardBusinessId": null,
      "CrmBoardColumnCrmBoardBusinessName": null,
      "CrmBoardColumnCrmBoardBusinessCurrencyId": null,
      "CrmBoardColumnCrmBoardBusinessCurrencyCode": null,
      "CoworkerId": null,
      "CoworkerFullName": null,
      "CoworkerCoworkerType": null,
      "CoworkerCompanyName": null,
      "CoworkerEmail": null,
      "TeamName": null,
      "TeamDescription": null,
      "TeamProfileWebsite": null,
      "OpportunityTypeId": null,
      "OpportunityTypeName": null,
      "ResponsibleId": null,
      "ResponsibleFullName": null,
      "ReferrerId": null,
      "AgentId": null,
      "Completed": false,
      "DueDate": null,
      "Status": 0,
      "WonOn": null,
      "LostOn": null,
      "CrmUpdatedOn": null,
      "Id": 87654321,
      "UpdatedOn": "2025-01-15T10:30:00Z",
      "CreatedOn": "2025-01-10T08:00:00Z",
      "UniqueId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "UpdatedBy": "admin@example.com",
      "IsNew": false,
      "SystemId": null,
      "ToStringText": "CrmOpportunity Example",
      "LocalizationDetails": null,
      "CustomFields": null
    }
  ],
  "CurrentPageSize": 15,
  "CurrentPage": 1,
  "CurrentOrderField": "CreatedOn",
  "CurrentSortDirection": 1,
  "FirstItem": 1,
  "HasNextPage": false,
  "HasPreviousPage": false,
  "LastItem": 1,
  "PageNumber": 1,
  "PageSize": 15,
  "TotalItems": 1,
  "TotalPages": 1
}
```
