# Fund a deal

Moves one deal's FUNDING track by naming the action: request, approve, process, fund, confirm, fail, reverse or cancel — plus `fund-and-transition`, which funds and moves the deal's own status in the same transaction, so a refused status leaves neither. Opening the track needs a contract that has reached fully_signed or executed, and `request` needs a positive funded amount: nothing is funded on the strength of an offer alone. Answers the track. Deals page only.

Access class: `def:read`.

## Endpoint

`POST /v1/definitions/{key}/rows/{rowId}/funding`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| key | path | string | Yes |
| rowId | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "accountLast4": "string",
    "achTraceNumber": "string",
    "action": "string",
    "bankName": "string",
    "batchId": "",
    "buyoutAmount": 1.5,
    "code": "string",
    "commissionAmount": 1.5,
    "dealStage": "string",
    "dealStatus": "string",
    "externalTransactionId": "",
    "feeAmount": 1.5,
    "fundedAmount": 1.5,
    "fundingMethod": "string",
    "generateSchedule": true,
    "notes": "string",
    "paymentAmount": 1.5,
    "paymentFrequency": "string",
    "reason": "string",
    "scheduleStartDate": "string",
    "totalPayments": 1,
    "wireReference": "string"
  },
  "params": {
    ":key": "string",
    ":rowId": ""
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "history": [
      {
        "action": "string",
        "actorKind": "string",
        "actorUserId": "",
        "createdAt": "string",
        "detail": "string",
        "entityId": "",
        "entityKind": "string",
        "entityRowId": "",
        "entityUuid": "string",
        "id": "",
        "requestId": ""
      }
    ],
    "status": "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"
}
```
