Allows users to view tax profile and communication preferences
The following services are exposed from the micro-service.
Please note it is mandatory to supply an Accept HTTP header to all below services with the value application/vnd.hmrc.1.0+json
.
- Run locally:
sbt run
which runs on port8233
by default - Run with test endpoints:
sbt 'run -Dplay.http.router=testOnlyDoNotUseInAppConf.Routes'
The service can be run locally from Service Manager, using the following profiles:
Profile Details | Command |
---|---|
MOBILE_CUSTOMER_PROFILE | sm2 --start MOBILE_CUSTOMER_PROFILE |
- Run Unit Tests:
sbt test
- Run Integration Tests:
sbt it:test
- Run Unit and Integration Tests:
sbt test it:test
- Run Unit and Integration Tests with coverage report:
sbt clean compile coverage test it:test coverageReport dependencyUpdates
Task | Supported Methods | Description |
---|---|---|
/profile/personal-details/:nino |
GET | Returns a user's designatory details. More... |
/profile/preferences |
GET | Returns the user's preferences. More... |
/profile/preferences/paperless-settings/opt-in |
POST | Sets or updates the user's paperless opt-in preference settings. More... |
/profile/preferences/paperless-settings/opt-out |
POST | Opts the user out of paperless. More... |
/profile/pending-email |
POST | Updates the user's email address for pending emails. More... |
/apple-pass |
GET | Returns an encrypted pass that allows a user to store a nino in an apple wallet. More... |
/google-pass |
GET | Returns a JWT token that allows a user to store a nino in an google wallet. More... |
/validate/pin/:enteredPin |
GET | Validate the PIN against DOB pattern and previously used pins. |
/upsert |
PUT | Update/Insert PIN in the DB. |
Validate the entered pin against the DOB pattern and previously used pin
-
Local testing URL - http://localhost:8233/validate/pin/{enteredPin}?journeyId=&deviceId=
-
QA URL - https://api.qa.tax.service.gov.uk/customer-profile/validate/pin/{enteredPin}?journeyId=&deviceId=
-
Staging URL - https://api.staging.tax.service.gov.uk/customer-profile/validate/pin/{enteredPin}?journeyId=&deviceId=
-
Headers - Accept -> application/vnd.hmrc.1.0+json
-
Bearer token needs to be supplied
Example response body for success with 200 OK:
{
"key" : "valid_pin",
"message ": "Pin is valid"
}
Example response body for DOB match with 200 OK:
{
"key" : "create_pin_date_of_birth_error_message",
"message ": "PIN should not include your date of birth"
}
Example response body for previous pin match 200 OK:
{
"key" : "change_pin_disallow_previous_pins_error_message",
"message ": "Do not re-use an old PIN"
}
-
Local testing URL - http:/localhost:8233/upsert
-
QA URL - https://api.qa.tax.service.gov.uk/customer-profile/upsert
-
Staging URL - https://api.staging.tax.service.gov.uk/customer-profile/upsert
-
Headers - Accept -> application/vnd.hmrc.1.0+json
-
Bearer token needs to be supplied n
{
"pin" : "123456",
"deviceId ": "device-002"
}
All the above endpoints are accessible on sandbox with /sandbox
prefix on each endpoint, e.g.
GET /sandbox/profile/accounts
To trigger the sandbox endpoints locally, use the "X-MOBILE-USER-ID" header with one of the following values: 208606423740 or 167927702220
To test different scenarios, add a header "SANDBOX-CONTROL" to specify the appropriate status code and return payload. See each linked file for details:
Task | Supported Methods | Description |
---|---|---|
/sandbox/profile/personal-details/:nino |
GET | Acts as a stub for the related live endpoint. More... |
/sandbox/profile/preferences |
GET | Acts as a stub for the related live endpoint. More... |
/sandbox/profile/preferences/paperless-settings/opt-in |
POST | Acts as a stub for the related live endpoint. More... |
/sandbox/profile/preferences/paperless-settings/opt-out |
POST | Acts as a stub for the related live endpoint. More... |
/sandbox/profile/pending-email |
POST | Acts as a stub for the related live endpoint. More... |
/sandbox/apple-pass |
GET | Acts as a stub for the related live endpoint. |
save some pin data in DB
{
"deviceId ": "device-002",
"ninoHash" : "SZ123456B",
"hashedPins" : ["123445","567890"]
}
delete all pin data from DB
delete all pin data from DB based on device id and nino
Version of API need to be provided in Accept
request header
Accept: application/vnd.hmrc.v1.0+json
This code is open source software licensed under the Apache 2.0 License