This is an application to allow Limited Companies to provide their information to HMRC.
-
Make sure any dependent services are running using the following service-manager command
sm --start INCORPORATED_ENTITY_IDENTIFICATION_ALL
-
Stop the backend in service manager using
sm --stop INCORPORATED_ENTITY_IDENTIFICATION
-
Run the backend locally using
sbt 'run 9719 -Dapplication.router=testOnlyDoNotUseInAppConf.Routes'
Creates a new journeyId and stores it in the database
No body is required for this request
Status: Created(201)
Example Response body:
{“journeyId”: "<random UUID>"}
Retrieves all the journey data that is stored against a specific journeyID.
A valid journeyId must be sent in the URI
Expected Status | Reason |
---|---|
OK(200) |
JourneyId exists |
NOT_FOUND(404) |
JourneyId does not exist |
Example response body:
{
"companyProfile":
{"companyName":"TestCompanyLtd”,
“companyNumber":"01234567",
"dateOfIncorporation":"2020-01-01"},
"ctutr":"1234567890",
"identifiersMatch":true,
"businessVerification":
{"verificationStatus":"PASS"},
"registration":
{"registrationStatus":"REGISTERED",
"registeredBusinessPartnerId":"X00000123456789"}
}
Retrieves all the journey data that matches the dataKey for a specific journeyID.
Example Request URI
/journey/testJourneyId/ctutr
Expected Status | Reason |
---|---|
OK(200) |
JourneyId exists |
NOT_FOUND(404) |
No data exists for JourneyId or dataKey |
FORBIDDEN(403) |
Auth Internal IDs do not match |
Response body for example URI:
{"1234567890"}
Stores the json body against the data key and journey id provided in the uri
Requires a valid journeyId and user must be authorised to make changes to the data
Example request URI:
/journey/testJourneyId/ctutr
Example request body:
{"1234567890"}
Expected Status | Reason |
---|---|
OK(200) |
OK |
FORBIDDEN(403) |
Auth Internal IDs do not match |
Checks if the user entered identifiers match what is held in the database.
This endpoint is feature switched using the Use stub for Get CT Reference
switch, which returns a specific CTUTR based on the CRN.
Example Body:
{
"companyNumber": 12345678,
"ctutr": 1234567890
}
Expected Status | Reason |
---|---|
OK(200) |
Identifiers found in database and check returned a result |
NOT_FOUND(404) |
No identifiers found in databse |
Example response bodies:
{"matched":true}
or
{"matched":false}
Submits a registration request to the downstream Register API.
This API is feature switched behind the Use stub for submissions to DES
switch so it can be stubbed using the Register test endpoint described below.
Body:
{
"company": {
"crn": 12345678,
"ctutr": 1234567890
}
}
Status: OK(200) Attempted registration and returns result of call
Example response bodies:
{
"registration":{
"registrationStatus":"REGISTERED",
"registeredBusinessPartnerId":"<randomm UUID>"
}
}
or
{
"registration":{
"registrationStatus":"REGISTRATION_FAILED",
}
}
Stubs a call to retrieve a CTUTR from the database
URI must contain a company number
Company Numbers are mapped to specific CTUTRs
Company Number | CTUTR |
---|---|
12345678 |
1234567890 |
99999999 |
0987654321 |
00000000 |
None |
Expected Status | Reason |
---|---|
OK(200) |
CTUTR found |
NOT_FOUND(404) |
No CTUTR found in database |
Example Response body:
"{CTUTR":"1234567890}"
Stub for downstream Register API
No body is required for this request as this always returns a successful response regardless of the data sent.
Status: OK(200)
Example Response body:
{
"identification":{
"idType":"SAFEID",
"idValue":"X00000123456789"
}
}
This code is open source software licensed under the Apache 2.0 License.