Partner Management Service APIs

This section details about the service API in the Partner Management module.

For securely accessing any API in MOSIP, you must gain authentication token from kernel authentication manager.

  1. Authenticate through client-id/Secret or User Id/Password having respective roles assigned in IAM.

  2. After successful authentication access token will set as Authorization cookies.

  3. Access API through postman by passing the access token in cookies.

MOSIP common authentication and authorization APIs would be used for authentication and generation of secured authentication token.

{
  "id": "string",
  "version": "string",
  "requesttime": "2018-12-10T06:12:52.994Z",
  "metadata": {},
  "request": {
     "appId": "partnermanagement",
     "userName": "pmadmin",
     "password": "pmadmin"     
  }
}

After hitting the API, you will get the authorization token in the cookie.

Prerequisite for Partner Management Module

  1. Digital certificate sharing between MOSIP and Partners

  2. MISP (MOSIP Infrastructure Service Provider) Creation

  3. Master data related to Partner Management - like Policy Groups, Partner Manager mappings to Policy Groups, Policy Manager mappings to Policy Groups, Master policy for the country

Partner Management APIs

Partner Management APIs are categorized into following services

  • MISP Management Service This service would be used by MOSIP Admin for management of MISP(MOSIP Infrastructure Service Provider), management of MISP license keys issued to MISP, activation and deactivation of MISP and MISP license keys, getting details about MISP and MISP license keys

  • Policy Management Service This service would be used by Policy Manager for management of Policies. Policy manager would be able to create, update and get policy details.

  • Partner Management Service This service would be used by Partner Manager for management of partner requests. Partners belonging to specific policy group would be able to raise request for issuance of Partner API Keys. Partner Manager would be able to approve OR reject such partner requests. Before approving the partner request for API keys, partner manager would review the request, generate partner API key and map the API key with the policy(ies). By using this service, partner manager would be able to view partner details for given partner API Key, along with the policy mapping for the API key, and its status (active/deactive)

  • Partner Service This service enables partners to do self registration, submit request for respective authentication policies available for the policy group, sharing of digital certificate for secure communication helping individual authentication through partners.

MISP Management Service

This service would be used by MOSIP admin for MISP(MOSIP Infrastructure Service Provider) management.

POST /misps

MOSIP Admin would be able to create MISP using this API. At the time of creation of MISP, MISP ID is generated and shared back in response. Post successful MISP creation, by default MISP is set to active status.Kernel ID generator API would be used to generate unique id as mentioned in Kernel ID Generator.

Resource URL

https://{base_url}/partnermanagement/v1/misps

Resource details

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.misp.create",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
      "name": "telecom",
      "contactNumber": "9876998888",
      "emailId": "prm@telecom.com",
      "address": "India"
  }
}

Responses

Success Response

Status code: 200

Description: MISP successfully created

{
  "id": "mosip.partnermanagement.misp.create",
  "version": "1.0",
  "responsetime": "2020-06-04T04:10:38.348Z",
  "metadata": null,
  "response": {
    "mispStatus": "Active",
    "mispID": "100"
  },
  "errors": []
}

Failure Response

Status code: 200

Description: MISP already registered

{
  "id": "mosip.partnermanagement.misp.create",
  "version": "1.0",
  "responsetime": "2019-05-14T16:46:39.582Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_003",
      "message": "A MISP is already registered with name - name"
    }
  ]
}

Other Failure details

PATCH /misps/{mispId}/status

This API would be used to approve or reject the MISP.Post successful MISP approval, MISP License key is generated and set to active status.MISP License key is configurable and set to expire in 3 months, 6 months OR any configurable period.

Resource URL

https://{base_url}/partnermanagement/v1/misps/{mispId}/status

Resource details

Request Path Parameters

Request Header

Request Body Parameters

Request

{
  "id": "mosip.partnermanagement.misp.status",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
      "mispStatus": "approved"
  }
}

Responses

Success Response

Status code: 200

