# Face compare

## Submit photo to face compare

<mark style="color:green;">`POST`</mark> `https://biometrid.com/api/providers/:stepId/face-compare-2d2d?processId=:processId`

This endpoint allows you to submit two photo for face compare.

#### Path Parameters

| Name | Type   | Description           |
| ---- | ------ | --------------------- |
| id   | string | ID of the step to get |

#### Query Parameters

| Name      | Type   | Description                             |
| --------- | ------ | --------------------------------------- |
| processId | string | ID of the process, to save the response |

#### Headers

| Name            | Type   | Description                  |
| --------------- | ------ | ---------------------------- |
| Accept-Language | string | en (default), pt             |
| Content-Type    | string | application/json             |
| Authentication  | string | Authentication account token |

#### Request Body

| Name      | Type   | Description   |
| --------- | ------ | ------------- |
| template1 | string | Base64 string |
| template2 | string | Base64 string |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "data": {
    "status": true,
    "confidence": 1.0000002980232239,
    "result": {
      "bbox1": {
        "x1": 229,
        "x2": 495,
        "y1": 81,
        "y2": 347
      },
      "bbox2": {
        "x1": 229,
        "x2": 495,
        "y1": 81,
        "y2": 347
      },
      "confidence": 1.0000002980232239,
      "verified": true
    }
  },
  "meta": {
    "message": "Success."
  },
  "status": true
}
```

{% endtab %}

{% tab title="400 " %}

```javascript
{
  "data": {},
  "meta": {
    "message": "Invalid action type",
    "code": "BIOSSGA002"
  },
  "status": false
}

{
  "data": {},
  "meta": {
    "message": "Required provider field",
    "code": "BIONLVL011"
  },
  "status": false
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "data": {},
  "meta": {
    "message": "Step not found",
    "code": "BIOSSGB001"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}
