Update an Identity

    Updates the Identity object by setting the values of the parameters passed. Parameters that are not provided remain unchanged.

    API Endpoint

    POST https://api.plivo.com/v1/Account/{auth_id}/Verification/Identity/{id}/

    Arguments

    country_iso

    Country ISO 2 code.

    alias

    Alias name of the address.

    salutation

    Allowed values: Mr, Ms

    first_name

    First name of the user for whom the identity is created.

    last_name

    Second name of the user for whom the identity is created.

    birth_place

    Birthplace of the user.

    birth_date

    Birth date in yyyy-mm-dd format of the user.

    nationality

    Nationality of the user.

    id_nationality

    Nationality mentioned in the identity proof.

    id_issue_date

    Issue date in yyyy-mm-dd mentioned in the identity proof.

    business_name

    Business name of the user.

    id_type

    Building name/number.

    id_number

    The unique number on the identifier.

    address_line1

    Building name/number.

    address_line2

    Street name/number of the address.

    city

    The city of the address.

    region

    The region of the address.

    postal_code

    The postal code of the address.

    fiscal_identification_code

    The code is available for businesses alone and will be available for Spain mobile numbers. If not present, return null

    street_code

    Street code of the address. Return null if not present.

    municipal_code

    Municipal code of the address. Return null if not present.

    subaccount

    The link to the subaccount resource associated with the application. If the application belongs to the main account, this field will be null.

    file

    A file to upload, which needs to be considered the proof of ID. Max. file size = 5MB* File should be in JPG, PDF, or PNG format.

    Returns

    Returns a confirmation that the object is updated.

    Response

    {
      "message": "Your request has been accepted.",
      "api_id": "5a9fcb68-523d-11e1-86da-6ff39efcb949"
    }
    

    Example Request

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    
    import plivo
    
    client = plivo.RestClient('<auth_id>','<auth_token>')
    response = client.identities.update(
        identity_id='32208455725227',
        country_iso='US',
        salutation='Mr',
        first_name='Bruce',
        last_name='Wayne',
        birth_place='Gotham City',
        birth_date='1900-01-01',
        nationality='FR',
        id_nationality='New Earth',
        id_issue_date='2018-01-01',
        id_type='passport',
        id_number='128163264', )
    print(response)
    
    # Or, you can use the identity object directly
    identity = client.identities.get(
        identity_id='32208455725227', )
    response = identity.update(
        country_iso='US',
        salutation='Mr',
        first_name='Bruce',
        last_name='Wayne',
        birth_place='Gotham City',
        birth_date='1900-01-01',
        nationality='FR',
        id_nationality='New Earth',
        id_issue_date='2018-01-01',
        id_type='passport',
        id_number='128163264', )
    print(response)
    
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    
    /**
     * Example for Account Get
     */
    using System;
    using System.Collections.Generic;
    using Plivo;
    using Plivo.Exception;
    
    namespace PlivoExamples
    {
        internal class Program
        {
            public static void Main(string[] args)
            {
                var api = new PlivoApi("<auth_id>","<auth_token>");
                string fileName = "path/to/file.jpg";
                try
                {
                    var response = api.Identity.Update(
                        "identityId",
                        salutation:"Mr",
                        fileToUpload:fileName
                    );
                    Console.WriteLine(response);
                }
                catch (PlivoRestException e)
                {
                    Console.WriteLine("Exception: " + e.Message);
                }
            }
        }
    }