Settings

Settings is the master data to store the configuration value to calculate job value.

GET/v1/settings

List settings

This endpoint allows you to retrieve a setting.

Response

  • Name
    min_kpi
    Type
    number
    Description

    The minimum kpi for the job calculation.

  • Name
    min_coc
    Type
    number
    Description

    The minimum coc for the job calculation.

Request

GET
/v1/settings
const response = axios.get('/v1/settings')

Response

{
  "min_kpi": "60",
  "min_coc": "40",
  "created_by": "637d83d15d2be122007524bf",
  "created_at": "2022-01-01T00:00:00.000Z",
}

PATCH/v1/settings

Update setting

This endpoint allows you to perform an update on a setting.

Request

Required attributes

  • Name
    min_kpi
    Type
    number
    Description

    The min kpi for the setting.

  • Name
    min_coc
    Type
    number
    Description

    The min coc for the setting.

Request

PATCH
/v1/settings
const response = axios.patch('/v1/settings', {
  min_kpi: "60",
  min_coc: "40",
})

Response

{
  "matched_count": 1,
  "modified_count": 1
}