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

# Affinity: V2 Opportunities Opportunity ID Notes Get

> List the Affinity notes about a deal (opportunity), including notes on its people. Includes inputs, outputs, SDK V2 examples, and Deepline cost.

List the Affinity notes about a deal (opportunity), including notes on its people.

> [!NOTE]
>
> Tool ID: `affinity_v2_opportunities_opportunity_id_notes_get`

## Run this action

Use the TypeScript SDK for one call. Use `ctx.tools.execute(...)` inside a Play for durable calls, scheduled calls, or CSV processing.

```ts theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
import { Deepline } from 'deepline';

const deepline = await Deepline.connect();
const result = await deepline.tools.execute(
  'affinity_v2_opportunities_opportunity_id_notes_get',
  {
    "opportunityId": 123
  },
);

console.log(result.toolResponse.raw);
```

### CLI

```bash theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
deepline tools execute affinity_v2_opportunities_opportunity_id_notes_get --input '{
  "opportunityId": 123
}' --json
```

## Example response

The static output schema lacks the details for a reliable example. Use `deepline describe affinity_v2_opportunities_opportunity_id_notes_get --json` for the complete live contract.

## Input reference

Returns Notes for a given Opportunity which includes directly attached notes and those attached to persons on this Opportunity. You can filter notes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `creator.id` | `int32` | `=` | `creator.id=1` | | `createdAt` | `datetime` | `&gt;`, ` =`, ` `, ` =`, ` =2025-02-03T10:48:24Z` |

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `payload.opportunityId` | `integer` | Yes | — | Opportunity ID Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `payload.filter` | `string` | No | — | Filter options |
| `payload.cursor` | `string` | No | — | Cursor for the next or previous page |
| `payload.limit` | `integer` | No | `20` | Number of items to include in the page Format: `int32`. Minimum: 0. Maximum: 100. |
| `payload.totalCount` | `boolean` | No | `false` | Include total count of the collection in the pagination response |

