> For the complete documentation index, see [llms.txt](https://partner.doc.bunq.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://partner.doc.bunq.com/documentation/bunq-as-a-service/chapter-1-creating-a-user-provision/closing-a-provision.md).

# Closing a Provision

**Endpoint:**

```http
PUT /v1/partner-user-provision/{provision_id}
```

**Request Body:**

```json
{
    "status": "CANCELLED"
}
```

**Response:**

```json
{
    "Response": [
        {
            "Id": {
                "id": 123
            }
        }
    ]
}
```

**After cancellation:**

```json
{
    "Response": [
        {
            "PartnerUserProvision": {
                "id": 123,
                "external_uuid": "550e8400-e29b-41d4-a716-446655440000",
                "status": "CLOSED",
                "sub_status": "NONE",
                "action_required": "NONE",
                "products": ["USER_VERIFIED"],
                "label_user": {...},
                "oauth_request": {...},
                "credential": null
            }
        }
    ]
}
```

#### Main Status Values

| `CREATED`   | Provision created, processing in progress |
| ----------- | ----------------------------------------- |
| `ACTIVE`    | Provision fully active and operational    |
| `CANCELLED` | Provision cancelled by request            |
| `FAILED`    | Provision failed during processing        |
| `CLOSED`    | Provision closed and no longer active     |

#### Sub Status Values

**Main Status Values**

| `CREATED`   | Provision created, processing in progress |
| ----------- | ----------------------------------------- |
| `ACTIVE`    | Provision fully active and operational    |
| `CANCELLED` | Provision cancelled by request            |
| `FAILED`    | Provision failed during processing        |
| `CLOSED`    | Provision closed and no longer active     |

**Sub Status Values**

| `NONE`                            | Any         | No specific sub-process active         |
| --------------------------------- | ----------- | -------------------------------------- |
| `PENDING_PROCESS_USER`            | `CREATED`   | Creating bunq user account             |
| `PENDING_PROCESS_RELATION_USER`   | `CREATED`   | Establishing partner-user relationship |
| `PENDING_PROCESS_OAUTH_REQUEST`   | `CREATED`   | Setting up OAuth access                |
| `PENDING_PROCESS_USER_ONBOARDING` | `CREATED`   | Processing user onboarding             |
| `PENDING_PROCESS_CLOSURE`         | `CANCELLED` |                                        |
