Patascore APIs
  • Patascore
  • Authentication
  • Customer Operations
    • Register Customer
    • Fetch Customer
  • Verification & Credit Data Operations
    • Fetch Verification
    • Mobiloanscore (Sync)
    • Mobiloanscore (Async)
  • Business Verification
    • Business Verification
    • Fetch Results (Optional)
  • MPESA Operations
    • Upload Statement (Extraction)
    • Extraction Status
    • Scoring Results
  • Bank Operations
    • Upload Statement (Extraction)
    • Scoring Results
  • Transactions Operations
    • Submit Transactions
    • Fetch Score Results
  • Financial Education
    • Fetch Modules
    • Fetch Websocket Conversaction
    • Fetch Customer Session Summary
    • Fetch Customer Summary
    • Fetch Program Summary
    • Customer Subscription
      • Subscribe to Websocket
  • Billing Operations
    • Account Balance
    • Topups
    • Account Usage
Powered by GitBook
On this page
  • General Principals
  • Root of the API
  • Available HTTP VERBS
  • Response Structure
  • Webhooks/Callback URLs
  • Errors

Was this helpful?

Patascore

Financial health. Financial Prosperity. Financial wealth.

NextAuthentication

Last updated 3 months ago

Was this helpful?

This document defines the new web service specifications for the Patascore services. It also illustrates the technologies and protocols used to support cross platform cross language interaction between the Patascore web services and Patascore clients. The API is REST based, and the data-exchange format is JSON. The API follows HTTP rules, enabling a wide range of HTTP clients can be used to interact with the API.

General Principals

Root of the API

The API gateway offers a set of endpoints that can be reached via the following root URI’s depending on the environment:

  • Development/Testbed: https://dev.api.patascore.com/

  • Production: https://api.patascore.com/

Available HTTP VERBS

Patascore APIs use appropriate HTTP verbs for every action

Method

Description

GET

Used for retrieving resources.

POST

Used for creating resources and performing resource actions.

PUT

Used for updating resources.

DELETE

Used for deleting resources.

Data submitted to the API must be in JSON format, all responses from the API are also in JSON format.

Response Structure

The response structure for Patascore APIs follows the below format.

{
   "status":200,
   "message":"Successfully logged in",
   "data":{
      "national_id":"12345678",
      "phone":"254707001122",
      "name":"Anthony Kamau Mathenge",
      "id":1328774,
      "uuid":"b493a591-46a3-46c7-8c1d-0537d00f977c"
   }
}

Webhooks/Callback URLs

Webhooks are user-defined HTTP callbacks triggered by an event. Patascore uses webhooks to asynchronously let your application know when events happen Eg,

  • Mpesa statement analytics process completion

  • CRB data fetch completion

Errors

Errors are always returned as an array of error objects, keyed by errors in the top level of a JSON object along with an error status & message

{
   "status":400,
   "message":"Validation failed for one or more arguments",
   "errors":[
      "channel: Channel is mandatory"
   ]
}