> For the complete documentation index, see [llms.txt](/llms.txt).

# Create or update user application

**PUT** `https://www.iwoca.co.uk/api/lending/v2.2/customers/{customer_id}/applications/`

Creates or updates an Application for the customer. If an open application exists, it will be updated. Otherwise, a new application will be created.

## Path parameters
- `customer_id` (string, required) — The unique customer_id used to represent a customer.

## Body
```json
{
  "data": {
    "requests": [
      {
        "amount": 15000,
        "duration": {
          "amount": 12,
          "unit": "months"
        }
      }
    ]
  }
}
```

### Body fields
- `data` (any, required)
- `data.introducer` (object)
- `data.introducer.entity_to_contact` (string)
- `data.introducer.introducer_id` (string) — The unique id of the introducer this application should be assigned to. This id is generated by iwoca when the introducer signs up for an iwoca portal account at https://www.iwoca.co.uk/introducer/ and can be retrieved from the /introducers/ endpoint.
- `data.last_12_months_turnover` (object) — Estimated revenue over the last 12 months. For a young business without a full year of revenue, revenue to date should be given.
- `data.last_12_months_turnover.amount` (number, required) — Amount submitted by customer in local currency or other estimate.
- `data.last_12_months_turnover.valid_from` (string, required) — Datetime when user submitted data, with expected ISO 8601 format.
- `data.requests` (array, required)
- `data.requests[].amount` (number, required)
- `data.requests[].detailed_purpose` (string) — detailed_purpose is usually submitted if a purpose of other has been set.
- `data.requests[].duration` (object)
- `data.requests[].duration.amount` (number, required)
- `data.requests[].duration.unit` (string, required)
- `data.requests[].purpose` (string) — A purpose may not be submitted if the customer is simply looking to get approved for the future, rather than a specific need.
- `data.requests[].urgency` (string) — Describes whether the customer needs the funding immediately (asap), over the next few weeks (weeks) or is simply looking to get approved for future use (future).

## Responses
### 202 — success
```json
{
  "data": {
    "application_id": "00000000-0000-0000-0000-000000000000"
  }
}
```

### 400 — Bad Request
```json
{
  "errors": [
    {
      "code": "string",
      "detail": "string",
      "meta": {},
      "source": {
        "parameter": "string",
        "pointer": "string"
      }
    }
  ]
}
```

### 401 — Unauthorized
```json
{
  "errors": [
    {
      "code": "AuthenticationFailed",
      "detail": "string",
      "meta": {}
    }
  ]
}
```

### 403 — Permission Denied
```json
{
  "errors": [
    {
      "code": "PermissionDenied",
      "detail": "string",
      "meta": {}
    }
  ]
}
```

### 404 — Not Found
```json
{
  "errors": [
    {
      "code": "NotFound",
      "detail": "string",
      "meta": {}
    }
  ]
}
```

### 406 — Not Acceptable
```json
{
  "errors": [
    {
      "code": "string",
      "detail": "string",
      "meta": {}
    }
  ]
}
```

### 409 — Conflict
```json
{
  "errors": [
    {
      "code": "string",
      "detail": "string",
      "meta": {}
    }
  ]
}
```

### 500 — Unexpected Error
```json
{
  "errors": [
    {
      "code": "string",
      "detail": "string",
      "meta": {}
    }
  ]
}
```

## Example (curl)
```bash
curl 'https://www.iwoca.co.uk/api/lending/v2.2/customers/<customer_id>/applications/' \
  --request PUT \
  --header 'Authorization: Bearer <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "data": {
    "requests": [
      {
        "amount": 15000,
        "duration": {
          "amount": 12,
          "unit": "months"
        }
      }
    ]
  }
}'
```