# Complete an obligation

Marks what was owed as done, stamping who closed it and when. Body: optional `notes` and a `documentId` for the file that satisfies it. Legal from anything not already finished. Reach for `post_obligations_id_waive` when the obligation is being dropped rather than met.

Access class: `workspace`.

## Endpoint

`POST /v1/obligations/{id}/complete`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "documentId": 1,
    "notes": "string"
  },
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "amountMinor": 1,
    "assignedToUserId": 1,
    "breachSeverity": "string",
    "completedAt": "string",
    "completedByUserId": 1,
    "counterpartyId": 1,
    "createdAt": "string",
    "currency": "string",
    "dealRowId": "",
    "decisionId": 1,
    "description": "string",
    "detail": {},
    "documentId": 1,
    "dueAt": "string",
    "escalatedAt": "string",
    "escalatedToUserId": 1,
    "facilityId": 1,
    "id": 1,
    "isRecurring": true,
    "notes": "string",
    "obligationType": "string",
    "parentObligationId": 1,
    "priority": "string",
    "recurrenceRule": "string",
    "requiredDocumentType": "string",
    "responsibleParty": "string",
    "slaBreachAt": "string",
    "slaHours": 1,
    "status": "string",
    "submissionId": 1,
    "title": "string",
    "updatedAt": "string",
    "waivedAt": "string",
    "waivedByUserId": 1,
    "waivedReason": "string"
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
