Skip to content

Instantly share code, notes, and snippets.

@pulkit21
Last active April 18, 2018 12:52
Show Gist options
  • Save pulkit21/1158ddf89b385709c7cd7ec82dac7555 to your computer and use it in GitHub Desktop.
Save pulkit21/1158ddf89b385709c7cd7ec82dac7555 to your computer and use it in GitHub Desktop.
These are the following request i made but sure, why its not working! http://take.ms/JMbfT
curl https://api.onfido.com/v2/applicants \
-H 'Authorization: Token token=api_key' \
-d 'title=Mr' \
-d 'first_name=John' \
-d 'last_name=Smith' \
-d 'gender=male' \
-d 'dob=1980-01-22' \
-d 'country=GBR' \
-d 'addresses[][building_number]=100' \
-d 'addresses[][street]=Main Street' \
-d 'addresses[][town]=London' \
-d 'addresses[][postcode]=SW4 6EH' \
-d 'addresses[][country]=GBR'\
-d '[email protected]'
{
"id":"958fd3e4-07aa-4137-bd36-a34f18e6b04a",
"created_at":"2018-04-18T12:33:30Z",
"sandbox":true,
"title":"Mr",
"first_name":"John",
"middle_name":null,
"last_name":"Smith",
"email":"[email protected]",
"gender":"Male",
"dob":"1980-01-22",
"telephone":null,
"mobile":null,
"nationality":null,
"country":"gbr",
"href":"/v2/applicants/958fd3e4-07aa-4137-bd36-a34f18e6b04a",
"mothers_maiden_name":null,
"country_of_birth":null,
"town_of_birth":null,
"previous_last_name":null,
"id_numbers":[],
"addresses":[
{
"flat_number": null,
"building_number": "100",
"building_name": null,
"street": "Main Street",
"sub_street":null,
"town": "London",
"state":null,
"postcode":"SW4 6EH",
"country":"GBR",
"start_date":null,
"end_date":null,
"line1":null,
"line2":null,
"line3":null
}
]
}
curl https://api.onfido.com/v2/applicants/958fd3e4-07aa-4137-bd36-a34f18e6b04a/checks \
-H "Authorization: Token token=api_key" \
-d 'type=standard' \
-d 'reports[][name]=identity'
{
"error": {
"type": "validation_error",
"message": "There was a validation error on this request",
"fields": {
"base": ["The following reports have not been enabled for your account: identity. You can see the list of enabled reports using the /report_type_groups API endpoint. Please contact [email protected] if you have questions regarding your account setup."]
}
}
}
curl https://api.onfido.com/v2/report_type_groups \
> -H "Authorization: Token token=api_key"
{
"report_type_groups": [
{
"id":"5968",
"name":"Nesterly",
"group_only":false,
"report_types":[
{"id": "70",
"name":"identity",
"variant":"kyc",
"options":[]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment