{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"c3b73e07-fc5a-40f3-a508-925bed78f552","name":"GovPass Ref","description":"GovPass Check is the service that maintains a record of every GovPass's validity and enrolment history. The capability is currently considered to be in Beta. The core functions will not change, however additional validation and detailed error codes will be added into future releases.\n\n# Overview\n\nThe API calls are used in combination to perform GovPass Check transactions which are detailed in the GovPass Process & Procedures document.\n\n# Change Log\n\n| **Date** | **Version** | **Changes** |\n| --- | --- | --- |\n| 21/03/2023 | 03b | Added the UploadCSV resource which enables the upload of a CSV file into an S3 bucket for validation and onward consumption. |\n| 27/07/2022 | 0.2b | Improved error handling and appropriate useage of HTTP status codes. Examples are included in this documentation. Enforcement of matching API keys to Site IDs is now in place. The CheckEnrolmentState method has also been added. RequestTypeHeaders are no longer required. RevocationList & MasterRevocationList now includes \"Revoked\" and \"Expired\" card states. |\n| 02/01/2022 | 0.1b | Baseline |\n\n# Network Connectivity\n\nGovPass Check is hosted in a virtual private cloud that can only be access via a VPN. In the reference environment, an OpenVPN based ClientVPN will be used for this purpose. In live this will be facilitated by a Site-To-Site VPN on a firewall. The URLs are unique to the reference environment and will change in live.\n\n# Authorisation\n\nEach access control system will be issued with a Site ID and corresponding API key. For development purposes, each vendor/system integrator will be issued with a test API key.\n\n# Common Parameters\n\n**RequestType – String**\n\nDescribes what type of request is being made. Must be included within the query parameters or body of the request; this must match its associated method as it is validated in every request.\n\n**GovPassNumber - String**\n\nEach GovPass has a unique number generated at the point of encoding. This number is printed physically on the card, is the value returned when conducting the full GovPass read, and it is also used for all interactions with the Database. This is commonly known as Card Number within Access Control Systems. It must include the leading zeros to create a 4 byte string. For example, GovPass number 123 would be padded with leading zeros to create a string: 0000000123\n\n**SiteID – String**\n\nEvery GovPass Compliant site is allocated a Site ID during the rollout processes. These IDs are strings and should be set as a global constant within the Access Control System as it is used in every API call to identify requesting system in conjunction with the API key. If there is a mismatch between the API key issuee and the Site ID and error will be raised.\n\n**CardState - String**\n\nCardState indicates the status of a GovPass. The following list shows all the valid states\n\n| **CardState** | **Description** |\n| --- | --- |\n| `Active` | An active GovPass that can be enrolled at other locations. |\n| `Produced` | A GovPass that has been encoded but not issued to site. Should not occur at live sties. Should trigger an alarm. |\n| `Issued` | A GovPass that has been issued to a site but not yet enrolled for the first time. Is the expected return for when personalising a pass locally. |\n| `BuildingOnly` | Reserved for GovPasses allocated for use as visitor or contractor passes that should not be used for access to any other building. Should trigger an alarm if not owned by the requesting building. |\n| `Lost` | The GovPass has been reported as Lost by its Issuing Building. Should trigger an alarm. |\n| `Revoked` | When a GovPass has been returned to the pass office or taken away from a user. |\n| `Expired` | Where a GovPass’ validity date has expired i.e. the holder’s clearance or contract has expired/ended. |\n| `Inactive` | A state reserved for future use where a pass has been disabled. Should trigger an alarm. |\n\nFor cards, that are suspended at a local building level for inactivity, the CardState should remain Active and have its EnrolmentState updated only.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"17957269","team":2655029,"collectionId":"c3b73e07-fc5a-40f3-a508-925bed78f552","publishedId":"UVRDHmUi","public":true,"publicUrl":"https://api-docs.govpass.security.gov.uk","privateUrl":"https://go.postman.co/documentation/17957269-c3b73e07-fc5a-40f3-a508-925bed78f552","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.11.4","publishDate":"2023-01-25T13:34:13.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"statusCode":200},"environments":[{"name":"GovPass Documentation","id":"07fd0752-f073-41bb-8d7d-429f6e1a9ac7","owner":"17957269","values":[{"key":"api_key","value":"dsae21e321e","enabled":true,"type":"secret"},{"key":"base_url","value":"api-link.example/beta","enabled":true},{"key":"site_id","value":"GOV-1","enabled":true},{"key":"department_code","value":"GOV","enabled":true},{"key":"govpass_number","value":"0000002068","enabled":true},{"key":"new_state","value":"Lost","enabled":true},{"key":"new_enrolment_state","value":"Enrolled","enabled":true},{"key":"request_date_time","value":"Dec 20 2022 11:17:39AM","enabled":true},{"key":"occupancy_count","value":244,"enabled":true},{"key":"govpass_csn","value":"0AAABBBCCCDDDE","enabled":true,"type":"default"},{"key":"upload_csv_url","value":"api-link.example/alpha","enabled":true,"type":"default"}],"published":true}],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/4f2fa8799c7b3b31a9d6e415c1485b3ae1b2ccceae40fe99ae5de981ffefe71c","favicon":"https://security.gov.uk/favicon.ico"},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"},{"label":"GovPass Documentation","value":"17957269-07fd0752-f073-41bb-8d7d-429f6e1a9ac7"}],"canonicalUrl":"https://api-docs.govpass.security.gov.uk/view/metadata/UVRDHmUi"}