{
  "id": "mosip.partnermanagement.misp.status",   
  "version": "1.0",
  "responsetime": "2020-04-15T10:38:33.745Z",
  "metadata": null,
  "response": {
    "mispStatus": "Active",
    "mispLicenseKey": "xNwJeS3vf6UL5b7QbGCDLfBxi8Ower4x0S0LwU14aXrZ2ngv5m",
    "mispLicenseKeyExpiry": "2020-05-15T16:08:33.767993400",
    "mispLicenseKeyStatus": "active",
    "mispID": "109",
    "mispStatusCode": "approved",
    "message": "MISP approved successfully"
  },
  "errors": []
}

Failure Response

Status code: 200

Description: MISP ID does not exist

{
  "id": null,
  "version": null,
  "responsetime": "2020-04-15T10:39:57.415Z",
  "metadata": null,
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_005",
      "message": "MISP ID does not exist  110"
    }
  ]
}

Other Failure details

PUT /misps/{mispId}

This API would be used to update MISP for given mispID.

Resource URL

https://{base_url}/partnermanagement/v1/misps/{mispId}

Resource details

Request Path Parameters

Request Header

Request Body Parameters

Request

{
  "id": "mosip.partnermanagement.misp.update",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
    "organizationName": "telecom",
    "contactNumber": "9876998888",
    "emailID": "prm@telecom.com",
    "address": "India"
  }
}

Responses

Success Response

Status code: 200

{
  "id": "mosip.partnermanagement.misp.update",
  "version": "1.0",
  "responsetime": "2019-06-03T06:47:10.838Z",
  "response": {
    "id": "64269837502851",
    "organizationName": "telecom",
    "contactNumber": "9876998888",
    "emailID": "prm@telecom.com",
    "address": "India"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: MISP Organization Name, MISP Contact Number, MISP Email ID, MISP Address - None available in request

{
  "id": "mosip.partnermanagement.misp.update",
  "version": "1.0",
  "responsetime": "2019-06-03T18:03:12.305Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_004",
      "message": "No information provided for update"
    }
  ]
}

Other Failure details

PATCH /misps/{mispId}/licenseKey

This API would be used for validating MISPs license key.

  1. Validate license key pattern.

  2. Validate license key is associated with the requested MISP id.

  3. Validate license key is Active or not.

Resource URL

https://{base_url}/partnermanagement/v1/misps/{mispId}/licenseKey

Resource details

Request Path Parameters

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.misp.license.validate",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
    "mispLicenseKey": "fa604-affcd-33201-04234"
  }
}

Responses

Success Response

Status code: 200

Description: MISP License validated successfully

{
  "id": "mosip.partnermanagement.misp.license.validate",
  "version": "1.0",
  "responsetime": "2019-05-20T09:48:43.395Z",
  "response": {
    "message": "MISP License key is valid",
  },
  "errors": null
}

Failure Response

Status code: 200

Description: MISP ID/MISP License Key not available in database

{
  "id": "mosip.partnermanagement.misp.license.validate",
  "version": "1.0",
  "responsetime": "2019-05-20T09:48:43.395Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_008",
      "message": "MISP License key not valid"
    }
  ]
}

Other Failure details

PATCH /misps/{mispId}

This API would be used to update MISP status for given MISP ID.

Resource URL

https://{base_url}/partnermanagement/v1/misps/{mispId}

Resource details

Request Path Parameters

Request Header

Request Body Parameters

Request

{
  "id": "mosip.partnermanagement.misp.status.update",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
    "mispStatus": "De-Active"
  }
}

Responses

Success Response

Status code: 200

{
  "id": "mosip.partnermanagement.misp.status.update",
  "version": "1.0",
  "responsetime": "2019-06-03T06:47:10.838Z",
  "response": {
    "message": "MISP deactivated successfully"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: MISP Organization Name, MISP Contact Number, MISP Email ID, MISP Address - None available in request

{
  "id": "mosip.partnermanagement.misp.status.update",
  "version": "1.0",
  "responsetime": "2019-06-03T18:03:12.305Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_009",
      "message": "Failed to update MISP status"
    }
  ]
}

Other Failure details

PUT /misps/{mispId}/licenseKey

This API would be used to activate/deactivate MISPs License Key for the MSIP ID.

Resource URL

https://{base_url}/partnermanagement/v1/misps/{mispId}/licenseKey

Resource details

