/
KPI Data Outbound API

KPI Data Outbound API

Background and strategic fit

The purpose of this Integration is to pull over KPI  data to support our growing customer base to analyze the data they are entering through the ProcessMAP solution.

Assumptions

  • ProcessMAP assumes anyone who is accessing the Outbound API has required authority to access Personal Information
  • User accessing this endpoint through a valid Token & ConsumerId, provided by ProcessMAP, will have access to complete data
  • User would have to input single Location Code(e.g. Westlake) each time to consume that Location data
  • Data to be accessed with a limitation of 1 years duration at a time to avoid any performance issues(Meaning, only up to one year's worth of data can be pulled at a time)
  • Data will be shown in Readable JSON format
  • Field Names in the Response would be Customer Field Naming
  • DATETIME, INT and FLOAT data will be shown as NULL when there is no data
  • The date that is being shown in response is in EST Date time format ONLY

AUTHENTICATION URL DETAILS [ Base URL with Auth EndPoint ] 

Please note that the above Auth Token expires after every 120 minutes.

Example:

Response

BASE URL + Endpoint FOR RESPECTIVE API CALLS : 

Endpoint : GET papi/v1/eca/kpidata?locationCode={locationCode}&year={Year}


URI Parameters

  1. Location Code, Year and LastSyncedDate are to be passed as parameters
  2. Location Code and Year are required parameter but LastSyncedDate is optional
  3. When both Year and LastSyncedDate are provided, data returned will be any record created/updated since LastSyncedDate for the Year


NameDescriptionTypeAdditional information
LocationCode

Represents the unique code of location for which KPI Data should be returned.

string

Required

Year

Represents the year for which the KPI data should be pulled.

int

Required

LastSyncedDateRepresents the date when API was last calleddateOptional


Sample Parameters


Headers

NameDescriptionSample
Authorization

Represents the value of the authentication token.

Allow multiple values: no.

Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ...
ConsumerId

Represents the value of the consumer id.

Allow multiple values: no.

2426

Sample JSON



Field List

KPI Outbound Field List

SectionField NameDatabase Column Size

LocationNVARCHAR(200)
Program Info

Program IdINT

Program NameNVARCHAR(100)
KPI Info

KPI IDINT

KPI NameNVARCHAR(250)
Reported Values

PeriodNVARCHAR(50)

Section NameNVARCHAR(100)

Reported ValueDECIMAL(32,10)

Site UOMNVARCHAR(50)

Conversion FactorDECIMAL(32,10)

Corporate DataDECIMAL(32,10)

Corporate UOMNVARCHAR(50)

Method Of MeasureNVARCHAR(200)

Created ByNVARCHAR(200)

Created DateDATETIME

Updated ByNVARCHAR(200)

Updated DateDATETIME

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



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