Metadata
Metadata lists are datasets that have a specific key/value pairs that are required to be used as part of the quoting service.
Datasets
A list of datasets can be seen below:
genders
occupations
marital_status
occupation_businesses
employment
titles
licence_types
cover_reasons
relationships
overnight_parking
policy_length
counties
Query Parameters
Metadata datasets can use the following query parameters:
Query
?q=f: case insensitive key starts with - e.g. search for metadata values that start with “foo”
Search
?s=foo: case insensitive value contains - e.g. search for metadata values containing “foo”
Ordering
?ordering=key: order the results by the key field.
Pagination
?page=1: return the first page of results.
Combinations
?q=f&ordering=key: Query parameters can be combined as per standard HTML query parameters:
API
Genders (List)
A list of active genders from the genders dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/genders/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "male",
"value": "Male"
}
]
}
Occupations (List)
A list of active occupations from the occupations dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/occupations/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "accountant",
"value": "Accountant"
}
]
}
Marital Status (List)
A list of active marital statuses from the marital_status dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/marital_status/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "single",
"value": "Single"
}
]
}
Occupation Businesses (List)
A list of active occupation businesses from the occupation_businesses dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/occupation_businesses/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "accountancy",
"value": "Accountancy"
}
]
}
Employment (List)
A list of active employment statuses from the employment dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/employment/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "employed",
"value": "Employed"
}
]
}
Titles (List)
A list of active titles from the titles dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/titles/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "mr",
"value": "Mr"
}
]
}
Licence Types (List)
A list of active licence types from the licence_types dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/licence_types/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "fulluk",
"value": "Full (UK)"
}
]
}
Cover Reasons (List)
A list of active cover reasons from the cover_reasons dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/cover_reasons/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "social",
"value": "Social"
}
]
}
Relationships (List)
A list of active relationships from the relationships dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/relationships/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "spouse",
"value": "Spouse"
}
]
}
Overnight Parking (List)
A list of active overnight parking statuses from the overnight_parking dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/overnight_parking/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "garage",
"value": "Garage"
}
]
}
Policy Length (List)
A list of active policy lengths from the policy_length dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/policy_length/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "annual",
"value": "Annual"
}
]
}
Counties (List)
A list of active counties from the counties dataset.
Request
curl -X 'GET' \
'https://st.igate-test.co.uk/api/v1/metadata/counties/' \
-H 'Authorization: Bearer abc123xyz...' \
-H 'accept: application/json'
Response
Type: 200 OK
{
"count": 1,
"next": null,
"previous": null,
"results": [
{
"uuid": "23d63602-775e-464a-83e5-2908d87f6608",
"key": "norfolk",
"value": "Norfolk"
}
]
}