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

# Supplier Matching & Comparison

> Run supplier-finding and catalogue-comparison workflows.

<Note>
  Authenticate every request with `Authorization: Bearer clr_live_YOUR_API_KEY`.
</Note>

## Start supplier finding

<Badge color="blue">POST</Badge> `/objects/{objectId}/supplier-finding`

Start supplier finding through the Claro Public API.

**Required scopes:** `objects`, `team`

### Parameters

| Name       | Location | Type   | Required |
| ---------- | -------- | ------ | -------- |
| `objectId` | path     | string | Yes      |

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "row_id": "00000000-0000-4000-8000-000000000003",
  "min_suppliers": 10,
  "search_tier": "focus"
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/objects/$OBJECT_ID/supplier-finding" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "row_id": "00000000-0000-4000-8000-000000000003",
    "min_suppliers": 10,
    "search_tier": "focus"
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  object_id = "YOUR_OBJECT_ID"
  url = f"https://platform.getclaro.ai/api/public/v1/objects/{object_id}/supplier-finding"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "row_id": "00000000-0000-4000-8000-000000000003",
    "min_suppliers": 10,
    "search_tier": "focus"
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const objectId = "YOUR_OBJECT_ID";

  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/objects/${objectId}/supplier-finding`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "row_id": "00000000-0000-4000-8000-000000000003",
      "min_suppliers": 10,
      "search_tier": "focus"
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Generate catalogue comparison details

<Badge color="blue">POST</Badge> `/objects/comparison/details/stream`

Generate catalogue comparison details through the Claro Public API.

**Required scopes:** `objects`, `team`

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "primaryId": "00000000-0000-4000-8000-000000000001",
  "supplierId": "00000000-0000-4000-8000-000000000002"
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/objects/comparison/details/stream" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "primaryId": "00000000-0000-4000-8000-000000000001",
    "supplierId": "00000000-0000-4000-8000-000000000002"
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  url = f"https://platform.getclaro.ai/api/public/v1/objects/comparison/details/stream"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "primaryId": "00000000-0000-4000-8000-000000000001",
    "supplierId": "00000000-0000-4000-8000-000000000002"
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/objects/comparison/details/stream`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "primaryId": "00000000-0000-4000-8000-000000000001",
      "supplierId": "00000000-0000-4000-8000-000000000002"
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.text();
  ```
</CodeGroup>

### Responses

* `200` - Server-sent workflow events
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Generate catalogue product matches

<Badge color="blue">POST</Badge> `/objects/comparison/product-matches/stream`

Generate catalogue product matches through the Claro Public API.

**Required scopes:** `objects`, `team`

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "primaryId": "00000000-0000-4000-8000-000000000001",
  "supplierId": "00000000-0000-4000-8000-000000000002"
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/objects/comparison/product-matches/stream" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "primaryId": "00000000-0000-4000-8000-000000000001",
    "supplierId": "00000000-0000-4000-8000-000000000002"
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  url = f"https://platform.getclaro.ai/api/public/v1/objects/comparison/product-matches/stream"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "primaryId": "00000000-0000-4000-8000-000000000001",
    "supplierId": "00000000-0000-4000-8000-000000000002"
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/objects/comparison/product-matches/stream`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "primaryId": "00000000-0000-4000-8000-000000000001",
      "supplierId": "00000000-0000-4000-8000-000000000002"
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.text();
  ```
</CodeGroup>

### Responses

* `200` - Server-sent workflow events
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Get saved comparison statuses

<Badge color="blue">POST</Badge> `/objects/comparison/results/status`

Get saved comparison statuses through the Claro Public API.

**Required scopes:** `objects`, `team`

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "primaryId": "00000000-0000-4000-8000-000000000001",
  "supplierIds": [
    "00000000-0000-4000-8000-000000000002"
  ]
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/objects/comparison/results/status" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "primaryId": "00000000-0000-4000-8000-000000000001",
    "supplierIds": [
      "00000000-0000-4000-8000-000000000002"
    ]
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  url = f"https://platform.getclaro.ai/api/public/v1/objects/comparison/results/status"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "primaryId": "00000000-0000-4000-8000-000000000001",
    "supplierIds": [
      "00000000-0000-4000-8000-000000000002"
    ]
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/objects/comparison/results/status`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "primaryId": "00000000-0000-4000-8000-000000000001",
      "supplierIds": [
        "00000000-0000-4000-8000-000000000002"
      ]
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Get a saved catalogue comparison result

<Badge color="green">GET</Badge> `/objects/comparison/result`

Get a saved catalogue comparison result through the Claro Public API.

**Required scopes:** `objects`, `team`

### Parameters

| Name         | Location | Type   | Required |
| ------------ | -------- | ------ | -------- |
| `primaryId`  | query    | string | Yes      |
| `supplierId` | query    | string | Yes      |

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X GET "https://platform.getclaro.ai/api/public/v1/objects/comparison/result?primaryId=YOUR_PRIMARY_ID&supplierId=YOUR_SUPPLIER_ID" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY"
  ```

  ```python Python theme={null}
  import requests
  url = f"https://platform.getclaro.ai/api/public/v1/objects/comparison/result?primaryId=YOUR_PRIMARY_ID&supplierId=YOUR_SUPPLIER_ID"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  response = requests.get(url, headers=headers)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/objects/comparison/result?primaryId=YOUR_PRIMARY_ID&supplierId=YOUR_SUPPLIER_ID`, {
    method: "GET",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
    },
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.

***

## Review a catalogue product match

<Badge color="blue">POST</Badge> `/objects/comparison/product-matches/{matchId}/review`

Review a catalogue product match through the Claro Public API.

**Required scopes:** `objects`, `team`

### Parameters

| Name      | Location | Type   | Required |
| --------- | -------- | ------ | -------- |
| `matchId` | path     | string | Yes      |

### Request body

Content type: `application/json` (required)

```json Request example theme={null}
{
  "reviewStatus": "APPROVED"
}
```

### Example request

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST "https://platform.getclaro.ai/api/public/v1/objects/comparison/product-matches/$MATCH_ID/review" \
    -H "Authorization: Bearer clr_live_YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    --data '{
    "reviewStatus": "APPROVED"
  }'
  ```

  ```python Python theme={null}
  import json
  import requests
  match_id = "YOUR_MATCH_ID"
  url = f"https://platform.getclaro.ai/api/public/v1/objects/comparison/product-matches/{match_id}/review"
  headers = {"Authorization": "Bearer clr_live_YOUR_API_KEY"}
  payload = json.loads(r'''{
    "reviewStatus": "APPROVED"
  }''')
  response = requests.post(url, headers=headers, json=payload)
  response.raise_for_status()
  print(response.text)
  ```

  ```javascript JavaScript theme={null}
  const matchId = "YOUR_MATCH_ID";

  const response = await fetch(`https://platform.getclaro.ai/api/public/v1/objects/comparison/product-matches/${matchId}/review`, {
    method: "POST",
    headers: {
      Authorization: "Bearer clr_live_YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      "reviewStatus": "APPROVED"
    }),
  });

  if (!response.ok) throw new Error(await response.text());
  const data = await response.json();
  ```
</CodeGroup>

### Responses

* `200` - Successful response
* `Default` - Error response. Rate-limited responses use HTTP 429.