Request Path Parameters

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.misp.license.update",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
    "mispStatus": "Active",
    "mispLicenseKey": "fa604-affcd-33201-04770",
    "mispLicenseKeyStatus": "De-Active"
  }
}

Responses

Success Response

Status code: 200

Description: MISP License updated successfully

{
  "id": "mosip.partnermanagement.misp.license.update",
  "version": "1.0",
  "responsetime": "2019-05-16T09:37:04.941Z",
  "response": {
    "status": "De-Active"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: MISP status, MISP License key status - None available in request

{
  "id": "mosip.partnermanagement.misp.license.update",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_004",
      "message": "No information provided for update"
    }
  ]
}

Other Failure details

GET /misps

This API would be used to retrieve all MISPs details.

Resource URL

https://{base_url}/partnermanagement/v1/misps

Resource details

Request Header

Responses

Success Response

Status code: 200

{
  "id": "mosip.partnermanagement.misp.retrieve",
  "version": "1.0",
  "responsetime": "2019-06-03T06:47:10.838Z",
  "response": {
    "mispDetails":[
      {
        "id": "64269837502851",
        "organizationName": "telecom",
        "contactNumber": "9876998888",
        "emailID": "prm@telecom.com",
        "address": "India"
      },
      {
        "id": "98869837502654",
        "organizationName": "airtelInd",
        "contactNumber": "9488998800",
        "emailID": "agm@airtelInd.com",
        "address": "India"
      }    
    ]      
  },
  "errors": null
}

Failure Response

Status code: 200

Description: No MISP details found

{
  "id": "mosip.partnermanagement.misp.status.update",
  "version": "1.0",
  "responsetime": "2019-06-03T18:03:12.305Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_012",
      "message": "No MISP details found"
    }
  ]
}

Other Failure details

GET /misps/mispId/{mispId}

This API would be used to retrieve the MISPs details based on given misp id.

Resource URL

https://{base_url}/partnermanagement/v1/misps/mispId/{mispId}

Resource details

Request Path Parameters

Request Header

Responses

Success Response

Status code: 200

{
  "id": "mosip.partnermanagement.misp.retrieve",
  "version": "1.0",
  "responsetime": "2019-06-03T06:47:10.838Z",
  "response": {
      "id": "64269837502851",
      "organizationName": "telecom",
      "contactNumber": "9876998888",
      "emailID": "prm@telecom.com",
      "address": "India"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: MISP ID does not exist

{
  "id": "mosip.partnermanagement.misp.status.update",
  "version": "1.0",
  "responsetime": "2019-06-03T18:03:12.305Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_005",
      "message": "MISP ID does not exist"
    }
  ]
}

Other Failure details

GET /misps/name/{mispOrgName}

This API would be used to retrieve MISPs details based on given name

  1. If MISP organization name present, then retrieve all misp details for matching organization name.

  2. If MISP organization name not present, then retrieve all misp details.

Resource URL

https://{base_url}/partnermanagement/v1/misps/name/{mispOrgName}

Resource details

Request Path Parameters

Request Header

Responses

Success Response

Status code: 200

Description: Config parameter retrieved successfully

{
  "id": "mosip.partnermanagement.misp.retrieve",
  "version": "1.0",
  "responsetime": "2019-05-14T16:01:20.534Z",
  "response": {
    "telecom": {
      "id": "64269837502851",
      "organizationName": "telecom",
      "contactNumber": "9876998888",
      "emailID": "prm@telecom.com",
      "address": "India",
      "status": "Active",
      "licenseKey": "fa604-affcd-33201-04770",
      "licenseKeyExpiry": "2022-12-31",
      "licenseKeyStatus": "Active"
    },
    "telecomIndia": {
      "id": "93469837502851",
      "organizationName": "telecomIndia",
      "contactNumber": "9876995433",
      "emailID": "srs@telecomInd.com",
      "address": "India",
      "status": "Active",
      "licenseKey": "ty604-affcd-33201-04770",
      "licenseKeyExpiry": "2022-12-31",
      "licenseKeyStatus": "Active"
    }
  },
  "errors": null
}

Failure Response

Status code: 200

Description: No MISP found for the organization

{
  "id": "mosip.partnermanagement.misp.retrieve",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_009",
      "message": "No MISP found for the organization"
    }
  ]
}

