> ## 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 Get

> Get a single Opportunity. Includes SDK V2 and CLI requests, input constraints, response fields, and Deepline credit cost.

Get a single Opportunity.

<Info>
  Tool ID: `affinity_v2_opportunities_opportunity_id_get`
</Info>

## Run this action

Use the TypeScript SDK for a single call. Put `ctx.tools.execute(...)` inside a Play when the call should be durable, scheduled, or run across a CSV.

```ts theme={null}
import { Deepline } from 'deepline';

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

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

### CLI

```bash theme={null}
deepline tools execute affinity_v2_opportunities_opportunity_id_get --input '{
  "opportunityId": 123
}' --json
```

## Example response

The SDK exposes this shape at `result.toolResponse.raw`. Values below are representative.

```json theme={null}
{
  "data": {
    "id": 123,
    "name": "Example",
    "listId": 123,
    "listName": "Example",
    "isRestricted": true,
    "isRedacted": true
  }
}
```

Use `deepline tools get affinity_v2_opportunities_opportunity_id_get --json` for the latest machine-readable contract.

## Input reference

Returns basic information but **not** field data on the requested Opportunity. To access field data on Opportunities, use the `/lists/&#123;list_id&#125;/list-entries` or the `/v2/lists/&#123;list_id&#125;/saved-views/&#123;view_id&#125;/list-entries` GET endpoint.

| Name                    | Type      | Required | Default | Details                                                                |
| ----------------------- | --------- | -------- | ------- | ---------------------------------------------------------------------- |
| `payload.opportunityId` | `integer` | Yes      | —       | Opportunity ID Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |

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

  ### Input JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "description": "Returns basic information but **not** field data on the requested Opportunity. To access field data on Opportunities, use the `/lists/{list_id}/list-entries` or the `/v2/lists/{list_id}/saved-views/{view_id}/list-entries` GET endpoint.",
    "properties": {
      "opportunityId": {
        "type": "integer",
        "description": "Opportunity ID",
        "minimum": 1,
        "maximum": 9007199254740991,
        "format": "int64"
      }
    },
    "required": [
      "opportunityId"
    ],
    "additionalProperties": false
  }
  ```
</details>

## Output reference

| Name                       | Type      | Required | Default | Details                                                 |
| -------------------------- | --------- | -------- | ------- | ------------------------------------------------------- |
| `result.data`              | `object`  | Yes      | —       | —                                                       |
| `result.data.id`           | `integer` | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.name`         | `string`  | Yes      | —       | —                                                       |
| `result.data.listId`       | `integer` | Yes      | —       | Format: `int64`. Minimum: 1. Maximum: 9007199254740991. |
| `result.data.listName`     | `string`  | Yes      | —       | —                                                       |
| `result.data.isRestricted` | `boolean` | Yes      | —       | —                                                       |
| `result.data.isRedacted`   | `boolean` | Yes      | —       | —                                                       |
| `result.meta`              | `object`  | No       | —       | —                                                       |

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

  ### Output JSON Schema

  ```json theme={null}
  {
    "type": "object",
    "properties": {
      "data": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "listId": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991,
            "format": "int64"
          },
          "listName": {
            "type": "string"
          },
          "isRestricted": {
            "type": "boolean"
          },
          "isRedacted": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "listId",
          "listName",
          "name",
          "isRestricted",
          "isRedacted"
        ],
        "additionalProperties": false
      },
      "meta": {
        "type": "object",
        "additionalProperties": true
      }
    },
    "required": [
      "data"
    ],
    "additionalProperties": false
  }
  ```
</details>

## 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](/docs/providers/affinity/guide)
* [SDK V2 quickstart](/docs/sdk-v2/quickstart)
* [SDK reference](/docs/sdk-v2/sdk-reference)
* [Run tools across a CSV](/docs/sdk-v2/batch-csv)
