v1
latestOpenAPI 3.0.02026-08-04265791.1 MBIncentives Kpi
Create
You may create a new single incentives-kpi or multiple incentives-kpi using this action.
When creating a single incentives-kpi the body contains a json object, when creating multiple incentives-kpi the body contains an array of objects.
Warning: a maximum of 1000 items can be sent in a single request.
post/public/api/incentives-kpi
Headers
Acceptstring
e.g. application/json
Request body
Example request
{
"incentive_id": "5eb8fd017d5ff5748adcaf08",
"start_time": "2019-05-21T04:51:40.862Z",
"end_time": "2019-05-28T04:51:40.862Z",
"owner_id": "5eb8fd017d5ff5748adcaef4",
"participant_id": "5eb8fd017d5ff5748adcaef4",
"participant_type": "individual",
"total": 35,
"weight": 5,
"count": 7
}Response
OK
Example response
[
{
"incentive_kpi_id": "5eb8fd147d5ff5748adcb097",
"incentive_id": "5eb8fd017d5ff5748adcaf08",
"start_time": "2019-05-21T04:51:40.862Z",
"end_time": "2019-05-28T04:51:40.862Z",
"owner_id": "5eb8fd017d5ff5748adcaef4",
"first_name": "John",
"last_name": "Doe",
"username": "jdoe@mycompany.com",
"participant_id": "5eb8fd017d5ff5748adcaef4",
"participant_type": "individual",
"total": 35,
"weight": 5,
"count": 7,
"created_date": "2020-05-11T07:21:56.182Z",
"updated_date": "2020-05-11T08:21:56.182Z"
},
{
"incentive_kpi_id": "5eb8fd147d5ff5748adcb096",
"incentive_id": "5eb8fd017d5ff5748adcaf08",
"participant_id": "api_team",
"product_id": "5eb8fd017d5ff5748adcaef5",
"product_name": "myproduct",
"owner_id": "5eb8fd017d5ff5748adcaef4",
"first_name": "John",
"last_name": "Doe",
"username": "jdoe@mycompany.com",
"start_time": "2020-01-01T00:00:00.000Z",
"end_time": "2020-01-31T23:59:59.999Z",
"total": 20,
"count": 2,
"weight": 2,
"price": 5,
"participant_type": "teams",
"created_date": "2020-05-11T07:21:56.182Z",
"updated_date": "2020-05-11T08:21:56.182Z"
}
]