Read Ship/Bill Address

This function is used to retrieve an address. Addresses are retrieved by their unique ID.

Our shipping and billing address calls accept a variety of values for the Country ID and State ID key-value pairs. The Country ID and State ID fields allow you to use standard ISO 3166-2 Numeric and Subdivision ISO codes. ISO standards are defined and maintained by ISO 3166/MA. For your convenience, we have included downloads of these codes here:

Country Reference List

Path Parameters

PropertyTypeDescription
addressIdIntegerThe Fusebill generated ID that uniquely identifies this address
Examples
curl -X GET "https://secure.fusebill.com/v1/Addresses/{addressId}" \
	-H "Content-Type: application/json" \
	-H "Authorization: Basic {APIKey}"
//path parameter
int pathParameter = {addressId}; 
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://stg-secure.fusebill.com/v1/Addresses/"+pathParameter);
//Add Content type
request.ContentType = "application/json";
request.ContentLength = 0;
//Add Api key authorization
request.Headers.Add(HttpRequestHeader.Authorization, "Basic "+apiKey);
//Set request method
request.Method = "GET";
//Perform the request
var httpResponse = (HttpWebResponse)request.GetResponse();
//Record the response from our request
var result = "";
using (var streamReader = new StreamReader(httpResponse.GetResponseStream()))
{
  result = streamReader.ReadToEnd();
}
#Import library Requests
import requests
#Pass in a dictionary to the Headers parameter
headers = {'Authorization' : 'Basic {APIKey}', 'Content-Type' : 'application/json'}
#Pass in your URI and Headers
r = requests.get('https://stg-secure.fusebill.com/v1/addresses/{id}', headers=headers)
print(r.content)
Response
{
	"customerAddressPreferenceId": 84636,
	"companyName": "DarkSide",
	"line1": "117 Waba Road",
	"line2": null,
	"countryId": 124,
	"country": "Canada",
	"stateId": 9,
	"state": "Ontario",
	"city": "Pakenham",
	"postalZip": "K0A2X0",
	"addressType": "Billing",
	"id": 63406,
	"uri": "https://secure.fusebill.com/v1/addresses/63406"
}
{
    "ErrorId": 0,
    "HttpStatusCode": 404,
    "Errors": [
        {
            "Key": "Api Error",
            "Value": "Address with id 1 not found."
        }
    ]
}
Language
Authorization