get https://secure.fusebill.com/v1/customerAddressPreferences/
This function allows you to retrieve customer address preferences by ID.
Path Parameters
Field | Data Type | Description |
---|---|---|
customerId | Integer | This is the Fusebill ID for the customer you want to retrieve address information for. |
Examples
curl -X GET "https://secure.fusebill.com/v1/customerAddressPreferences/{customerId}" \
-H "Content-Type: application/json" \
-H "Authorization: Basic {APIKey}"
//path parameter, Fusebill Id which corresponds to the Id Field Returned by Create/Update customer
int pathParameter = {customerId};
//Setup API key
string apiKey = "{APIKey}";
//Configure URI
WebRequest request = WebRequest.Create("HTTPS://secure.fusebill.com/v1/customerAddressPreferences/"+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, Payload and Headers
r = requests.get('https://secure.fusebill.com/v1/customerAddressPreferences/{id}', headers=headers)
print(r.content)
Response
{
"contactName": "Frank",
"shippingInstructions": null,
"useBillingAddressAsShippingAddress": true,
"billingAddress": null,
"shippingAddress": null,
"id": 84072,
"uri": "https://secure.fusebill.com/v1/customerAddressPreferences/84072"
}
{
"ErrorId": 0,
"HttpStatusCode": 404,
"Errors": [
{
"Key": "Api Error",
"Value": "Customer with id 1 not found."
}
]
}