Other Failure details

GET /misps/{mispId}/licenseKey

This API would be used by MISP Admin / MOSIP Admin for download MISPs license key. In case where license key got expired then user would be able to get a new license key. New license key thus generated would be mapped with given MISP ID . Older license keys would be updated with inactive status.

Resource URL

https://{base_url}/partnermanagement/v1/misps/{mispId}/licenseKey

Resource details

Request Path Parameters

Request Header

Responses

Success Response

Status code: 200

Description: MISP License retrieved successfully

{
  "id": "mosip.partnermanagement.misp.license.retrieve",
  "version": "1.0",
  "responsetime": "2019-05-16T09:37:04.941Z",
  "response": {
    "mispLicenseKey": "fa604-affcd-33201-04770",
    "mispLicenseKeyExpiry": "2022-12-31",
    "mispLicenseKeyStatus": "Active"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: MISP status, MISP License key status - None available in request

{
  "id": "mosip.partnermanagement.misp.license.retrieve",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_MSP_006",
      "message": "MISP ID/MISP License Key does not exist"
    }
  ]
}

Other Failure details

Policy Management Service

This service would be used by Policy Manager to manage policies for his Policy Group.

POST /policies

This API would be used to create new Policy for policy group

Resource URL

https://{base_url}/partnermanagement/v1/policies

Resource details

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.policy.create",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
    "name": "Insurance Policy",
    "desc": "Desc about policy",
    "policies": {
      "authPolicies": [     
        {"authType": "otp","mandatory": true},
        {"authType": "demo","mandatory": false},
        {"authType": "bio","authSubType": "FINGER","mandatory": true},
        {"authType": "bio","authSubType": "IRIS","mandatory": false},
        {"authType": "bio","authSubType": "FACE","mandatory": false},
        {"authType": "kyc","mandatory": false}
      ],
      "allowedKycAttributes": [  
        {"attributeName": "fullName","required": true},
        {"attributeName": "dateOfBirth","required": true},
        {"attributeName": "gender","required": true},
        {"attributeName": "phone","required": true},
        {"attributeName": "email","required": true},
        {"attributeName": "addressLine1","required": true},
        {"attributeName": "addressLine2","required": true},
        {"attributeName": "addressLine3","required": true},
        {"attributeName": "location1","required": true},
        {"attributeName": "location2","required": true},
        {"attributeName": "location3","required": true},
        {"attributeName": "postalCode","required": false},
        {"attributeName": "photo","required": true}
      ]
    }
  }
}

Responses

Success Response

Status code: 200

Description: create new Policy for policy group is successful

{
  "id": "mosip.partnermanagement.policy.create",
  "version": "1.0",
  "responsetime": "2019-05-14T16:01:20.534Z",
  "response": {
    "policies": [
      {
        "id": "32058251034176",
        "name": "Insurance Policy",
        "desc": "Desc about policy",
        "is_Active": true,
        "cr_by": "MOSIP",
        "cr_dtimes": "2019-05-14T16:01:20.534Z",
        "up_by": null,
        "upd_dtimes": null
      }
    ]
  },
  "errors": null
}

Failure Response

Status code: 200

Description: If policy name already exists in the policy group

{
  "id": "mosip.partnermanagement.policy.create",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_POL_004",
      "message": "Policy Name already exists in the policy Group"
    }
  ]
}

Other Failure details

PUT /policies/{policyID}

This API would be used to update existing policy for a policy group

Resource URL

https://{base_url}/partnermanagement/v1/policies/{policyID}

Resource details

