Skip to main content

Documentation

Retrieve Address

Retrieve an address.

Code Samples
    • .NET

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

      • const makeRequest = require('<path-to-your-utility-file>/utilities').makeRequest;
        
        async function main() {
          try {
            const result = await makeRequest(
              'GET',
              '/v1/addresses/address_80923fd28383ea14c127f9ea9997a0ec'
            );
        
            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/addresses/address_3e5ee33a65805dae26f56f45d6d5c79e");
            var_dump($object);
        } catch(Exception $e) {
            echo "Error =>$e";
        }
        ?>
    • Python

      • from pprint import pprint
        
        from utilities import make_request
        
        # Retrieve Address
        result = make_request(method='get', path='/v1/addresses/address_211814f6e85b112fe786b87140f10f0e')
        pprint(result)
  • /v1/addresses/:address

  • Retrieve Address

  • curl -X get
    https://sandboxapi.rapyd.net/v1/addresses/address_71f1048a5837feb31b594f9d3d9b6623
    -H 'access_key: your-access-key-here'
    -H 'Content-Type: application/json'
    -H 'salt: your-random-string-here'
    -H 'signature: your-calculated-signature-here'
    -H 'timestamp: your-unix-timestamp-here'
    
  • {
        "status": {
            "error_code": "",
            "status": "SUCCESS",
            "message": "",
            "response_code": "",
            "operation_id": "166251b0-7180-48c8-bdcd-abb8c5510555"
        },
        "data": {
            "id": "address_71f1048a5837feb31b594f9d3d9b6623",
            "name": "John Doe",
            "line_1": "123 State Street",
            "line_2": "Apt. 56",
            "line_3": "",
            "city": "Anytown",
            "state": "NY",
            "country": "US",
            "zip": "12345",
            "phone_number": "12125559999",
            "metadata": {
                "merchant_defined": true
            },
            "canton": "",
            "district": "",
            "created_at": 1551689479
        }
    }