Links

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. 1.
    Authenticate through client-id/Secret or User Id/Password having respective roles assigned in IAM.
  2. 2.
    After successful authentication access token will set as Authorization cookies.
  3. 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. 1.
    Digital certificate sharing between MOSIP and Partners
  2. 2.
    MISP (MOSIP Infrastructure Service Provider) Creation
  3. 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
Resource Details
Description
Response format
JSON
Requires Authentication
Yes
Request Body Parameters
Name
Required
Description
Comment
id
Yes
id
mosip.partnermanagement.misp.create
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-07-02T05:23:08.019Z
request
Yes
Request for the application
​
request.organizationName
Yes
MISP organization name
telecom
request.contactNumber
Optional
MISP contact number
9876998888
request.emailId
Yes
MISP emailId
request.address
Yes
MISP address
India
Request Header
Name
Required
Description
Comment
Authorization
Yes
authentication token
Mosip-TokeneyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJyYXZpLmJhbGFqaUBtaW5kdHJlZS5jb20iLCJtb2JpbGUiOiIiLCJtYWlsIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwicm9sZSI6IklORElWSURVQUwiLCJuYW1lIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwiaXNPdHBSZXF1aXJlZCI6dHJ1ZSwiaXNPdHBWZXJpZmllZCI6dHJ1ZSwiaWF0IjoxNTYyNTgwMzg0LCJleHAiOjE1NjI1ODYzODR9.eycrDnzPFBnx57wp6v-iXHtFnRxPgOysG3QETnElSswBUH5ojUUCLsn6SeYukIy-rEZ0SOdr9jkLE6A8tNkj4w
Request
{
"id": "mosip.partnermanagement.misp.create",
"version": "1.0",
"requesttime": "2019-05-20T09:48:43.394Z",
"metadata": {},
"request": {
"name": "telecom",
"contactNumber": "9876998888",
"emailId": "[email protected]",
"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
Error Code
Error Message
Error Description
PMS_MSP_001
MOSIP Admin does not exist
Unauthorized MOSIP Admin- UserName not available in database
PMS_MSP_002
Mismatch of the MOSIP Admin Credentials
User Name and Password of the Admin does not match
PMS_MSP_003
A MISP is already registered with name - organizationName
If MISP is already registered with organizationName
PMS_COR_001
Missing Input Parameter - %d
Missing Input Parameter - for all mandatory attributes
PMS_COR_002
Invalid Input Parameter - %d
Invalid Input Parameter - for all attributes not as per defined data definition
PMS_COR_003
Could not process the request
Any Internal Error

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
Resource Details
Description
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
Name
Required
Description
Comment
mispId
Yes
id of the misp
64269837502851
Request Header
Name
Required
Description
Comment
Authorization
Yes
authentication token
Mosip-TokeneyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJyYXZpLmJhbGFqaUBtaW5kdHJlZS5jb20iLCJtb2JpbGUiOiIiLCJtYWlsIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwicm9sZSI6IklORElWSURVQUwiLCJuYW1lIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwiaXNPdHBSZXF1aXJlZCI6dHJ1ZSwiaXNPdHBWZXJpZmllZCI6dHJ1ZSwiaWF0IjoxNTYyNTgwMzg0LCJleHAiOjE1NjI1ODYzODR9.eycrDnzPFBnx57wp6v-iXHtFnRxPgOysG3QETnElSswBUH5ojUUCLsn6SeYukIy-rEZ0SOdr9jkLE6A8tNkj4w
Request Body Parameters
Name
Required
Description
Comment
id
Yes
id
mosip.partnermanagement.misp.update
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-07-02T05:23:08.019Z
request
Yes
Request for the application
​
request.mispStatus
Yes
MISP Status
Approved or Rejected
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
Error Code
Error Message
Error Description
PMS_MSP_001
MOSIP Admin does not exist
Unauthorized MOSIP Admin- UserName not available in database
PMS_MSP_002
Mismatch of the MOSIP Admin Credentials
User Name and Password of the Admin does not match
PMS_MSP_004
No information provided for update
No information provided for update
PMS_MSP_005
MISP ID does not exist
MISP ID not available in database
PMS_COR_003
Could not process the request
Any Internal Error

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
Resource Details
Description
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
Name
Required
Description
Comment
mispId
Yes
id of the misp
64269837502851
Request Header
Name
Required
Description
Comment
Authorization
Yes
authentication token
Mosip-TokeneyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJyYXZpLmJhbGFqaUBtaW5kdHJlZS5jb20iLCJtb2JpbGUiOiIiLCJtYWlsIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwicm9sZSI6IklORElWSURVQUwiLCJuYW1lIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwiaXNPdHBSZXF1aXJlZCI6dHJ1ZSwiaXNPdHBWZXJpZmllZCI6dHJ1ZSwiaWF0IjoxNTYyNTgwMzg0LCJleHAiOjE1NjI1ODYzODR9.eycrDnzPFBnx57wp6v-iXHtFnRxPgOysG3QETnElSswBUH5ojUUCLsn6SeYukIy-rEZ0SOdr9jkLE6A8tNkj4w
Request Body Parameters
Name
Required
Description
Comment
id
Yes
id
mosip.partnermanagement.misp.update
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-07-02T05:23:08.019Z
request
Yes
Request for the application
​
request.organizationName
Optional
MISP organization name
telecom
request.contactNumber
Optional
MISP contact number
9876998888
request.emailId
Optional
MISP emailId
request.address
Optional
MISP address
India
Request
{
"id": "mosip.partnermanagement.misp.update",
"version": "1.0",
"requesttime": "2019-05-20T09:48:43.394Z",
"metadata": {},
"request": {
"organizationName": "telecom",
"contactNumber": "9876998888",
"emailID": "[email protected]",
"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": "[email protected]",
"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
Error Code
Error Message
Error Description
PMS_MSP_001
MOSIP Admin does not exist
Unauthorized MOSIP Admin- UserName not available in database
PMS_MSP_002
Mismatch of the MOSIP Admin Credentials
User Name and Password of the Admin does not match
PMS_MSP_004
No information provided for update
No information provided for update
PMS_MSP_005
MISP ID does not exist
MISP ID not available in database
PMS_COR_001
Missing Input Parameter - %d
Missing Input Parameter - for all mandatory attributes
PMS_COR_002
Invalid Input Parameter - %d
Invalid Input Parameter - for all attributes not as per defined data definition
PMS_COR_003
Could not process the request
Any Internal Error

PATCH /misps/{mispId}/licenseKey

This API would be used for validating MISPs license key.
  1. 1.
    Validate license key pattern.
  2. 2.
    Validate license key is associated with the requested MISP id.
  3. 3.
    Validate license key is Active or not.
Resource URL
https://{base_url}/partnermanagement/v1/misps/{mispId}/licenseKey
Resource details
Resource Details
Description
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
Name
Required
Description
Comment
mispId
Yes
id of the misp
64269837502851
Request Body Parameters
Name
Required
Description
Comment
id
Yes
id
mosip.partnermanagement.misp.license.validate
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-05-20T09:48:43.394Z
request
Yes
Request for the application
​
request.mispLicenseKey
Yes
MISP license key
fa604-affcd-33201-04234
Request Header
Name
Required
Description
Comment
Authorization
Yes
authentication token
Mosip-TokeneyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJyYXZpLmJhbGFqaUBtaW5kdHJlZS5jb20iLCJtb2JpbGUiOiIiLCJtYWlsIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwicm9sZSI6IklORElWSURVQUwiLCJuYW1lIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwiaXNPdHBSZXF1aXJlZCI6dHJ1ZSwiaXNPdHBWZXJpZmllZCI6dHJ1ZSwiaWF0IjoxNTYyNTgwMzg0LCJleHAiOjE1NjI1ODYzODR9.eycrDnzPFBnx57wp6v-iXHtFnRxPgOysG3QETnElSswBUH5ojUUCLsn6SeYukIy-rEZ0SOdr9jkLE6A8tNkj4w
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
Error Code
Error Message
Error Description
PMS_MSP_001
MOSIP Admin does not exist
Unauthorized MOSIP Admin- UserName not available in database
PMS_MSP_002
Mismatch of the MOSIP Admin Credentials
User Name and Password of the Admin does not match
PMS_MSP_006
MISP ID/MISP License Key does not exist
MISP ID/MISP License Key not available in database
PMS_MSP_007
MISP License key not associated to MISP ID
MISP License key not associated to MISP in the input
PMS_MSP_008
MISP License key not valid
MISP License key not valid
PMS_COR_001
Missing Input Parameter - %d
Missing Input Parameter - for all mandatory attributes
PMS_COR_002
Invalid Input Parameter - %d
Invalid Input Parameter - for all attributes not as per defined data definition
PMS_COR_003
Could not process the request
Any Internal Error

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
Resource Details
Description
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
Name
Required
Description
Comment
mispId
Yes
id of the misp
64269837502851
Request Header
Name
Required
Description
Comment
Authorization
Yes
authentication token
Mosip-TokeneyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJyYXZpLmJhbGFqaUBtaW5kdHJlZS5jb20iLCJtb2JpbGUiOiIiLCJtYWlsIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwicm9sZSI6IklORElWSURVQUwiLCJuYW1lIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwiaXNPdHBSZXF1aXJlZCI6dHJ1ZSwiaXNPdHBWZXJpZmllZCI6dHJ1ZSwiaWF0IjoxNTYyNTgwMzg0LCJleHAiOjE1NjI1ODYzODR9.eycrDnzPFBnx57wp6v-iXHtFnRxPgOysG3QETnElSswBUH5ojUUCLsn6SeYukIy-rEZ0SOdr9jkLE6A8tNkj4w
Request Body Parameters
Name
Required
Description
Comment
id
Yes
id
mosip.partnermanagement.misp.status.update
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-07-02T05:23:08.019Z
request
Yes
Request for the application
​
request.mispStatus
Yes
MISP status
De-Active
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
Error Code
Error Message
Error Description
PMS_MSP_001
MOSIP Admin does not exist
Unauthorized MOSIP Admin- UserName not available in database
PMS_MSP_002
Mismatch of the MOSIP Admin Credentials
User Name and Password of the Admin does not match
PMS_MSP_004
No information provided for update
No information provided for update
PMS_MSP_005
MISP ID does not exist
MISP ID not available in database
PMS_MSP_009
Failed to update MISP status
Failed to update the MISP status
PMS_MSP_010
MISP status already in the requested status
MISP status already in the requested status
PMS_COR_001
Missing Input Parameter - %d
Missing Input Parameter - for all mandatory attributes
PMS_COR_002
Invalid Input Parameter - %d
Invalid Input Parameter - for all attributes not as per defined data definition
PMS_COR_003
Could not process the request
Any Internal Error

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
Resource Details
Description
Response format
JSON
Requires Authentication
Yes
Request Path Parameters
Name
Required
Description
Comment
mispId
Yes
id of the misp
64269837502851
Request Body Parameters
Name
Required
Description
Comment
id
Yes
id
mosip.partnermanagement.misp.license.update
version
Yes
version of the application
1.0
requesttime
Yes
Time of the request
2019-01-16T05:23:08.019Z
request
Yes
Request for the application
​
request.mispStatus
Optional
MISP status
Active
request.mispLicenseKey
Optional
MISP license Key
fa604-affcd-33201-04770
request.mispLicenseKeyStatus
Optional
MISP license Key Status
Active
Request Header
Name
Required
Description
Comment
Authorization
Yes
authentication token
Mosip-TokeneyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJyYXZpLmJhbGFqaUBtaW5kdHJlZS5jb20iLCJtb2JpbGUiOiIiLCJtYWlsIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwicm9sZSI6IklORElWSURVQUwiLCJuYW1lIjoicmF2aS5iYWxhamlAbWluZHRyZWUuY29tIiwiaXNPdHBSZXF1aXJlZCI6dHJ1ZSwiaXNPdHBWZXJpZmllZCI6dHJ1ZSwiaWF0IjoxNTYyNTgwMzg0LCJleHAiOjE1NjI1ODYzODR9.eycrDnzPFBnx57wp6v-iXHtFnRxPgOysG3QETnElSswBUH5ojUUCLsn6SeYukIy-rEZ0SOdr9jkLE6A8tNkj4w
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
Error Code
Error Message
Error Description
PMS_MSP_001
MOSIP Admin does not exist