# Accept

## Get Cakes

<mark style="color:purple;">`PATCH`</mark> `https://biometridon.polygon.pt/api/processes/:id/accept`

This endpoint allows you to accept a process.

#### Path Parameters

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

#### Headers

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| Authorization | string | Authentication user token |

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

```bash
{
  "data": {
    "_id": "5f0d693011cf0913a8938733",
    "clientId": "5f0c47f039d7fa2b986c6510",
    "flowId": "5f0d690a11cf0913a8938730",
    "remainingSteps": [],
    "stepData": [
      {
        "step": "5f0c47f3170f5f0a900cbf1e",
        "data": {
          "account_type": "123456",
          "account_holder": "1",
          "client_account_purpose": "P01",
          "funds_origin": "OU",
          "other_funds_origin": "1",
          "accept_terms_conditions": "1",
          "date_of_accept_term_conditions": "01/01/2019",
          "name": "ruben",
          "surname": "rocha",
          "client_email": "ruben.rocha@polygon.pt",
          "client_phonenumber": "913354444",
          "personal_data_aut1": "1",
          "client_nif": "123456789",
          "personal_data_aut2": "1",
          "telef_verif_ind": "1",
          "date_of_phone_validation": "01/01/2019"
        }
      }
    ],
    "status": "approved",
    "deviceType": "other",
    "settings": {
      "guide": [],
      "processUsername": [
        "stepData.data.name",
        "stepData.data.surname"
      ]
    },
    "videos": [],
    "notes": [],
    "log": [
      {
        "action": "process-approved",
        "entityType": "agent",
        "entityId": "5f0c47f039d7fa2b986c6513",
        "created_at": "2020-07-14T08:14:27.120Z"
      }
    ],
    "corrections": [],
    "delete_at": "2020-07-16T08:13:36.836Z",
    "created_at": "2020-07-14T08:13:36.836Z",
    "updated_at": "2020-07-14T08:14:27.121Z",
    "finished_at": "2020-07-14T08:13:38.803Z"
  },
  "meta": {
    "message": "Process accepted with success."
  },
  "status": true
}
```

{% endtab %}

{% tab title="403 " %}

```bash
{
  "data": {},
  "meta": {
    "message": "Process is not in finished state",
    "code": "3012"
  },
  "status": false
}
```

{% endtab %}

{% tab title="404 " %}

```bash
{
  "data": {},
  "meta": {
    "message": "Process not found",
    "code": "4015"
  },
  "status": false
}
```

{% endtab %}
{% endtabs %}
