# November 27, 2023 

** Set and Retrieve Fee Type and Fee Value on a Work Item. **
---

This document provides an overview of the November 27, 2023 Karbon API release.

In this release we have added **Fee Type** and **Fee Value** on the `WorkItems` API endpoint - this makes it possible to set, retrieve and update Fee Settings on a Work Item.

1. `POST WorkItem, PUT WorkItem`
2. `GET WorkItem`

---

`POST WorkItem and PUT WorkItem`

Endpoint: `https://api.karbonhq.com/v3/WorkItems`

When used with `POST` and `PUT` methods, this end point allows you to optionally specify a `FeeSettings` object where `FeeType` and `FeeValue` can be provided.

Valid values for `FeeType` are `TimeAndMaterials`, `NonBillable` or `FixedFee`.

If the `FeeType` is specified as `TimeAndMaterials` or `NonBillable`, then `FeeValue` must be `null`.

When `FeeType` is specified as `FixedFee`, a numerical value must be provided for `FeeValue`.

**Example use case**

You want to create a Work Item to be `FixedFee` and have a value of 1,210.50.

Include the following JSON object in the request payload:

```JSON
"FeeSettings": {
  "FeeType": "FixedFee",
  "FeeValue": 1210.5000
}
```

Making a `POST` request to: `https://api.karbonhq.com/v3/WorkItems`

---

`GET WorkItem`

Endpoint: `https://api.karbonhq.com/v3/WorkItems`

When used with `GET` method, this end point will return a `FeeSettings` object, when `FeeSettings` have been defined on the Work Item - either through the API of the Karbon UI.

**Example use case**

You want to retrieve a Work Item and its Fee Settings which were previously defined in the UI in Karbon as Time and Materials.
Endpoint: `https://api.karbonhq.com/v3/WorkItems/{WorkItemkey}`

This will return a JSON response with a Work Item as the payload, including the `FeeSettings` object:

```JSON
"FeeSettings": {
  "FeeType": "TimeAndMaterials",
  "FeeValue": null
}
```
