> For the complete documentation index, see [llms.txt](https://docs.sync.comake.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.sync.comake.io/api-reference/recommended-deduplications.md).

# Recommended Deduplications

## Get Recommended Deduplications

## Get a list of recommendations of entities to deduplicate.

<mark style="color:green;">`POST`</mark> `https://acvb.standard.storage/api/custom/recommended-deduplications`

Gets a list of recommendations of entities to deduplicate which have not been approved or rejected yet. Includes a similarity score for each recommendation. Requires a Bearer token in the Authorization header.

Example request using curl:

`curl -X POST --header "Authorization: Bearer abc123.mytoken" https://acvb.standard.storage/api/custom/recommended-deduplications`

#### Request Body

| Name       | Type    | Description                                                                   |
| ---------- | ------- | ----------------------------------------------------------------------------- |
| page       | integer | <p>The page of results to get.</p><p>Default: 0</p>                           |
| page\_size | integer | <p>How many results to get per page.</p><p>Default: 50</p><p>Maximum: 200</p> |

{% tabs %}
{% tab title="200 Retrieved recommended deduplications successfully" %}
A sucessful response will contain a JSON object containing:

**page**: number - The page which was retrieved.

**has\_next\_page**: boolean - Whether there are more results than the previous retrieved pages or not.

**total**: number - The total number of results across all pages for the supplied parameters.

**data**: array - The list of Recommended Deduplication results which each have a nested array of entities. Each entity is formatted as a [json-ld](https://json-ld.org/) object which follow the [schema.org](https://schema.org/) ontology.

```json
{
  "page": 0,
  "has_next_page": false,
  "total": 1,
  "data": {
    "@context": { ... },
    "@graph": [
      {
        "@id": "https://acvb.standard.storage/data/1026f461-ecf4-4a38-bf20-1bc17cf0098c",
        "@type": "https://standardknowledge.com/ontologies/core/DeduplicationRecommendation",
        "score": 0.13001734,
        "entities": [
          {
            "@id": "https://acvb.standard.storage/data/acvb/locations/3616",
            "@type": "https://schema.org/PostalAddress",
            "integration": "https://acvb.standard.storage/integrations/ACVB",
            "sourceId": "3616",
            "url": "www.atlantasymphony.org",
            "name": "Atlanta Symphony Hall",
            "telephone": "404-733-6615",
            "identifier": "3616",
            "address": {
              "postalCode": "30309",
              "addressRegion": "Georgia",
              "streetAddress": "at Woodruff Arts Center 1280 Peachtree Street NE",
              "addressCountry": "US",
              "addressLocality": "Atlanta",
            }
          },
          {
            "@id": "https://acvb.standard.storage/data/seatgeek/locations/1210",
            "@type": "https://schema.org/PostalAddress",
            "integration": "https://acvb.standard.storage/integrations/SeatGeek",
            "sourceId": "1210",
            "name": "Atlanta Symphony Hall",
            "identifier": "1210",
            "address": {
              "postalCode": "30309",
              "addressRegion": "Georgia",
              "streetAddress": "1280 Peachtree St Atlanta, GA 30309",
              "addressCountry": "US",
              "addressLocality": "Atlanta",
            }
          }
        ]
      }
    ]
  }
}
```

{% endtab %}

{% tab title="401 Permission denied - Invalid Authorization token" %}

{% endtab %}

{% tab title="402 Permission deined - Invalid Authorization header" %}

{% endtab %}
{% endtabs %}

## Approve a Recommended Deduplication

## Approve a recommendation.

<mark style="color:green;">`POST`</mark> `https://acvb.standard.storage/api/custom/recommended-deduplications/approve`

Approves a recommendation and connects the associated entities as duplicates. The approved recommendation will no longer appear in the response to the [Get Recommendations](#get-recommendations) endpoint. Requires a Bearer token in the Authorization header.

Example request using curl:

`curl -X POST --header "Authorization: Bearer abc123.mytoken" acvb.standard.storage/api/custom/recommended-deduplications/approve --data '{"id":"https://knowledge.standard.storage/data/1026f461-ecf4-4a38-bf20-1bc17cf0098c"}'`

#### Request Body

| Name                                 | Type   | Description                              |
| ------------------------------------ | ------ | ---------------------------------------- |
| id<mark style="color:red;">\*</mark> | string | The id of the recommendation to approve. |

{% tabs %}
{% tab title="200 Approved the recommendation successfully" %}
A sucessful response will contain a JSON object containing:

**success**: `true` - An indication that the entities were successfully deduplicated.
{% endtab %}

{% tab title="400 Bad Request - Incorrectly formatted parameters" %}

{% endtab %}

{% tab title="401 Permission denied - Invalid Authorization token" %}

{% endtab %}

{% tab title="402 Permission deined - Invalid Authorization header" %}

{% endtab %}
{% endtabs %}

## Reject a Recommended Deduplication

## Reject a recommendation.

<mark style="color:green;">`POST`</mark> `https://acvb.standard.storage/api/custom/recommended-deduplications/reject`

Rejects a recommendation, making it so that the recommendation will no longer appear in the response to the [Get Recommendations](#get-recommendations) endpoint. Requires a Bearer token in the Authorization header.

Example request using curl:

`curl -X POST --header "Authorization: Bearer abc123.mytoken" acvb.standard.storage/api/custom/recommended-deduplications/reject --data '{"id":"https://knowledge.standard.storage/data/1026f461-ecf4-4a38-bf20-1bc17cf0098c"}'`

#### Request Body

| Name                                 | Type   | Description                             |
| ------------------------------------ | ------ | --------------------------------------- |
| id<mark style="color:red;">\*</mark> | string | The id of the recommendation to reject. |

{% tabs %}
{% tab title="200 Rejected the recommendation successfully" %}
A sucessful response will contain a JSON object containing:

**success**: `true` - An indication that the recommendation was successfully rejected.
{% endtab %}

{% tab title="400 Bad Request - Incorrectly formatted parameters" %}

{% endtab %}

{% tab title="401 Permission denied - Invalid Authorization token" %}

{% endtab %}

{% tab title="402 Permission deined - Invalid Authorization header" %}

{% endtab %}
{% endtabs %}
