Test case
Prerequisites:
- Test OAuth 2.0/API key credentials (Please contact Mobai to get credentials)
Resources:
Test environment
- Create a PIP request with “POST /v1/requestor/pip” with applicant name and phone number in the body. (Remember to use the test base URL). Take note of the
pipId
and theattendanceCode
in the response.
POST /v1/requestor/pip
// Request body
{
"applicantName": "Bodil Johansen",
"applicantPhoneNumber": "91010203"
}
- Finish a PIP with fake identity data with “POST /v1/requestor/pip/{pipId}/finishPipWithFakeData”.
POST /v1/requestor/pip/{pipId}/finishPipWithFakeData
// Request body
{
"documentHolder": "Bodil Johansen",
"nationalIdNumber": "01020312345",
"mrzCode": "P<NOR<<<<<01306623045<<12345<<<5604230M2504115NOR<<<<<<<<<<<SOESTENBYEN<<AASAMUND<SPECIMEN<",
"docNumber": "45612378",
"approved": true
}
- Get PIP request details with “GET /v1/requestor/pip/{pipId}” and check that the status is
AWAITING_DOWNLOAD
orRESULT_SENT
(see below for details).
GET /v1/requestor/pip/{pipId}
// Response
{
"pipId": "123e4567-e89b-12d3-a456-426614174000",
"status": "AWAITING_DOWNLOAD",
"lastUpdated": "2023-06-01T14:30:00Z",
"attendanceCode": "345265"
}
- Fetch the customer result with either REST API or Digipost - according to you configuration.
REST API: Retrieve the result of a completed PIP request in JSON format using "GET /v2/requestor/pip/{pipId}/result". The response includes URLs for the PDF report, XML data, and chip image. Optionally, you can also download a complete ZIP file containing all result files.
Digipost: You can see the result from a completed PIP request by going to https://www.test.digipost.no/ select “Logg inn med ID-Porten", “Test ID”, put the user ID provided by us in the “Personidentifikator” field and “Autentiser”.
- (Optional) Set up webhooks.
Go live
Use your production OAuth 2.0 credentials (contact Mobai if you haven’t received them). Remember to update the base URL and configure webhooks if applicable. A checklist is available at the end of this guide to help you confirm the remaining tasks.