Skip to content

companieshouse/confirmation-statement-api

Repository files navigation

confirmation-statement-api

Overview

API service for submitting Confirmation Statements to CHIPS

Requirements

In order to run the service locally you will need the following:

Getting started

To checkout and build the service:

  1. Clone Docker CHS Development and follow the steps in the README.
  2. Run chs-dev modules enable confirmation-statement
  3. Run chs-dev development enable confirmation-statement-api
  4. Manually enable the following services:
  • chs-dev services enable company-appointments-api-ch-gov-uk
  • company-metrics-api
  • psc-data-api
  • psc-statement-data-api
  • chs-delta-api
  • resource-change-publisher
  • stream-router
  • company-appointments-consumer
  1. Run docker using "chs-dev up" in the docker-chs-development directory.
  2. Run "chs-dev status" to check all required services are running and healthy
  3. Open your browser and go to page http://chs.local/confirmation-statement/

These instructions are for a local docker environment.

Endpoints

The full path for each public endpoints that requires a transaction id begins with the app url: ${API_URL}/transactions/{TRANSACTION_ID}/confirmation-statement

Method Path Description
GET /{confirmation_statement_id} Returns confirmation-statement based on confirmationStatementId
GET /{confirmation_statement_id}/validation-status Returns flags to indicate that all required tasks are complete
GET /{confirmation_statement_id}/costs Returns the payment amount required to submit
GET /{confirmation_statement_id}/active-director-details" Returns data to present to the user
GET /{confirmation_statement_id}/persons-of-significant-control Returns data to present to the user
GET /{confirmation_statement_id}/register-locations Returns data to present to the user
GET /{confirmation_statement_id}/shareholders Returns data to present to the user
GET /{confirmation_statement_id}/statement-of-capital Returns data to present to the user
POST / Creates the confirmation statement
POST /{confirmation_statement_id} Updates the confirmation statement

For filing: ${API_URL}/private/transactions/{transaction_id}/confirmation-statement

Method Path Description
GET {confirmation_statement_id}/filings Returns filing data required for the CHIPS filing backend

For company endpoints: ${API_URL}/confirmation-statement/company/{companyNumber}

Method Path Description
GET /eligibility Check company is eligible for filing
GET /next-made-up-to-date Get due date

Private company endpoint to retrieve registered email address: ${API_URL}/private/confirmation-statement/company/{company-number}

Method Path Description
GET /registered-email-address Returns company's registered email address

Terraform ECS

What does this code do?

The code present in this repository is used to define and deploy a dockerised container in AWS ECS. This is done by calling a module from terraform-modules. Application specific attributes are injected and the service is then deployed using Terraform via the CICD platform 'Concourse'.

Application specific attributes Value Description
ECS Cluster filing-maintain ECS cluster (stack) the service belongs to
Load balancer {env}-chs-apichgovuk
{env}-chs-apichgovuk-private
The load balancer that sits in front of the service
Concourse pipeline Pipeline link
Pipeline code
Concourse pipeline link in shared services

Contributing

Testing

  • Ensure the terraform runner local plan executes without issues. For information on terraform runners please see the Terraform Runner Quickstart guide.
  • If you encounter any issues or have questions, reach out to the team on the #platform slack channel.

Vault Configuration Updates

  • Any secrets required for this service will be stored in Vault. For any updates to the Vault configuration, please consult with the #platform team and submit a workflow request.

Useful Links