POST create new criteria / subcriteria

Creates a new criteria or subcriteria for the specified prioritization. The prioritization is specified by the identifier which is the prioritization ID. When creating a subcriteria the identifier of the criteria it belongs to must also be sent as a POST parameter.


Constraints:

  • Minimum number of criteria per prioritization: 2
  • Maximum number of criteria per prioritization: 10

  • Minimum number of sub criteria per criteria: 2
  • Maximum number of sub criteria per criteria: 10

Resource URL:

https://api.priotice.se/rest/{auth}/criteria/create

POST parameters:

Variable name
(case sensitive)
Required Variable type Note
PrioID Required integer Prioritization identifier (PrioID value returned by prioritization details method)
CriteriaID Required
(for subcriteria)
integer Criteria identifier (CriteriaID value returned by list criteria method)
CriteriaTitle Required string Criteria title
CriteriaDetails Optional string An optional short description for the criteria
RateCategory Optional string If rating has been defined as a method for the prioritization this value is required. One of the available rating scales must be specified. Available rating scales are:
rate_high_low
rate_most_impo
rate_exce_poor
rate_extr_unim
rate_good_bad
rate_large_small
rate_veryhigh_verylow
rate_large_small_inverted
Rating scales details can be obtained by getting the rating scales list.
Inverted in rating scale mean that values are inverted for rating. Used for criteria where large value is worse: Cost for instance.
At least 2 POST parameters are required, PrioID and CriteriaTitle. When creating a subcriteria the identifier of the criteria it belongs to must also be sent as a POST parameter. Optional parameters that are not being sent are not being updated.

Data returned:

If will return a success status along with the CriteriaID of the Criteria that was inserted if the operation was successful. Else, it will return an error code.

Example request

POST https://api.priotice.se/rest/d41d8cd98f00b204e9800998ecf8427e/criteria/create

Example response:

{ "Status": "success", "Data": { "CriteriaID": 128 } }

CURL example Create Criteria:

curl --data "PrioID=50&CriteriaTitle=CriteriaA" https://api.priotice.se/rest/d41d8cd98f00b204e9800998ecf8427e/criteria/create

CURL example Create Sub Criteria:

curl --data "PrioID=50&CriteriaID=128&CriteriaTitle=CriteriaA_SubcriteriaA" https://api.priotice.se/rest/d41d8cd98f00b204e9800998ecf8427e/criteria/create