Request Path Parameters

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.policy.update",
  "version": "1.0",
  "requesttime": "2019-05-15T16:01:20.534Z",
  "metadata": {},
  "request": {
    "name": "Loan Policy",
    "desc": "Desc about policy",
    "policies": {
      "authPolicies": [     
        {"authType": "otp","mandatory": true},
        {"authType": "demo","mandatory": false},
        {"authType": "bio","authSubType": "FINGER","mandatory": true},
        {"authType": "bio","authSubType": "IRIS","mandatory": true},
        {"authType": "bio","authSubType": "FACE","mandatory": false},
        {"authType": "kyc","mandatory": false}
      ],
      "allowedKycAttributes": [  
        {"attributeName": "fullName","required": true},
        {"attributeName": "dateOfBirth","required": true},
        {"attributeName": "gender","required": true},
        {"attributeName": "phone","required": true},
        {"attributeName": "email","required": true},
        {"attributeName": "addressLine1","required": true},
        {"attributeName": "addressLine2","required": true},
        {"attributeName": "addressLine3","required": true},
        {"attributeName": "location1","required": true},
        {"attributeName": "location2","required": true},
        {"attributeName": "location3","required": true},
        {"attributeName": "postalCode","required": false},
        {"attributeName": "photo","required": true}
      ]
    }
  }
}

Responses

Success Response

Status code: 200

Description: update existing policy for policy group is successful

{
  "id": "mosip.partnermanagement.policy.update",
  "version": "1.0",
  "responsetime": "2019-05-15T16:01:20.534Z",
  "response":{
    "id": "45678451034176",
    "name": "Loan Policy",
    "desc": "Desc about policy",
    "is_Active": true,
    "cr_by": "MOSIP",
    "cr_dtimes": "2019-05-14T16:01:20.534Z",
    "up_by": "MOSIP",
    "upd_dtimes": "2019-05-15T16:01:20.534Z"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: If policy ID does not exist

{
  "id": "mosip.partnermanagement.policy.update",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_POL_008",
      "message": "Policy ID does not exist"
    }
  ]
}

Other Failure details

PATCH /policies/{policyID}

This API would be used to update the status (activate/deactivate) for the given policy id.

Resource URL

https://{base_url}/partnermanagement/v1/policies/{policyID}

Resource details

Request Path Parameters

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.policy.update.status",
  "version": "1.0",
  "requesttime": "2019-05-15T16:01:20.534Z",
  "metadata": {},
  "request": {
    "status":"De-Active"
  }
}

Responses

Success Response

Status code: 200

Description: update the existing policy status successful

{
  "id": "mosip.partnermanagement.policy.update.status",
  "version": "1.0",
  "responsetime": "2019-05-15T16:01:20.534Z",
  "response":{
    "message" : "status updated successfully"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: If policy ID does not exist

{
  "id": "mosip.partnermanagement.policy.update.status",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_POL_008",
      "message": "Policy ID does not exist"
    }
  ]
}

Other Failure details

GET /policies

Policy manager would require this service to get details for the policies in the policy group he belongs to. All the policy groups are required to be back filled in the partner management database through an offline process based on country specific requirements. Partner Manager and Policy Manager assigned for the Policy group are also required to be back filled along with creation of the policy group. Partner management would depend on Kernel IAM module services for all user management related activities. User ID and Password are shared using off-line process.

Resource URL

https://{base_url}/partnermanagement/v1/policies

Resource details

Request Header

Responses

Success Response

Status code: 200

Description: retrieve the policies available for my policy group successful

