Create an Address

    Creates a new Address object.

    API Endpoint

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

    Arguments

    country_iso required string

    Country ISO 2 code of the address proof

    alias string

    Alias name of the address

    salutation required string

    This can have the following values:

    • Mr

    • Ms

    first_name required string

    First name of the user for whom the identity is created

    last_name required string

    Second name of the user for whom the identity is created

    address_line1 required string

    Building name/number

    address_line2 required string

    The street name/number of the address

    city required string

    The city of the address for which the address proof is created

    region required string

    The region of the address for which the address proof is created

    postal_code required string

    The postal code of the address that is being created

    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.

    auto_correct_address boolean

    If set to true, the address will be auto-corrected by the system if necessary. The param needs to be set to false explicitly so that it is not auto-corrected.

    proof_type string

    The type of document that is provided as address proof.

    Possible values:

    • NATIONAL_ID_CARD - National ID document.

    • PASSPORT - Passport.

    • BUSINESS_REGISTRATION - Business registration document.

    • NIF - National identity card for Spain.

    • NIE - Tax identification number for Spain.

    • DNI - Fiscal identification number for Spain.

    • any - Any type of document apart from the ones specified.

    fiscal_identification_code

    The code is valid for businesses alone

    street_code

    Street code of the address

    municipal_code

    Municipal code of the address

    phone_number_country required string

    ISO 2 of the Phone Number

    number_type required string

    Type of the Phone Number. This can be local, national, mobile, or toll-free.

    Response

    HTTP Status Code: 200

    {
    	"api_id": "324a7dd8-0db2-11e4-8a4a-123140008edf",
    	"message": "Your request has been accepted."
    }
    

    Example Request

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    
    import plivo
    
    client = plivo.RestClient()
    response = client.addresses.create(
        country_iso='FR',
        salutation='Mr',
        first_name='Bruce',
        last_name='Wayne',
        address_line1='128',
        address_line2='RUE DU COMMANDANT GUILBAUD',
        city='PARIS',
        region='PARIS',
        postal_code='75016',
        address_proof_type='others', )
    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
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    
    /**
     * 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("YOUR_AUTH_ID", "YOUR_AUTH_TOKEN");
                string fileName = "path/to/file.jpg";
                try
                {
                    var createResponse = api.Address.Create(
                        countryIso: "US",
                        salutation: "Mr",
                        firstName: "Bruce",
                        lastName: "Wayne",
                        addressLine1: "1234",
                        addressLine2: "Abcd Pkwy",
                        city: "Gotham City",
                        region: "New York",
                        postalCode: "12345",
                        addressProofType: "others",
                        autoCorrectAddress:true,
                        callbackUrl: "https://callback.url",
                        alias:"wayne",
                        fileToUpload: fileName
                    );
    
                    Console.WriteLine(createResponse);
                }
                catch (PlivoRestException e)
                {
                    Console.WriteLine("Exception: " + e.Message);
                }
            }
        }
    }