CORE MIS PPM APP & API
CORE MIS PPM App is an android mobile app which works with the CORE MIS to disburse cash payments to beneficiaries using an offline system.
The whole user experience of the PPM app can be summarized in the screens below:
Mobile APP
API:
Preferably the API is also available via Swagger, but we are using this document as the first introduction due to it being inaccessible at the moment.
FEW THINGS TO NOTE:
All requests are POST
Authentication is via Basic Auth
Request body is JSON.
APIs
Login : Request Param: (username, password) /api/mobile/v1/user/login
Sample Response:
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON OBJECT WITH DETAILS BELOW;
"message:"SUCCESS"
}
String id;
String username;
String fullname;
String phone;
String email;
Date firstRunDate;
String institutionName;
Integer loginCount;
Date lastLogin;
Date lastActivityDate;
Date lastSyncData;
String deviceId;
boolean requiresPasswordReset;
boolean active;
Date dateCreated;
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
Request Parameter: ("paymentDetailName": ["K",”B”], paymentPointName:”” channel:PPM)
Sample Response:
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON OBJECT WITH DETAILS BELOW;
"message:"SUCCESS"
}
Double TOTAL_AMOUNT
Double TOTAL_AMOUNT_PAID
Long TOTAL_BENEFICIARY
Long TOTAL_BENEFICIARY_PAID
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
List of recent disbursements /api/mobile/v1/payment/reconciliation/payments/channel
Request Parameters (channel: PPM, offset, limit)
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON OBJECT WITH DETAILS BELOW;
"message:"SUCCESS"
}
String id;
String subprojectId;
String programmeNumber;
String beneficiaryId;
String beneficiaryUUID;
String fullName;
String fileName;
String reconciliationFileName;
String lastName;
String firstName;
String householdRole;
String districtName;
String sectionName;
String villageName;
String localityName;
String provinceName;
String regionName;
String chiefdomName;
String countyName;
String subCountyName;
String parishName;
String householdId;
Double amount;
Double amountDelivered;
String deliveryChannel;
String deliveryChannelId;
String paymentReceipt;
String paymentTag;
boolean paymentReceiptAnImage;
boolean delayed;
String base64PhotoString;
String base64IdCardString;
String photoURL;
String idCardURL;
String base64ReconciliationPhotoString;
String base64ReconciliationIdCardString;
String photoReconciliationURL;
String idCardReconciliationURL;
String pspChannel;
String accountNumber;
String beneficiaryDataSource;
String paymentDetailName;
Date dateCreated;
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
Fetch Payrolls Per PPM /api/mobile/v1/payment/details/channel
Request Parameters (channel: PPM)
Sample Response:
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON ARRAY WITH DETAILS BELOW;
"message:"SUCCESS"
}
"SK": {
"TOTAL_AMOUNT_PAID": 0,
"TOTAL_AMOUNT_PAID_TO_PPM_RECEIPT": "N/A",
"TOTAL_AMOUNT_PAID_TO_PPM_BY_USER_EMAIL": "N/A",
"IS_RECONCILED": false,
"TOTAL_AMOUNT_PAID_TO_PPM": 0,
"TOTAL_AMOUNT_PAID_TO_PPM_BY_USER": "N/A",
"TOTAL_AMOUNT": 8190,
"TOTAL_BENEFICIARY_PAID": 0
},
"MK": {
"TOTAL_AMOUNT_PAID": 0,
"TOTAL_AMOUNT_PAID_TO_PPM_RECEIPT": "N/A",
"TOTAL_AMOUNT_PAID_TO_PPM_BY_USER_EMAIL": "N/A",
"IS_RECONCILED": false,
"TOTAL_AMOUNT_PAID_TO_PPM": 0,
"TOTAL_AMOUNT_PAID_TO_PPM_BY_USER": "N/A",
"TOTAL_AMOUNT": 10500,
"TOTAL_BENEFICIARY_PAID": 0
}
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
Fetch list of Geo Data Point for Payroll /api/mobile/v1/payment/geolocation/query/uniquevalues
Request Parameters (paymentDetailName": ["K"], channel: PPM)
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON OBJECT WITH DETAILS BELOW;
"message:"SUCCESS"
}
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
Fetch list of Paypoints per Payroll /api/mobile/v1/payment/points/channel
Request Parameters (paymentDetailName": ["K"], channel: PPM)
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON OBJECT WITH DETAILS BELOW;
"message:"SUCCESS"
}
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
Sync reconciliation and close payroll /api/mobile/v1/payment/reconciliation/payments/sync
Request Parameters (paymentDetailName": "K", channel: PPM,"invoices":[])
Sample :
{
"paymentDetailName": "SK",
"channel":"PPM",
"invoices":[
{
"id":"kKLljNLiuA",
"paymentDetailName":"SK",
"amountPaid":2.0,
"receipt":"1234",
"datePaid":"2021-05-31 13:59:59",
"base64PhotoString;
"base64IdCardString;
"photoURL;
"idCardURL;
"receivedByMainBeneficiary":true,
"gpsLongitude":4.2
"gpsLatitude":0.2
}
]
}
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON OBJECT WITH DETAILS BELOW;
"message:"SUCCESS"
}
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
Note: This will update last sync date of user object to confirm success
Change password (new password) /api/mobile/v1/user/password/change
Request Parameters (oldpassword": "", confirmpassword: ““,newpassword:””)
password.regex=(?=.*[0-9])(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&!+=])(?=\\S+$).{8,}
Response Structure : SUCCESS
{"status":true
"count":1;
"result": JSON OBJECT WITH DETAILS BELOW;
"message:"SUCCESS"
}
Response Structure : FAILURE
{"status":false
"count":1;
"result": REASON FOR FAILURE HERE;
"message:"ERROR"
}
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. https://creativecommons.org/licenses/by-sa/4.0/