{
  "id": "mosip.partnermanagement.partner.policies",
  "version": "1.0",
  "responsetime": "2019-05-16T16:01:20.534Z",
  "response": {
    "policies": [
      {
        "id": "32058251034176",
        "name": "Insurance Policy",
        "desc": "Desc about policy",
        "is_Active": true,
        "policyManagerId": "898778899",
        "cr_by": "MOSIP",
        "cr_dtimes": "2019-05-14T16:01:20.534Z",
        "up_by": null,
        "upd_dtimes": null,
        "policies": {
          "authPolicies": [     
            {"authType": "otp","mandatory": true},
            {"authType": "demo","mandatory": false},
            {"authType": "bio","authSubType": "FINGER","mandatory": true},
            {"authType": "bio","authSubType": "IRIS","mandatory": false},
            {"authType": "bio","authSubType": "FACE","mandatory": false},
            {"authType": "kyc","mandatory": false}
          ],
          "allowedKycAttributes": [  
            {"attributeName": "fullName","required": true},
            {"attributeName": "dateOfBirth","required": true},
            {"attributeName": "gender","required": true},
            {"attributeName": "phone","required": true},
            {"attributeName": "email","required": true},
            {"attributeName": "addressLine1","required": true},
            {"attributeName": "addressLine2","required": true},
            {"attributeName": "addressLine3","required": true},
            {"attributeName": "location1","required": true},
            {"attributeName": "location2","required": true},
            {"attributeName": "location3","required": true},
            {"attributeName": "postalCode","required": false},
            {"attributeName": "photo","required": true}
          ]
        }
      },
      {
        "id": "45678451034176",
        "name": "Loan Policy",
        "desc": "Desc about policy",
        "is_Active": true,
        "policyManagerId": "898778899",
        "cr_by": "MOSIP",
        "cr_dtimes": "2019-05-14T16:01:20.534Z",
        "up_by": "MOSIP",
        "upd_dtimes": "2019-05-15T16:01:20.534Z",
        "policies": {
          "authPolicies": [     
            {"authType": "otp","mandatory": true},
            {"authType": "demo","mandatory": false},
            {"authType": "bio","authSubType": "FINGER","mandatory": true},
            {"authType": "bio","authSubType": "IRIS","mandatory": true},
            {"authType": "bio","authSubType": "FACE","mandatory": false},
            {"authType": "kyc","mandatory": false}
          ],
          "allowedKycAttributes": [  
            {"attributeName": "fullName","required": true},
            {"attributeName": "dateOfBirth","required": true},
            {"attributeName": "gender","required": true},
            {"attributeName": "phone","required": true},
            {"attributeName": "email","required": true},
            {"attributeName": "addressLine1","required": true},
            {"attributeName": "addressLine2","required": true},
            {"attributeName": "addressLine3","required": true},
            {"attributeName": "location1","required": true},
            {"attributeName": "location2","required": true},
            {"attributeName": "location3","required": true},
            {"attributeName": "postalCode","required": false},
            {"attributeName": "photo","required": true}
          ]
        }
      }
    ]
  },
  "errors": null
}

Failure Response

Status code: 200

Description: No Active policy available in the Policy Group

{
  "id": "mosip.partnermanagement.partner.policies",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_POL_003",
      "message": "No Active policy available in the Policy Group"
    }
  ]
}

Other Failure details

GET /policies/policyId/{policyID}

This API would be used to retrieve existing policy for a policy group based on the policy id.

Resource URL

https://{base_url}/partnermanagement/v1/policies/policyId/{policyID}

Resource details

Request Path Parameters

Request Header

Responses

Success Response

Status code: 200

Description: policy retrieved successfully

{
  "id": "mosip.partnermanagement.policy.retrieve",
  "version": "1.0",
  "responsetime": "2019-05-15T16:01:20.534Z",
  "response":{
    "id": "45678451034176",
    "name": "Loan Policy",
    "desc": "Desc about policy",
    "is_Active": true,
    "cr_by": "MOSIP",
    "cr_dtimes": "2019-05-14T16:01:20.534Z",
    "up_by": "MOSIP",
    "upd_dtimes": "2019-05-15T16:01:20.534Z",
    "policies": {
      "authPolicies": [     
        {"authType": "otp","mandatory": true},
        {"authType": "demo","mandatory": false},
        {"authType": "bio","authSubType": "FINGER","mandatory": true},
        {"authType": "bio","authSubType": "IRIS","mandatory": false},
        {"authType": "bio","authSubType": "FACE","mandatory": false},
        {"authType": "kyc","mandatory": false}
      ],
      "allowedKycAttributes": [  
        {"attributeName": "fullName","required": true},
        {"attributeName": "dateOfBirth","required": true},
        {"attributeName": "gender","required": true},
        {"attributeName": "phone","required": true},
        {"attributeName": "email","required": true},
        {"attributeName": "addressLine1","required": true},
        {"attributeName": "addressLine2","required": true},
        {"attributeName": "addressLine3","required": true},
        {"attributeName": "location1","required": true},
        {"attributeName": "location2","required": true},
        {"attributeName": "location3","required": true},
        {"attributeName": "postalCode","required": false},
        {"attributeName": "photo","required": true}
      ]
    }
  },
  "errors": null
}

Failure Response

Status code: 200

Description: If policy ID does not exist

{
  "id": "mosip.partnermanagement.policy.retrieve",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_POL_008",
      "message": "Policy ID does not exist"
    }
  ]
}

