# Engage a vendor

Admin only. name and kind are required, and kind is processor, attorney, credit_bureau, notary or other. Contract dates are YYYY-MM-DD, or null when they are not on file, and an end date before its start is refused. A second vendor under the same name, case-insensitively, is refused as a conflict.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workspace/vendors`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "active": true,
    "contactEmail": "string",
    "contactName": "string",
    "contactPhone": "string",
    "contractEndsOn": "string",
    "contractStartedOn": "string",
    "kind": "string",
    "name": "string",
    "notes": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "active": true,
    "contactEmail": "string",
    "contactName": "string",
    "contactPhone": "string",
    "contractEndsOn": "string",
    "contractStartedOn": "string",
    "createdAt": "string",
    "createdBy": 1,
    "documents": [
      {
        "fileId": "",
        "name": "string",
        "pinnedAt": "string",
        "pinnedBy": "string"
      }
    ],
    "id": "",
    "kind": "string",
    "name": "string",
    "notes": "string",
    "updatedAt": "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"
}
```
