v1

latestOpenAPI 3.0.02026-08-04265791.1 MB
Incentives 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

incentive_idstring
start_timestring
end_timestring
owner_idstring
participant_idstring
participant_typestring
totalnumber
weightnumber
countnumber

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

incentive_kpi_idstring required
incentive_idstring required
start_timestring required
end_timestring required
owner_idstring required
first_namestring required
last_namestring required
usernamestring required
participant_idstring required
participant_typestring required
totalnumber required
weightnumber required
countnumber required
created_datestring required
updated_datestring required
product_idstring
product_namestring
pricenumber

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"
  }
]