# Record a deal cost

Records a cost against a funded deal, reducing its net revenue. Body: `dealId` (required), `category`, `description`, `vendor`, `currency`, `amountMinor`. There is no chart of accounts in this workspace: spend is a typed row against the deal whose revenue it reduces, not a bucket on a chart.

Access class: `workspace`.

## Endpoint

`POST /v1/accounting/deal-costs`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "amountMinor": 1,
    "category": "string",
    "currency": "string",
    "dealId": 1,
    "description": "string",
    "vendor": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "amountMinor": 1,
    "category": "string",
    "createdAt": "string",
    "currency": "string",
    "dealId": 1,
    "description": "string",
    "detail": {},
    "id": 1,
    "paidAt": "string",
    "status": "string",
    "updatedAt": "string",
    "vendor": "string",
    "voidReason": "string",
    "voidedAt": "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"
}
```
