Skip to main content

Documentation

List Official Identification Documents

Retrieve a list of the types of official identification documents for a country.

Use this method to determine the types of documents to use for identification purposes, and also whether you need the reverse side of the document. You can filter your search results by country with the country query parameter.

    • country

    • Two-letter ISO 3166-1 ALPHA-2 code for the country.

    • .NET

      • using System;
        
        namespace RapydApiRequestSample
        {
            class Program
            {
                static void Main(string[] args)
                {
                    try
                    {
                        string country = "US";
        
                        string result = RapydApiRequestSample.Utilities.MakeRequest("GET", $"/v1/identities/types?country={country}");
        
                        Console.WriteLine(result);
                    }
                    catch (Exception e)
                    {
                        Console.WriteLine("Error completing request: " + e.Message);
                    }
                }
            }
        }
    • JavaScript

      • onst makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const result = await makeRequest('GET', '/v1/identities/types?country=US');
        
            console.log(result);
          } catch (error) {
            console.error('Error completing request', error);
          }
        }
    • PHP

      • <?php
        $path = $_SERVER['DOCUMENT_ROOT'];
        $path .= "/<path-to-your-utility-file>/utilities.php";
        include($path);
        
        try {
            $object = make_request('get', '/v1/identities/types?country=US');
            var_dump($object);
        } catch(Exception $e) {
            echo "Error: $e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        country = 'US'
        
        results = make_request(method='get', path=f'/v1/identities/types?country={country}')
        pprint(results)
  • /v1/identities/types

  • List Official Identification Documents

  • curl -X get
    https://sandboxapi.rapyd.net/v1/identities/types?country=US
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'idempotency: your-idempotency-parameter-here'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    
  • {
        "status": {
            "error_code": "0",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "a1036ba7-7dbf-410d-b31e-eca3236ed79c"
        },
        "data": [
            {
                "country": "US",
                "type": "DL",
                "name": "Driver's License",
                "is_back_required": true,
                "is_address_extractable": false
            },
            {
                "country": "US",
                "type": "ID",
                "name": "Identity Card",
                "is_back_required": true,
                "is_address_extractable": false
            },
            {
                "country": "US",
                "type": "PA",
                "name": "Passport",
                "is_back_required": false,
                "is_address_extractable": false
            }
        ]
    }