
## Get a requisite link

`GET /v1/requisite-links/:entityTypeId/:entityId`

Returns a specific requisite link by the owner identifier pair.

## Parameters

| Parameter | Type | Required | Description |
|----------|-----|:-----:|---------|
| `entityTypeId` (path) | number | yes | Link owner type. Values — [Link fields](/docs/entities/requisite-links/fields) |
| `entityId` (path) | number | yes | Owner ID. The source depends on the type — see the same reference |

## Examples

### curl — personal key

```bash
curl "https://vibecode.bitrix24.com/v1/requisite-links/2/3773" \
  -H "X-Api-Key: YOUR_API_KEY"
```

### curl — OAuth application

```bash
curl "https://vibecode.bitrix24.com/v1/requisite-links/2/3773" \
  -H "X-Api-Key: YOUR_APP_KEY" \
  -H "Authorization: Bearer USER_SESSION_TOKEN"
```

### JavaScript — personal key

```javascript
const entityTypeId = 2
const entityId = 3773

const res = await fetch(
  `https://vibecode.bitrix24.com/v1/requisite-links/${entityTypeId}/${entityId}`,
  { headers: { 'X-Api-Key': 'YOUR_API_KEY' } },
)

const { success, data } = await res.json()
console.log('Client requisite:', data.requisiteId)
```

### JavaScript — OAuth application

```javascript
const entityTypeId = 2
const entityId = 3773

const res = await fetch(
  `https://vibecode.bitrix24.com/v1/requisite-links/${entityTypeId}/${entityId}`,
  {
    headers: {
      'X-Api-Key': 'YOUR_APP_KEY',
      'Authorization': 'Bearer USER_SESSION_TOKEN',
    },
  },
)

const { success, data } = await res.json()
```

## Response fields

| Field | Type | Description |
|------|-----|---------|
| `success` | boolean | Always `true` on success |
| `data` | object | Link object |
| `data.entityTypeId` | number | Owner type. Values — [Link fields](/docs/entities/requisite-links/fields) |
| `data.entityId` | number | Owner ID |
| `data.requisiteId` | number | Attached client requisite ID, `0` — not linked. Source: [`GET /v1/requisites`](/docs/entities/requisites/list) |
| `data.bankDetailId` | number | Attached client bank detail ID, `0` — not linked. Source: [`GET /v1/bank-details`](/docs/entities/bank-details/list) |
| `data.mcRequisiteId` | number | Your company's requisite ID, `0` — not linked |
| `data.mcBankDetailId` | number | Your company's bank detail ID, `0` — not linked |

## Response example

```json
{
  "success": true,
  "data": {
    "entityTypeId": 2,
    "entityId": 3773,
    "requisiteId": 45,
    "bankDetailId": 0,
    "mcRequisiteId": 0,
    "mcBankDetailId": 0
  }
}
```

## Error response example

404 — there is no link for this pair:

```json
{
  "success": false,
  "error": {
    "code": "ENTITY_NOT_FOUND",
    "message": "Not found"
  }
}
```

## Errors

| HTTP | Code | Description |
|------|-----|---------|
| 404 | `ENTITY_NOT_FOUND` | Bitrix24 returned a "not found" error: there is no link for the `entityTypeId` and `entityId` pair, or the owner entity itself does not exist |
| 404 | `NOT_FOUND` | Bitrix24 returned an empty result instead of an error — there is no link for this pair |
| 400 | `INVALID_ANCHOR` | `entityTypeId` or `entityId` in the path is not a positive integer |
| 403 | `SCOPE_DENIED` | API key lacks the `crm` scope |
| 401 | `TOKEN_MISSING` | API key has no configured tokens |

Full list of common API errors — [Errors](/docs/errors).

## Known specifics

**A link has no separate numeric `id`.** It is identified by the pair of owner values — `entityTypeId` and `entityId`, both passed in the path.

**A missing link and missing attachments are different states.** If the link was never registered, the response is `404`. If the link is registered but no requisite is attached to it, the response is `200` and all four identifiers equal `0`.

## See also

- [List links](/docs/entities/requisite-links/list)
- [Register a link](/docs/entities/requisite-links/register)
- [Update a link](/docs/entities/requisite-links/update)
- [Delete a link](/docs/entities/requisite-links/unregister)
- [Link fields](/docs/entities/requisite-links/fields)
