Making a Request to the API requires you to have an API key. You can obtain an API key by signing up via the home page or the pricing page.
You can authenticate your requests by providing the API key as a value to the following HTTP header. X-UKRTWAPI-SECRET
You can make a request using any language, library or technology that can send HTTP requests. The base url is https://api.ukrtwchecker.co.uk
Please see the `Endpoints` section to view sample code for each endpoint. We also have a list of guides and integrations on our website.
The Applicant's Share Code. This is usually 8-11 characters, a mixture of letters and numbers, starting with 'W'.
The Applicant's date of birth (in the format dd-mm-yyyy).
The Applicant's first name(s).
The Applicant's surname(s)
The name of your company. This is required by the government for auditing purposes.
Accept or Reject applicants that require sponsorship. Can be set to “true” or “false”. (default: “true”).
Accept or Reject applicants that have student visas. Can be set to “true” or “false”. (default: “true”).
Include an image of the applicant in the response. Returned as base64 encoded string. Can be set to “true” or “false”. (default: “false”).
Right to work conditions and restrictions. This might include information about how many hours an applicant can work per week, industries or roles that they are not permitted to work in etc.
Details of the check, usually acts as a summary.
When their right to work expires, formatted as dd-mm-yyyy
The full name of the applicant as it appears on the government document.
Result of the check given the parameters (including configurable parameters)
STATUS_ACCEPTED - Right to Work verified, configured parameters/conditions all satisfied.
STATUS_REJECTED - Right to work not verified, code found but failed some configured parameters/conditions.
STATUS_NOT_FOUND - Share code not valid
STATUS_LOCKED - Share code locked, usually means there have been too many checks on that share code in a time frame. Usually resolved by waiting for 10 minutes and trying again.
STATUS_EXPIRED - Share code was valid, but has since expired. (Note that this only shows up on the first check after expiry, from then on, it will return STATUS_NOT_FOUND).
When the Applicant's right to work is valid from, formatted as dd-mm-yyyy.
Title of the check (usually, this is “Right to Work”).
The Applicant's image encoded as a base64 string.
Only present if the share code has been rejected due to configured parameters (such as allow_student, allow_sponsorship).
SPONSORSHIP - Applicant requires sponsorship, and the check was configured to reject applicants requiring sponsorship.
STUDENT - Applicant has a student visa, and the check was configured to reject applicants on student visas.
Mock the response for a valid right to work share code.
Mock the response for an invalid right to work share code (code not found by Government service).
Mock the response for a valid right to work share code, but the name provided does not match the name associated with the share code.
Mock the response for a valid right to work share code for an applicant that requires sponsorship. (this is useful if you'd like to test the behaviour of the allow_sponsorship parameter.
Mock the response for a valid right to work share code for an applicant that has a student visa. (this is useful if you'd like to test the behaviour of the allow_student parameter.
Mock the response for a share code that is valid, but has expired.
Select Language:
import requests
url = "https://api.ukrtwchecker.co.uk/rtw"
headers = {
"X-UKRTWAPI-SECRET": "YOUR_API_KEY"
}
params = {
"code": "TEST_ACCEPTED",
"forename": "John",
"surname": "Doe",
"dob": "07-09-1999",
"company_name": "UK RTW Checker Ltd.",
"allow_student": "true",
"allow_sponsorship": "true"
}
response = requests.get(url, headers=headers, params=params)
if response.status_code == 200:
print(response.json())
else:
print(f"Error: {response.status_code}", response.text)
© Copyright all rights reserved.
© Copyright all rights reserved.