Other Failure details

GET /policies/partnerApiKey/{PartnerAPIKey}

This API would be used to retrieve the partner policy details for given PartnerAPIKey.

Resource URL

https://{base_url}/partnermanagement/v1/policies/partnerApiKey/fa604-affcd-33201-04770

Resource details

Request Path Parameters

Request Header

Responses

Success Response

Status code: 200

Description: retrieve the partner policy details for given PartnerAPIKey successful

{
  "id": "mosip.partnermanagement.policies.retrieve.partnerAPIKey",
  "version": "1.0",
  "responsetime": "2019-05-16T16:01:20.534Z",
  "response":{
    "id": "32058251034176",
    "name": "Insurance Policy",
    "desc": "Desc about policy",
    "is_Active": true,
    "cr_by": "MOSIP",
    "cr_dtimes": "2019-05-14T16:01:20.534Z",
    "up_by": null,
    "upd_dtimes": null,
    "policies": {
      "authPolicies": [     
        {"authType": "otp","mandatory": true},
        {"authType": "demo","mandatory": false},
        {"authType": "bio","authSubType": "FINGER","mandatory": true},
        {"authType": "bio","authSubType": "IRIS","mandatory": false},
        {"authType": "bio","authSubType": "FACE","mandatory": false},
        {"authType": "kyc","mandatory": false}
      ],
      "allowedKycAttributes": [  
        {"attributeName": "fullName","required": true},
        {"attributeName": "dateOfBirth","required": true},
        {"attributeName": "gender","required": true},
        {"attributeName": "phone","required": true},
        {"attributeName": "email","required": true},
        {"attributeName": "addressLine1","required": true},
        {"attributeName": "addressLine2","required": true},
        {"attributeName": "addressLine3","required": true},
        {"attributeName": "location1","required": true},
        {"attributeName": "location2","required": true},
        {"attributeName": "location3","required": true},
        {"attributeName": "postalCode","required": false},
        {"attributeName": "photo","required": true}
      ]
    }
  },
  "errors": null
}

Failure Response

Status code: 200

Description: No policy available for given PartnerAPIKey

{
  "id": "mosip.partnermanagement.policies.retrieve.partnerAPIKey",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_POL_013",
      "message": "No policy available for given PartnerAPIKey"
    }
  ]
}

Other Failure details

Partner Management Service

This service enables partner managers to manage respective partners, manage partner API Key requests, manage PartnerAPIKeys to Policies mappings.

PUT /pmpartners/{partnerID}/{PartnerAPIKey}

This API would be used by partner Manager, to update Partner api key to Policy Mappings.

Resource URL

https://{base_url}/partnermanagement/v1/pmpartners/{partnerID}/{PartnerAPIKey}

Resource details

Request Path Parameters

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.partners.policy.mapping",
  "version": "1.0",
  "requesttime": "2019-05-20T09:48:43.394Z",
  "metadata": {},
  "request": {
    "oldPolicyID":"54662345634232", 
    "newPolicyID":"45662345639999"
  }
}

Responses

Success Response

Status code: 200

Description: Partner api key to Policy Mappings updated successfully.

{
  "id": "mosip.partnermanagement.partners.policy.mapping",
  "version": "1.0",
  "responsetime": "2019-05-16T16:01:20.534Z",
  "response":{
    "message": "Partner api key to Policy Mappings updated successfully"
  },
  "errors": null
}

Failure Response

Status code: 200

Description: old/new Policy %d does not exist

{
  "id": "mosip.partnermanagement.partners.policy.mapping",
  "version": "1.0",
  "responsetime": "2019-06-14T08:41:17.156Z",
  "response": null,
  "errors": [
    {
      "errorCode": "PMS_PMP_014",
      "message": "Policy %d does not exist"
    }
  ]
}

Other Failure details

PATCH /pmpartners/{partnerID}

This API would be used to activate/deactivate Auth/E-KYC Partners

Resource URL

https://{base_url}/partnermanagement/v1/pmpartners/{partnerID}

Resource details

Request Path Parameters

Request Body Parameters

Request Header

Request

{
  "id": "mosip.partnermanagement.partners.status.update",