The Persons with Significant Control (PSC) Verification API is a Spring Boot REST API that forms part of the Identification Verification (IDV) service. It is responsible for handling and processing PSC Individual verification requests.
API users, including psc-verification-web, interact with the psc-verification-api by sending HTTP requests containing JSON data to the service endpoints. You can find the service endpoints and their expected request and response models here.
The service integrates with several internal and external systems, including transactions-api. Through the transactions API, it connects to chips-filing-consumer and chs-notification-api to notify applicants and internal users if/when an application has been submitted, converted, accepted, or rejected. The api-enumerations define the psc-verification-api data types.
To build psc-verification-api, you will need:
- Git
- Java 21
- Maven
- MongoDB
- docker-chs-development
- Internal Companies House core services
You will also need a REST client (e.g. Postman or cURL) if you wish to interact with the psc-verification-api service endpoints.
From the command line, in the project root, run:
make clean buildThis will clean, build, and test the code.
- Clone docker-chs-development and follow the steps in the README.
- Enable the psc-verification-api services:
chs-dev modules enable psc-verification
chs-dev services enable psc-verification-api- Run
chs-dev upand wait for all services to start. - Send a GET request using your REST client to
/persons-with-significant-control-verification/healthcheck. The response should be200 OKwithstatus=UP.
Development mode is available for this service in docker-chs-development.
chs-dev development enable psc-verification-apiThis will clone psc-verification-api into the docker-chs-development/repositories directory. Any changes to the code or resources will automatically trigger a rebuild and relaunch.
See the following Confluence pages:
System properties for psc-verification-api are defined in application.properties. These are normally configured per environment. For example values, see the relevant docker-compose.yaml in docker-chs-development.
If a variable appears in italics, it's optional.
| Variable | Description |
|---|---|
| ACCOUNT_COOKIE_DOMAIN | Domain for account-related cookies. |
| API_URL | URL for API calls. |
| CHS_INTERNAL_API_KEY | API key for internal CHS services. |
| COOKIE_DOMAIN | Domain for cookies. |
| COOKIE_NAME | Name of the cookie used for session management. |
| COOKIE_SECRET | Secret key used to sign and verify cookies. |
| COOKIE_SECURE_ONLY | Flag indicating whether cookies should only be sent over secure (HTTPS) connections. |
| HUMAN_LOG | Flag to enable human-readable logging (0 or 1). |
| INTERNAL_API_URL | URL for internal API calls. |
| MANAGEMENT_ENDPOINT_HEALTH_ENABLED | Flag to enable or disable the health management endpoint. |
| MANAGEMENT_ENDPOINTS_WEB_BASE_PATH | Base path for web management endpoints. |
| MANAGEMENT_ENDPOINTS_WEB_PATH_MAPPING_HEALTH | Path mapping for the healthcheck endpoint. |
| MONGO_PSC_VERIFICATIONS_API_DB_NAME | Name of the MongoDB database used for storing PSC verification filings. |
| MONGODB_URL | Connection URL for the MongoDB instance. |
| PLANNED_MAINTENANCE_START_TIME1 | Start time for a planned maintenance period. |
| PLANNED_MAINTENANCE_END_TIME1 | End time for a planned maintenance period. |
| PLANNED_MAINTENANCE_MESSAGE | Message displayed during a planned maintenance period. |
| PSC_VERIFICATION_DESCRIPTION | Description of the PSC verification service. |
| WEB_LOGGING_LEVEL | Logging level for Spring Web. |
Planned maintenance format: d MMM yy HH:mm z|x where:
dis the day of the month (1-31).MMMis the 3-letter month abbreviation (case sensitive: e.g.NovnotNOV).HH:mmis the time in 24-hour format (e.g.00:30).zis the zone short name, e.g.GMT.xis the 2-digit zone offset from UTC, e.g.+01(= British Summer Time).
Caution
- Zone short name
GMTalways denotes Greenwich Mean Time (UTC+00). - During daylight saving time:
- Use zone offset
+01to specify British Summer Time (UTC+01). - Do not use zone short name
BST, as it denotes Bangladesh Standard Time (UTC+06).
- Use zone offset