/
Action Item REST API

Action Item REST API

PMP-81268 - Getting issue details... STATUS


Background and strategic fit

The purpose of this Integration is to get action item to support our growing customer base to analyze the data they are entering through the ProcessMAP solution.This document provides information on how to consume the API's by the end Users.

Assumptions

  • Individual APIs being used for action item detail
  • ProcessMAP system User permissions would not be considered while exposing the data
  • ProcessMAP assumes anyone who is accessing the Outbound API has required authority to access Personal Information
  • The user would have to input a single Location Code(e.g. Westlake) each time to consume that Location data
  • Data to be accessed with a limitation of 2 years duration at a time to avoid any performance issues.
  • Data will be shown in Readable JSON format
  • Fields Names in the Response would be Product Field Naming. Customers will have to use mapping documentation
  • User accessing this endpoint through a valid Token & ConsumerId, provided by ProcessMAP, will have access to complete data
  • Owner  Information will be as nested
  • Asset Information will be as nested
  • DATETIME, INT, and FLOAT data will be shown as NULL when there is no data
  • Pin Location Information and Default CAPA is not considered for this release
  • The data that is being shown in response is in EST Date time format ONLY
  • Certain fields are auto-populated in Application but the same will not reflect in JSON until the form is saved

User Interaction

Implementation : 

AUTHENTICATION URL DETAILS [  Base URL with Auth EndPoint ] 

Action Item Details

Request

GET papi/v1/calendar/ActionItems?locationCode={locationCode}&dateFrom={dateFrom}&dateTo={dateTo}&lastSyncedDate={lastSyncedDate}

Ex: papi/v1/calendar/ActionItems?locationCode=westlake&dateFrom=2019-07-01&dateTo=2019-07-30&lastSyncedDate=2019-01-01


URI Parameters

Location Code, DateFrom, DateTo and LastSyncedDate are to be passed as parameters.

DateFrom and DateTo are required when LastSyncedDate is not provided.

When DateFrom, DateTo and LastSyncedDate are provided, data will be returned based on LastSyncedDate only.

Name        Description           Type      Additional information
locationCode

        Represents the unique code of the location for which action item records to return.

           string

      Required

dateFrom

        Represents the starting date of action item records to return.

           date

      Required but value optional

dateTo

        Represents the ending date of action item records to return.

           date

      Required but value optional

lastSyncedDate        Represents the data from the action item due date.           date      Required but value optional


Headers

NameDescriptionSample
AuthorizationRepresents the value of the authentication token.
       Allow multiple values: no.
Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...
ConsumerIdRepresents the value of the consumer id.
       Allow multiple values: no.
9999
UseridRepresents the value of the user id.
       Allow multiple values: no.
1000

Response

Sample:


Action Items": [

      {

        "Source ID":  "sample string",

        "Source Title": "sample string",

        "Action Item ID": "sample string",

        "Action Item Title": "sample string",

        "Action Item Category": "sample string",

        "Action Item Type": "Corrective Action",

        "Root Cause": "sample string",

        "Action Item Description":"sample string",

        "Action Item Priority": "sample string",

        "Action Item Due Date": "2019-11-06T00:00:00.000Z",

        "Owners":

        [

          "sample string"

        ],

        "Notify Owners Immediately": "sample string",

        "Responsible Department": "sample string",

      "Assets":

       [

          "sample string"

       ],

        "Hierarchy of Controls": "sample string",

         "Assigned By":  "sample string",

        "Verification Required":  "sample string",    

     "Verify User":

      [

          "sample string"

      ],

        "Approval Status":  "sample string",

        "Approval Comment":  "sample string",

        "Approver":  "sample string",

        "Approval Date": "2019-10-06T00:00:00.000Z",

        "Action Item Status":  "sample string",

        "Response":  "sample string",

        "Score":  "sample string",

        "Action Taken":  "sample string",

        "Action Item Completed By":  "sample string",

        "Completed Date": "2019-10-06T00:00:00.000Z",

        "Due Date Extension": "sample string",

        "Requested Due Date Extension":  "sample string",

        "Reason for Due Date Extension": "sample string",

        "Due Date Extension Request Approved?": "sample string",

        "Reason for not extending the Due Date": "sample string",

        "Verification Status": "sample string",

        "Verification Performed": "sample string",

        "Onsite When": "sample string",

        "Verified By": "sample string"

        "Verification Date":"sample string"

        "Verification Comments":"sample string",

        "Capital Expenditure Involved": "sample string"

        "Approximate Cost": "sample string"

        "Estimated Budget":"sample string",

        "Actual Costs":"sample string",

        "Memo":"sample string",

      }

    ]

Action Item Field List

Section Field NameDatabase Column Size
Source Details    

Source IDNVARCHAR(400)

Source TitleNVARCHAR(400)

All modules source information?
Create 

Action Item ID

Action Item TitleNVARCHAR(50)

Action Item CategoryINT, NVARCHAR(50)

Action Item TypeNVARCHAR(50)

Root CauseINT, NVARCHAR(50)

Action Item DescriptionNVARCHAR(2000)

Action Item PriorityINT

Action Item Due DateDATETIME

OwnersINT, NVARCHAR(50)

Notify Owners Immediately

Responsible DepartmentINT, NVARCHAR(50)

AssetINT, NVARCHAR(50)

Hierarchy of ControlsINT, NVARCHAR(50)

Assigned ByVARCHAR(50)

Verification requiredINT

Verify User

All modules customer-specific fields? 
Approval

Approval StatusINT

Approvers

Approval CommentNVARCHAR(2000)

Approval DateDATETIME
Complete  

Action Item Status

Response

Score

Action TakenNVARCHAR(2000)

Action item Completed ByVARCHAR(50)

Action item Completed DateDATETIME

Due Date ExtensionNVARCHAR(2000)

Requested Due Date Extension DATETIME

Reason for Due Date ExtensionNVARCHAR(2000)

Due Date Extension Request Approved?NVARCHAR(2000)

Reason for not extending the Due Date.NVARCHAR(2000)
Review/Verify

Verification StatusINT

Verification PerformedVARCHAR(50)

Onsite When

Verified ByINT

Verification DateDATETIME

CommentsNVARCHAR(2000)
Cost Information   

Capital Expenditure involved

Approximate cost

Estimated Budget

Actual Cost

Memo

Errors/Validation Messages

Generic Error codes are given below.

HTTP ERROR 401

{
"HttpStatusCode": 401,
"HttpStatus": "Unauthorized",
"ErrorCode": 1030,
"ErrorMessage": "Invalid tenant."
}

If the location code given is invalid:

{
"Message": "Invalid Location Code"
}

(When FromDate, ToDate and LastSyncedDate are empty) or (FromDate, ToDate and LastSyncedDate are given in incorrect format of DD-MM-YYYY)

{
"Message": "Date From or Date To should not be empty"
}

When FromDate is greater than ToDate and LastSyncedDate is empty

{
"Message": "Date From is greater than Date To"
}

When LastSyncedDate is greater than current date

{

"Message": "Last Synced Date is a Future Date"
}

Questions

Below is a list of questions to be addressed as a result of this requirements document:

QuestionOutcome








© 2018 ProcessMAP Corporation, All Rights Reserved Confidential, may not be disclosed without the express permission of ProcessMAP Corporation