---
# System prepended metadata

title: Untitled

---




## Create an Application

```
POST /api/application
Accept: application/json
Content-Type: application/json

{
  "name": "Alex",
  "surname": "Shvorak",
  "desiredModelId": 5,
  "desiredColorId": 24,
  "phoneNumber": "89999999999",
  "specifiedPrice": 5044444
}
```

```json
{
  "id": 12,
  "version": 1,
  "name": "Alex",
  "surname": "Shvorak",
  "phoneNamber": "89999999999",
  "desiredModelId": 5,
  "desiredColorId": 24,
  "specifiedPrice": "5044444",
  "managerId": null,
  "dealerId": null,
  "dealerManagerId": null,
  "status": 'new',
  "createdAt": '2023-01-15 16:23:19',
}
```



## Take an Application by Manufacturer Manager

This request should be made by authentifacated user (manager)

```
POST /api/application/{id}/manager
Authorization: ...
```

```json
{
  "id": 12,
  "version": 2,
  "name": "Alex",
  "surname": "Shvorak",
  "phoneNamber": "89999999999",
  "desiredModelId": 5,
  "desiredColorId": 24,
  "specifiedPrice": "5044444",
  "managerId": 17,
  "dealerId": null,
  "dealerManagerId": null,
  "status": "new",
  "createdAt": '2023-01-16 09:05:20',
}
```


## Assign a Dealer by Manufacturer Manager

```
POST /api/application/{id}/dealer
Accept: application/json
Content-Type: application/json

{
  "dealerId": 67
}
```

```json
{
  "id": 12,
  "version": 3,
  "name": "Alex",
  "surname": "Shvorak",
  "phoneNamber": "89999999999",
  "desiredModelId": 5,
  "desiredColorId": 24,
  "specifiedPrice": "5044444",
  "managerId": 17,
  "dealerId": 67,
  "dealerManagerId": null,
  "status": "new",
  "createdAt": '2023-01-16 09:05:20',
}
```


## Accept & Decline Application by Dealer's Manager

This request should be made by Dealer's Manager and it's id will be added into Application

```
POST /api/application/{id}/accept
Accept: application/json
Content-Type: application/json
Authorization: ...
```

```json
{
  "id": 12,
  "version": 5,
  "name": "Alex",
  "surname": "Shvorak",
  "phoneNamber": "89999999999",
  "desiredModelId": 5,
  "desiredColorId": 24,
  "specifiedPrice": "5044444",
  "managerId": 17,
  "dealerId": 67,
  "dealerManagerId": 1250,
  "status": "new",
  "createdAt": '2023-01-16 09:05:20',
}
```