# Retrieving addresses from an order

## Retrieving the billing address from an order

To retrieve a billing address, use the [`GET /shoppers/me/orders/{orderId}/billing-address`](https://docs.digitalriver.com/commerce-api-references/shopper-apis/cart/billing-address#v1-shoppers-me-carts-active-billing-address) resource.

{% tabs %}
{% tab title="cURL" %}

```http
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/billing-address' \
--header 'authorization: Basic ***\
...
```

{% endtab %}

{% tab title="200 OK response" %}

```json
{"address": {
   "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/billing-address",
   "id": "billingAddress",
   "firstName": "John",
   "lastName": "Doe",
   "companyName": "null",
   "line1": "PO BOX 3940",
   "line2": "123",
   "line3": null,
   "city": "Waconia",
   "countrySubdivision": "MN",
   "postalCode": "55387",
   "country": "US",
   "countryName": "United States",
   "phoneNumber": "555-555-555"
}}
```

{% endtab %}
{% endtabs %}

## Retrieving the shipping address from an order

To retrieve a shipping address, use the [`GET /shoppers/me/orders/{orderId}/shipping-address`](https://docs.digitalriver.com/commerce-api-references/shopper-apis/cart/shipping-address#v1-shoppers-me-carts-active-shipping-address) resource.

{% tabs %}
{% tab title="cURL" %}

```http
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/shipping-address' \
--header 'authorization: Basic ***\
...
```

{% endtab %}

{% tab title="200 OK response" %}

```json
{"address": {
   "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/shippingAddress",
   "id": "shippingAddress",
   "firstName": "John",
   "lastName": "Doe",
   "companyName": "null",
   "line1": "PO BOX 3940",
   "line2": "123",
   "line3": null,
   "city": "Waconia",
   "countrySubdivision": "MN",
   "postalCode": "55387",
   "country": "US",
   "countryName": "United States",
   "phoneNumber": "555-555-5555"
}}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.digitalriver.com/commerce-api/shopper-apis/orders-1/retrieving-addresses-from-an-order.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
