Skip to content

companieshouse/orders.api.ch.gov.uk

Repository files navigation

Companies House Orders API

orders.api.ch.gov.uk

API handling CRUD operations on CH Ordering Service

Requirements

Getting Started

  1. Run make to build
  2. Run ./start.sh to run

Environment Variables

Name Description Mandatory Location
ORDERS_API_PORT Port this application runs on when deployed. start.sh

Endpoints

Path Method Description
/basket PATCH Adds delivery details to basket.
/basket/items POST Adds requested item to basket.
/basket/checkouts POST Processes basket checkout. Creates a checkout resource.
/basket/checkouts/{checkoutId}/payment GET Returns paymentDetails resource for a valid checkoutId.
/basket/checkouts/{checkoutId}/payment PATCH Updates checkout resource with payment status.
/orders/{orderId} GET Returns OrderData resource for a valid orderId.
/orders/{orderId}/reprocess POST Triggers the re-processing of the order.
/healthcheck GET Returns HTTP OK (200) to indicate a healthy application instance.

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 order-service 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

About

API handling CRUD operations on CH Ordering Service

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 37

Languages