Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
---
title: How the DCS works
weight: 2
last_reviewed_on: 2020-10-19
review_in: 6 months
---
# How the DCS works
The Document Checking Service (DCS) acts as an interface between your service and HM Passport Office.
<%= image_tag "dcs-overview.svg", { :alt => '' } %>
1. Your service sends a passport check request to the DCS.
1. The DCS validates the request and sends it to HM Passport Office.
1. HM Passport Office checks the passport data against their database and sends a response back to the DCS.
1. The DCS sends the response to your service.
## Integrating with the DCS
You’ll need to build a client to integrate with the DCS. You can choose which programming language your client uses. There is a [worked example of creating a DCS connection](https://github.com/alphagov/dcs-python-client) on GitHub.
Your client will need to be able to sign and encrypt JSON data and make HTTP requests to DCS.
To build a working DCS client, you'll need to:
1. [Enrol with the DCS certificate authority](https://dcs-pilot-docs.cloudapps.digital/enrol-with-the-DCS-certificate-authority/#enrol-with-the-dcs-certificate-authority).
1. [Generate keys and request certificates](/generate-keys-and-request-certificates/#generate-keys-and-request-certificates) - you’ll need to [contact DCS support](/support/#support) to get the Public Key Infrastructure (PKI) information so you can get started with integrating with the DCS.
1. [Create a network connection to the DCS](/create-a-network-connection/#create-a-network-connection-to-the-dcs) using mutual authentication.
1. [Generate certificate thumbprints](/generate-certificate-thumbprints/#generate-certificate-thumbprints).
1. [Sign and encrypt a DCS payload](/sign-and-encrypt-a-DCS-payload/#sign-and-encrypt-a-dcs-payload).
1. [Access the data in a DCS response](/access-the-data-in-a-DCS-response/#access-the-data-in-a-dcs-response).
### Using client libraries when connecting to the DCS
Currently, there are no supported client libraries for the DCS.
However, there is a [worked example of creating a DCS connection](https://github.com/alphagov/dcs-python-client) on GitHub.
## Understand what responses mean when making a DCS check
When you make a [DCS passport validity check](/api-reference/#check-whether-a-passport-is-valid), the DCS will return one of 3 responses:
* `valid: true`
* `valid: false`
* `error: true`
You can [read further guidance about the passport validity responses in the API reference](/api-reference/#receiving-a-valid-true-response).
<%= partial "partials/links" %>