| GET | /clients/{Id}/gpg45/ | Get the GPG 45 (DVS data schema v1.0) projection for a client |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Authentication:
# @ApiMember(Description="The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)", IsRequired=true, ParameterType="header, body")
api_user_id: Optional[str] = None
"""
The API User ID provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-User)
"""
# @ApiMember(Description="The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)", IsRequired=true, ParameterType="header, body")
api_user_key: Optional[str] = None
"""
The API User Key provided by us when you signed up to use our API. Can be provided in the request body, or as a header parameter (X-Api-Key)
"""
# @ApiMember(Description="The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).", ParameterType="header, body")
user_id: Optional[str] = None
"""
The User ID of the user making the request (e.g. a sub user). This is optional but can be used to associate API requests with a specific user, thereby allowing user permissions to be enforced. Can be provided in the body, or as a header parameter (X-User-Id).
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseRequest(IBaseRequest):
# @ApiMember(Description="The authentication credentials", IsRequired=true, ParameterType="header, body")
authentication: Optional[Authentication] = None
"""
The authentication credentials
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResponseError:
error_code: Optional[str] = None
field_name: Optional[str] = None
message: Optional[str] = None
meta: Optional[Dict[str, str]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ArrayOfResponseError(List[ResponseError]):
pass
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ResponseStatus:
error_code: Optional[str] = None
message: Optional[str] = None
stack_trace: Optional[str] = None
errors: Optional[ArrayOfResponseError] = None
meta: Optional[Dict[str, str]] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class BaseResponse(IBaseDataResponse, IHasResponseStatus):
# @ApiMember(Description="The status of the response")
response_status: Optional[ResponseStatus] = None
"""
The status of the response
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Links:
# @ApiMember()
self: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_address:
# @ApiMember(Description="Street address lines, most specific first")
street: Optional[List[str]] = None
"""
Street address lines, most specific first
"""
# @ApiMember(Description="City / town / district")
locality: Optional[str] = None
"""
City / town / district
"""
# @ApiMember(Description="Postcode")
postal_code: Optional[str] = None
"""
Postcode
"""
# @ApiMember(Description="Country code (ISO 3166-1 alpha-3)")
country_code: Optional[str] = None
"""
Country code (ISO 3166-1 alpha-3)
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_attachment:
# @ApiMember(Description="A description of the attachment")
desc: Optional[str] = None
"""
A description of the attachment
"""
# @ApiMember(Description="The IANA media type of the data (e.g. image/jpeg)")
content_type: Optional[str] = None
"""
The IANA media type of the data (e.g. image/jpeg)
"""
# @ApiMember(Description="The encoding format: base64 or byte_data")
content_format: Optional[str] = None
"""
The encoding format: base64 or byte_data
"""
# @ApiMember(Description="The base64-encoded data")
content: Optional[str] = None
"""
The base64-encoded data
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_biometric_information:
# @ApiMember(Description="The biometric modality: face, fingerprint, voice or iris")
biometric_modality: Optional[str] = None
"""
The biometric modality: face, fingerprint, voice or iris
"""
# @ApiMember(Description="The captured biometric data")
attachments: Optional[List[gpg45_attachment]] = None
"""
The captured biometric data
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_claims:
# @ApiMember(Description="The individual's given name(s)")
given_name: Optional[str] = None
"""
The individual's given name(s)
"""
# @ApiMember(Description="The individual's family / surname")
family_name: Optional[str] = None
"""
The individual's family / surname
"""
# @ApiMember(Description="The individual's date of birth (ISO 8601, yyyy-MM-dd)")
birthdate: Optional[str] = None
"""
The individual's date of birth (ISO 8601, yyyy-MM-dd)
"""
# @ApiMember(Description="Countries of citizenship (ISO 3166-1 alpha-3)")
nationalities: Optional[List[str]] = None
"""
Countries of citizenship (ISO 3166-1 alpha-3)
"""
# @ApiMember(Description="The individual's address")
address: Optional[gpg45_address] = None
"""
The individual's address
"""
# @ApiMember(Description="Biometric characteristics of the person making the claim")
biometric_information: Optional[List[gpg45_biometric_information]] = None
"""
Biometric characteristics of the person making the claim
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_dvs_registration:
# @ApiMember(Description="The service's DVS register reference")
registration_id: Optional[str] = None
"""
The service's DVS register reference
"""
# @ApiMember(Description="The registered name of the certified service")
name: Optional[str] = None
"""
The registered name of the certified service
"""
# @ApiMember(Description="Contact email for the certified service")
contact_email: Optional[str] = None
"""
Contact email for the certified service
"""
# @ApiMember(Description="Website of the certified service")
website: Optional[str] = None
"""
Website of the certified service
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_authority:
# @ApiMember(Description="The name of the authority")
name: Optional[str] = None
"""
The name of the authority
"""
# @ApiMember(Description="The country code where the authority is based (ISO 3166-1 alpha-2)")
country_code: Optional[str] = None
"""
The country code where the authority is based (ISO 3166-1 alpha-2)
"""
# @ApiMember(Description="The authority's jurisdiction")
jurisdiction: Optional[str] = None
"""
The authority's jurisdiction
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_document_details:
# @ApiMember(Description="The GPG 45 document_type enumeration value")
type: Optional[str] = None
"""
The GPG 45 document_type enumeration value
"""
# @ApiMember(Description="The document's reference / identification number")
document_number: Optional[str] = None
"""
The document's reference / identification number
"""
# @ApiMember(Description="The date the document was issued (ISO 8601)")
date_of_issuance: Optional[str] = None
"""
The date the document was issued (ISO 8601)
"""
# @ApiMember(Description="The date the document expires (ISO 8601)")
date_of_expiry: Optional[str] = None
"""
The date the document expires (ISO 8601)
"""
# @ApiMember(Description="The authority that issued the document")
issuer: Optional[gpg45_authority] = None
"""
The authority that issued the document
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_check_details:
# @ApiMember(Description="The GPG 45 check_method: auth, token, kbv, pvp, pvr, bvp, bvr, vpip, vpiruv, vri, vdig, vcrypt or data")
check_method: Optional[str] = None
"""
The GPG 45 check_method: auth, token, kbv, pvp, pvr, bvp, bvr, vpip, vpiruv, vri, vdig, vcrypt or data
"""
# @ApiMember(Description="A unique reference for this check, matched by assurance_details evidence_ref entries")
check_id: Optional[str] = None
"""
A unique reference for this check, matched by assurance_details evidence_ref entries
"""
# @ApiMember(Description="When the check was performed (ISO 8601 timestamp)")
time: Optional[str] = None
"""
When the check was performed (ISO 8601 timestamp)
"""
# @ApiMember(Description="The organisation that performed the check")
organisation: Optional[str] = None
"""
The organisation that performed the check
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_document:
# @ApiMember(Description="Always 'document'")
type: Optional[str] = None
"""
Always 'document'
"""
# @ApiMember(Description="Details about the document itself")
document_details: Optional[gpg45_document_details] = None
"""
Details about the document itself
"""
# @ApiMember(Description="Copies of the document")
attachments: Optional[List[gpg45_attachment]] = None
"""
Copies of the document
"""
# @ApiMember(Description="The checks performed on the document")
check_details: Optional[List[gpg45_check_details]] = None
"""
The checks performed on the document
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_evidence:
# @ApiMember(Description="The document used to prove the claim")
document: Optional[gpg45_document] = None
"""
The document used to prove the claim
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_evidence_metadata:
# @ApiMember(Description="The evidence classification, where applicable")
evidence_classification: Optional[str] = None
"""
The evidence classification, where applicable
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_evidence_ref:
# @ApiMember(Description="The check_id of the check that produced this assurance")
check_id: Optional[str] = None
"""
The check_id of the check that produced this assurance
"""
# @ApiMember(Description="Additional metadata about how the evidence supports the assurance")
evidence_ref: Optional[gpg45_evidence_metadata] = None
"""
Additional metadata about how the evidence supports the assurance
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_assurance_details:
# @ApiMember(Description="The type of check: validation, verification, counter_fraud or activity_history")
assurance_type: Optional[str] = None
"""
The type of check: validation, verification, counter_fraud or activity_history
"""
# @ApiMember(Description="The GPG 45 score achieved for this check: score_1 to score_4")
assurance_classification: Optional[str] = None
"""
The GPG 45 score achieved for this check: score_1 to score_4
"""
# @ApiMember(Description="The checks that produced this assurance, matched by check_id")
evidence_ref: Optional[List[gpg45_evidence_ref]] = None
"""
The checks that produced this assurance, matched by check_id
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_assurance_process:
# @ApiMember(Description="Always 'gpg45' for the DVS trust framework")
policy: Optional[str] = None
"""
Always 'gpg45' for the DVS trust framework
"""
# @ApiMember(Description="The GPG 45 identity profile code that was met (e.g. M1A, H1A). Null if no profile's requirements were fully met")
procedure: Optional[str] = None
"""
The GPG 45 identity profile code that was met (e.g. M1A, H1A). Null if no profile's requirements were fully met
"""
# @ApiMember(Description="How each assurance process was satisfied")
assurance_details: Optional[List[gpg45_assurance_details]] = None
"""
How each assurance process was satisfied
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class gpg45_verification:
# @ApiMember(Description="Always 'uk_dvstf' for the UK DVS trust framework")
trust_framework: Optional[str] = None
"""
Always 'uk_dvstf' for the UK DVS trust framework
"""
# @ApiMember(Description="The certified service's entry in the DVS register")
dvs_registration: Optional[gpg45_dvs_registration] = None
"""
The certified service's entry in the DVS register
"""
# @ApiMember(Description="The evidence used to prove the claim")
evidence: Optional[List[gpg45_evidence]] = None
"""
The evidence used to prove the claim
"""
# @ApiMember(Description="The GPG 45 confidence level achieved: low, medium, high or very_high")
assurance_level: Optional[str] = None
"""
The GPG 45 confidence level achieved: low, medium, high or very_high
"""
# @ApiMember(Description="The assurance policy and procedure followed")
assurance_process: Optional[gpg45_assurance_process] = None
"""
The assurance policy and procedure followed
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class Gpg45Projection:
# @ApiMember(Description="The claimed identity information (GPG 45 'claims')")
claims: Optional[gpg45_claims] = None
"""
The claimed identity information (GPG 45 'claims')
"""
# @ApiMember(Description="How the claims were proven (GPG 45 'verification'). Null until the client is Verified")
verification: Optional[gpg45_verification] = None
"""
How the claims were proven (GPG 45 'verification'). Null until the client is Verified
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetClientGpg45Data(BaseResponse):
# @ApiMember(Description="Links related to this client's GPG 45 projection")
links: Optional[Links] = None
"""
Links related to this client's GPG 45 projection
"""
# @ApiMember(Description="The GPG 45 (DVS data schema v1.0) projection: 'claims' and, once Verified, 'verification'")
gpg45: Optional[Gpg45Projection] = None
"""
The GPG 45 (DVS data schema v1.0) projection: 'claims' and, once Verified, 'verification'
"""
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetClientGpg45Response:
data: Optional[GetClientGpg45Data] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetClientGpg45(BaseRequest):
# @ApiMember(IsRequired=true, ParameterType="path")
id: int = 0
To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json
To embed the response in a jsonp callback, append ?callback=myCallback
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /clients/{Id}/gpg45/ HTTP/1.1
Host: api.sanctionssearch.com
Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length
{"data":{"links":{"self":"String"},"gpg45":{"claims":{"given_name":"String","family_name":"String","birthdate":"String","nationalities":["String"],"address":{"street":["String"],"locality":"String","postal_code":"String","country_code":"String"},"biometric_information":[{"biometric_modality":"String","attachments":[{"desc":"String","content_type":"String","content_format":"String","content":"String"}]}]},"verification":{"trust_framework":"String","dvs_registration":{"registration_id":"String","name":"String","contact_email":"String","website":"String"},"evidence":[{"document":{"type":"String","document_details":{"type":"String","document_number":"String","date_of_issuance":"String","date_of_expiry":"String","issuer":{"name":"String","country_code":"String","jurisdiction":"String"}},"attachments":[{"desc":"String","content_type":"String","content_format":"String","content":"String"}],"check_details":[{"check_method":"String","check_id":"String","time":"String","organisation":"String"}]}}],"assurance_level":"String","assurance_process":{"policy":"String","procedure":"String","assurance_details":[{"assurance_type":"String","assurance_classification":"String","evidence_ref":[{"check_id":"String","evidence_ref":{"evidence_classification":"String"}}]}]}}},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}}