<details>
  <summary>Show raw input schema</summary>

  ### Input JSON Schema

  ```json theme={"languages":{"custom":["/languages/deepline-prompt.json"]}}
  {
    "type": "object",
    "description": "Returns Notes for a given Opportunity which includes directly attached notes and those attached to persons on this Opportunity. You can filter notes using the `filter` query parameter. The filter parameter is a string that you can specify conditions based on the following properties. | **Property Name** | **Type** | **Allowed Operators** | **Examples** | |---|---|---|---| | `creator.id` | `int32` | `=` | `creator.id=1` | | `createdAt` | `datetime` | `>`, ` =`, ` `, ` =`, ` =2025-02-03T10:48:24Z` |",
    "properties": {
      "opportunityId": {
        "type": "integer",
        "description": "Opportunity ID",
        "minimum": 1,
        "maximum": 9007199254740991,
        "format": "int64"
      },
      "filter": {
        "type": "string",
        "description": "Filter options"
      },
      "cursor": {
        "type": "string",
        "description": "Cursor for the next or previous page"
      },
      "limit": {
        "type": "integer",
        "description": "Number of items to include in the page",
        "default": 20,
        "minimum": 0,
        "maximum": 100,
        "format": "int32"
      },
      "totalCount": {
        "type": "boolean",
        "description": "Include total count of the collection in the pagination response",
        "default": false
      }
    },
    "required": [
      "opportunityId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name | Type | Required | Default | Details |
| - | - | - | - | - |
| `result.data` | `object` | Yes | — | — |
| `result.data.data` | `array` | Yes | — | Maximum items: 100. |
| `result.data.data[].id` | `integer` | Yes | — | Format: `int32`. Minimum: 1. Maximum: 2147483647. |
| `result.data.data[].content` | `object` | Yes | — | — |
| `result.data.data[].content.html` | `string \| null` | Yes | — | — |
| `result.data.data[].creator` | `object` | Yes | — | — |
| `result.data.data[].creator.id` | `integer` | Yes | — | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].creator.firstName` | `string \| null` | Yes | — | — |
| `result.data.data[].creator.lastName` | `string \| null` | Yes | — | — |
| `result.data.data[].creator.primaryEmailAddress` | `string \| null` | Yes | — | Format: `email`. |
| `result.data.data[].creator.type` | `"internal" \| "collaborator" \| "external"` | Yes | — | Allowed: `internal`, `collaborator`, `external`. |
| `result.data.data[].mentions` | `array` | Yes | — | Maximum items: 100. |
| `result.data.data[].mentions[].id` | `integer` | Yes | — | Format: `int32`. Minimum: 1. Maximum: 2147483647. |
| `result.data.data[].mentions[].type` | `"person"` | Yes | — | — |
| `result.data.data[].mentions[].person` | `object` | Yes | — | — |
| `result.data.data[].mentions[].person.id` | `integer` | Yes | — | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].mentions[].person.firstName` | `string \| null` | Yes | — | — |
| `result.data.data[].mentions[].person.lastName` | `string \| null` | Yes | — | — |
| `result.data.data[].mentions[].person.primaryEmailAddress` | `string \| null` | Yes | — | Format: `email`. |
| `result.data.data[].mentions[].person.type` | `"internal" \| "collaborator" \| "external"` | Yes | — | Allowed: `internal`, `collaborator`, `external`. |
| `result.data.data[].createdAt` | `string` | Yes | — | Format: `date-time`. |
| `result.data.data[].updatedAt` | `string \| null` | Yes | — | Format: `date-time`. |
| `result.data.data[].repliesCount` | `integer` | No | — | Format: `int32`. Minimum: 0. Maximum: 2147483647. |
| `result.data.data[].opportunitiesPreview` | `object` | No | — | — |
| `result.data.data[].opportunitiesPreview.data` | `array` | No | — | Maximum items: 100. |
| `result.data.data[].opportunitiesPreview.data[].id` | `integer` | Yes | — | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].opportunitiesPreview.data[].name` | `string` | Yes | — | — |
| `result.data.data[].opportunitiesPreview.data[].listId` | `integer` | Yes | — | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].opportunitiesPreview.data[].listName` | `string` | Yes | — | — |
| `result.data.data[].opportunitiesPreview.data[].isRestricted` | `boolean` | Yes | — | — |
| `result.data.data[].opportunitiesPreview.data[].isRedacted` | `boolean` | Yes | — | — |
| `result.data.data[].opportunitiesPreview.totalCount` | `integer` | No | — | Format: `int64`. Minimum: 0. Maximum: 9007199254740991. |
| `result.data.data[].personsPreview` | `object` | No | — | — |
| `result.data.data[].personsPreview.data` | `array` | No | — | Maximum items: 100. |
| `result.data.data[].personsPreview.data[].id` | `integer` | Yes | — | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].personsPreview.data[].firstName` | `string \| null` | Yes | — | — |
| `result.data.data[].personsPreview.data[].lastName` | `string \| null` | Yes | — | — |
| `result.data.data[].personsPreview.data[].primaryEmailAddress` | `string \| null` | Yes | — | Format: `email`. |
| `result.data.data[].personsPreview.data[].type` | `"internal" \| "collaborator" \| "external"` | Yes | — | Allowed: `internal`, `collaborator`, `external`. |
| `result.data.data[].personsPreview.totalCount` | `integer` | No | — | Format: `int64`. Minimum: 0. Maximum: 9007199254740991. |
| `result.data.data[].companiesPreview` | `object` | No | — | — |
| `result.data.data[].companiesPreview.data` | `array` | No | — | Maximum items: 100. |
| `result.data.data[].companiesPreview.data[].id` | `integer` | Yes | — | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.data[].companiesPreview.data[].name` | `string` | Yes | — | — |
| `result.data.data[].companiesPreview.data[].domain` | `string \| null` | Yes | — | Format: `hostname`. |
| `result.data.data[].companiesPreview.totalCount` | `integer` | No | — | Format: `int64`. Minimum: 0. Maximum: 9007199254740991. |
| `result.data.data[].type` | `"entities" \| "interaction" \| "ai-notetaker" \| "user-reply" \| "ai-notetaker-reply"` | Yes | — | — |
| `result.data.data[].interaction` | `object` | No | — | — |
| `result.data.data[].interaction.id` | `integer` | Yes | — | — |
| `result.data.data[].interaction.type` | `"meeting"` | Yes | — | — |

The table shows the first 50 fields. Use the live contract below for every field.

> [!NOTE]
>
> This output schema is too large for an inline display. Read the complete live contract with `deepline describe affinity_v2_opportunities_opportunity_id_notes_get --json`.

## Deepline cost

* Pricing model: `fixed` (per call).
* Estimated Deepline credits: `0` per pricing unit.
* Provider-native pricing may still exist outside Deepline credit billing.

## Related documentation

* [Affinity provider guide](https://deepline.com/docs/providers/affinity/guide.md)
* [SDK V2 quickstart](https://deepline.com/docs/sdk-v2/quickstart.md)
* [SDK reference](https://deepline.com/docs/sdk-v2/sdk-reference.md)
* [Run tools across a CSV](https://deepline.com/docs/sdk-v2/batch-csv.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.