Skip to main content

Decision

Overview

The Decision API is the core service within Decisively and allows for interaction with the underlying rule base. In the context of EdWard you should only call this API to handle timesheet entry interviews. Whilst you can call this service to create and update timesheets directly, you should use the timesheets service to manage this process.

tip

All endpoints in this service use the Base URL of /decisionapi/MODEL/RELEASE

1. Start Interview

  • Endpoint: /session
  • Method: POST
  • Summary: Starts interview with any additional data

Request Parameters:

Provided in the URL

  • session (required, string): The ID of the timesheet

Provided in the JSON body:

{
"interview": "Name or GUID of the interview you want to run",
"save": false,
"goal": "Path to the interview goal", //Depends on your configuration",
"response": [
{
"type": "attributes",
"ids": [],// Array of GUIDs. Check your configuration]
}
],
"data": {
"@parent": "path to the workday you are entering time for", // Depends on your configuration
"the timesheet workday date": "2025-03-03",
"timesheet_work_periods": [{
"@id": "new"
}]
}
}

Response:

{
"context": {
"entity": "timesheet_work_periods",
"id": "new",
"parent": "path to this timesheet goal" // Depends on your rule base
},
"data": {
"@parent": "path to this timesheet", // Depends on your rule base
// Then the GUIDs of the attributes you need to provide to progress the time entry
},
"steps": [
// Information about the steps of your interview
],
"screen": {
"title": "Step 1",
"id": "64cbcf2d-ec17-41c7-946a-8039238ad689/new",
"controls": [
// Information about which controls should be displayed on the screen
],
"attributes": [
// Information about the attributes tracked or collected on the screen
],
"type": "interview",
"buttons": {
"next": true,
"back": false
}
},
"state": [
// Information about dependencies within the dynamic controls on the screen
],
"progress": {
"percentage": 0,
"time": 15
},
"sessionId": "d4ee0f8b-d970-4529-bdc2-68ec42f45157",
"interactionId": "8b023a8f-4745-414c-9a6b-b71c35a5e0c1",
"status": "in-progress",
"explanations": {},
"model": "16a6256a-eb45-46a8-a2ac-29271432369d",
"release": "00dc32e1-47d9-4952-99dd-cea2191930de",
"locale": "en-au",
"reporting": {
// Information about the response attributes you requested
},
"goal": "goal of the interview",
"timing": {
// Performance timing information
}
}

Authentication

Please refer to the authentication guide to understand how to authenticate your requests before interacting with the API.


Error Handling

Please refer to the error handling guide for details on common errors and how to handle them.