---
title: "Retrieve Address"
source_url: https://docs.rapyd.net/en/retrieve-address.html
lang: en
---

# Retrieve Address

Retrieve an address.

> **Note:**
>
> - The code samples include successful requests (200) and bad requests (400).
>
>   - For error messages that appear due to bad requests (400), see:
>
>     - [General Errors](https://docs.rapyd.net/en/general-errors.md "General Errors")
>     - [Address Errors](https://docs.rapyd.net/en/address-errors.md "Address Errors")
>   - For information about unauthorized request (401) and other authentication errors, see [Troubleshooting Authentication and Authorization Errors](https://docs.rapyd.net/en/troubleshooting-authentication-and-authorization-errors.md "Troubleshooting Authentication and Authorization Errors").

### Parameters

### Request Path Parameters

- - address
  - ID of the `address` object. String starting with **address_**.

### Request Header Parameters

- - access_key
  - Unique access key provided by Rapyd for each authorized user.

    See [Developers](https://docs.rapyd.net/en/developers.md "Developers").
- - Content-Type
  - Indicates that the data appears in JSON format. Set to **application/json**.
- - salt
  - Random string. Recommended length: 8-16 characters.
- - signature
  - Signature calculated for each request individually.

    See [Request Signatures](https://docs.rapyd.net/en/request-signatures.md "Request Signatures").
- - timestamp
  - Timestamp for the request, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time") (seconds).

### Response Parameters

- - canton
  - Name of the canton administrative subdivision, as used in banking.
- - city
  - City portion of the address.
- - country
  - The two-letter ISO 3166-1 ALPHA-2 code for the country.
- - created_at
  - Time of creation of the object, in [Unix time](https://docs.rapyd.net/en/glossary.md#UUID-945d98cf-adae-e1cf-2606-c7fae8b4a7e1_unix_time "Unix time").
- - district
  - Name of the district administrative subdivision, as used in banking.
- - id
  - ID of the `address` object.
- - line_1
  - Line 1 of the address, such as a building number and street name.
- - line_2
  - Line 2 of the address, such as a suite or apartment number, or the name of a named building.
- - line_3
  - Line 3 of the address.
- - metadata
  - A JSON object defined by the client. See [Metadata](https://docs.rapyd.net/en/metadata.md "Metadata").
- - name
  - The name of a contact person or an "in care of" person at this address. For a **personal** wallet contact, alphabetic characters and spaces.
- - phone_number
  - Phone number associated with this specific address in E.164 format. Must be unique.
- - state
  - State or province portion of the address.
- - zip
  - Postal code portion of the 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

    - ```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
      <?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

    - ```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
  curl -X get 'https://sandboxapi.rapyd.net/v1/addresses/address_f9189070a0671b1a4302851b839d166a' \
  -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'
  ```
- ```json
  {
      "status": {
          "error_code": "",
          "status": "SUCCESS",
          "message": "",
          "response_code": "",
          "operation_id": "b600fed0-d1ef-4e83-8b9a-4793b054f854"
      },
      "data": {
          "id": "address_f9189070a0671b1a4302851b839d166a",
          "name": "John Doe",
          "line_1": "123 First Street",
          "line_2": "Apt. 56",
          "line_3": "",
          "city": "Anytown",
          "state": "",
          "country": "US",
          "zip": "12345",
          "phone_number": "12125559999",
          "metadata": {},
          "canton": "",
          "district": "",
          "created_at": 1761820962
      }
  }
  ```

- Bad Request - Address ID Not Found
- ```curl
  curl -X get 'https://sandboxapi.rapyd.net/v1/addresses/addressf9189070a0671b1a4302851b839d166a' \
  -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'
  ```
- ```json
  {
      "status": {
          "error_code": "ERROR_ADDRESS_GET",
          "status": "ERROR",
          "message": "The request attempted an operation that requires an address, but the address was not found. The request was rejected. Corrective action: For the 'address' parameter, use a valid address ID.",
          "response_code": "ERROR_ADDRESS_GET",
          "operation_id": "565bc569-bd30-4c4c-b105-769c2d75b9dd"
      }
  }
  ```
