Managing business addresses

How to add, delete, and update existing business addresses.

Use the operations shown below to manage business addresses:

Creating a business address

To create a business address, use the POST /businesses/{business_id}/addresses operation and provide parameters as shown in the table below.

ParameterTypeDescription
address_type
required
stringMAILING or PHYSICAL
street
required
stringFreeform name between 1 and 40 characters. May contain only alphanumeric and these special characters . , _ - #
street2stringFreeform name maximum 40 characters.
city
required
stringFreeform name between 2 and 40 characters.
state
required
stringTwo-character US state code. Non-US state code maximum 20 characters.
zip_code
required
stringFive-digit US zip code, (for example 12345) or nine-digit US zip code, (for example 12345-1234).
Non-US state code between 2 and 20 characters.
country
required
stringISO 3166-1 alpha-2 country code, maximum two characters.
is_primary
required
booleanIs this the primary address; either true or false.

An example of a request to create a business address is shown below.

curl --request POST \ --url https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses \ --header 'Authorization: YOUR-AUTHORIZATION' \ --header 'Content-Type: application/json' \ --header 'Identity: YOUR-IDENTITY' \ --data ' { "address_type": "PHYSICAL", "street": "345 Dan Diego Ave.", "street2": "Suite 111", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": false }
require 'uri' require 'net/http' require 'openssl' url = URI("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request["Identity"] = 'YOUR-IDENTITY' request["Authorization"] = 'YOUR-AUTHORIZATION' request.body = "{\"address_type\":\"PHYSICAL\",\"street\":\"345 Dan Diego Ave.\",\"street2\":\"Suite 111\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":false}" response = http.request(request) puts response.read_body
const options = { method: 'POST', headers: { 'Content-Type': 'application/json', Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION' }, body: JSON.stringify({ address_type: 'PHYSICAL', street: '345 Dan Diego Ave.', street2: 'Suite 111', city: 'San Francisco', state: 'CA', zip_code: '12345-1234', country: 'US', is_primary: false }) }; fetch('https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import requests url = "https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses" payload = { "address_type": "PHYSICAL", "street": "345 Dan Diego Ave.", "street2": "Suite 111", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": False } headers = { "Content-Type": "application/json", "Identity": "YOUR-IDENTITY", "Authorization": "YOUR-AUTHORIZATION" } response = requests.request("POST", url, json=payload, headers=headers) print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Identity", "YOUR-IDENTITY"); request.AddHeader("Authorization", "YOUR-AUTHORIZATION"); request.AddParameter("application/json", "{\"address_type\":\"PHYSICAL\",\"street\":\"345 Dan Diego Ave.\",\"street2\":\"Suite 111\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":false}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"address_type\":\"PHYSICAL\",\"street\":\"345 Dan Diego Ave.\",\"street2\":\"Suite 111\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":false}"); Request request = new Request.Builder() .url("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses") .post(body) .addHeader("Content-Type", "application/json") .addHeader("Identity", "YOUR-IDENTITY") .addHeader("Authorization", "YOUR-AUTHORIZATION") .build(); Response response = client.newCall(request).execute();

An example of a response to a successful request to create a business address is shown below.

{ "address_type": "MAILING", "street": "345 California Ave.", "street2": "Suite 600", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": true }

For a complete specification and interactive examples, see Creating a business address in the Bond API Reference.

Retrieving business addresses

To retrieve all business addresses, use the GET /businesses/{business_id}/addresses operation with no other parameters, as shown in the example below.

curl --request GET \ --url https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses \ --header 'Authorization: YOUR-AUTHORIZATION' \ --header 'Identity: YOUR-IDENTITY'
require 'uri' require 'net/http' require 'openssl' url = URI("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Identity"] = 'YOUR-IDENTITY' request["Authorization"] = 'YOUR-AUTHORIZATION' response = http.request(request) puts response.read_body
const options = { method: 'GET', headers: {Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION'} }; fetch('https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import requests url = "https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses" headers = { "Identity": "YOUR-IDENTITY", "Authorization": "YOUR-AUTHORIZATION" } response = requests.request("GET", url, headers=headers) print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses"); var request = new RestRequest(Method.GET); request.AddHeader("Identity", "YOUR-IDENTITY"); request.AddHeader("Authorization", "YOUR-AUTHORIZATION"); IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://sandbox.bond.tech/api/v.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses") .get() .addHeader("Identity", "YOUR-IDENTITY") .addHeader("Authorization", "YOUR-AUTHORIZATION") .build(); Response response = client.newCall(request).execute();

An example of a response to a successful request to retrieve all business addresses is shown below.

{ "page_info": { "page_size": 2, "page": 1, "pages": 1 }, "data": [ { "date_updated": "2019-08-24T14:15:22Z", "date_created": "2019-08-24T14:15:22Z", "address_id": "12348579-5d05-4e3e-a5e3-e61e3a5b1234", "address_type": "MAILING", "street": "345 California Ave.", "street2": "Suite 600", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": true, "deliverability": "deliverable" }, { "date_updated": "2019-08-24T14:15:22Z", "date_created": "2019-08-24T14:15:22Z", "address_id": "67898579-5d05-6789-a5e3-e61e3a5b6789", "address_type": "PHYSICAL", "street": "123 California Ave.", "street2": "Suite 100", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": false, "deliverability": "undeliverable" } ] }

To retrieve a single business address, use the GET /businesses/{business_id}/addresses/{address_id} operation with no other parameters, as shown in the example below.

curl --request GET \ --url https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234 \ --header 'Authorization: YOUR-AUTHORIZATION' \ --header 'Identity: YOUR-IDENTITY'
require 'uri' require 'net/http' require 'openssl' url = URI("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Identity"] = 'YOUR-IDENTITY' request["Authorization"] = 'YOUR-AUTHORIZATION' response = http.request(request) puts response.read_body
const options = { method: 'GET', headers: {Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION'} }; fetch('https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import requests url = "https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234" headers = { "Identity": "YOUR-IDENTITY", "Authorization": "YOUR-AUTHORIZATION" } response = requests.request("GET", url, headers=headers) print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234"); var request = new RestRequest(Method.GET); request.AddHeader("Identity", "YOUR-IDENTITY"); request.AddHeader("Authorization", "YOUR-AUTHORIZATION"); IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234") .get() .addHeader("Identity", "YOUR-IDENTITY") .addHeader("Authorization", "YOUR-AUTHORIZATION") .build(); Response response = client.newCall(request).execute();

For a complete specification and interactive examples, see Retrieving a business address and Retrieving all business addresses.

Updating a business address

To update a business address, use the PATCH /businesses/{business_id}/addresses/{address_id} operation and provide the parameters that you want to update, as shown in the table below.

ParameterTypeDescription
address_type
required
stringEither MAILING or PHYSICAL
street
required
stringFreeform name between 8 and 30 characters. May contain only alphanumeric and these special characters . , _ - #
street2stringFreeform name between 3 and 20 characters.
city
required
stringTwo-character US city code or non-US city code, maximum 20 characters.
state
required
stringTwo-character US state code or non-US state code, maximum 20 characters.
zip_code
required
stringFive-digit US zip code, (for example 12345) or nine-digit US zip code, (for example 12345-1234).
Non-US state code between 2 and 20 characters.
country
required
stringISO 3166-1 alpha-2 country code, maximum two characters.
is_primary
required
booleanIs this the primary address; either true or false.

An example of a request to update a business address is shown below.

curl --request PATCH \ --url https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234 \ --header 'Authorization: YOUR-AUTHORIZATION' \ --header 'Content-Type: application/json' \ --header 'Identity: YOUR-IDENTITY' \ --data ' { "address_type": "MAILING", "street": "345 Michigan Ave.", "street2": "Suite 1345", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": false }
require 'uri' require 'net/http' require 'openssl' url = URI("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Patch.new(url) request["Content-Type"] = 'application/json' request["Identity"] = 'YOUR-IDENTITY' request["Authorization"] = 'YOUR-AUTHORIZATION' request.body = "{\"address_type\":\"MAILING\",\"street\":\"345 Michigan Ave.\",\"street2\":\"Suite 1345\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":false}" response = http.request(request) puts response.read_body
const options = { method: 'PATCH', headers: { 'Content-Type': 'application/json', Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION' }, body: JSON.stringify({ address_type: 'MAILING', street: '345 Michigan Ave.', street2: 'Suite 1345', city: 'San Francisco', state: 'CA', zip_code: '12345-1234', country: 'US', is_primary: false }) }; fetch('https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import requests url = "https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234" payload = { "address_type": "MAILING", "street": "345 Michigan Ave.", "street2": "Suite 1345", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": False } headers = { "Content-Type": "application/json", "Identity": "YOUR-IDENTITY", "Authorization": "YOUR-AUTHORIZATION" } response = requests.request("PATCH", url, json=payload, headers=headers) print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234"); var request = new RestRequest(Method.PATCH); request.AddHeader("Content-Type", "application/json"); request.AddHeader("Identity", "YOUR-IDENTITY"); request.AddHeader("Authorization", "YOUR-AUTHORIZATION"); request.AddParameter("application/json", "{\"address_type\":\"MAILING\",\"street\":\"345 Michigan Ave.\",\"street2\":\"Suite 1345\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":false}", ParameterType.RequestBody); IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient(); MediaType mediaType = MediaType.parse("application/json"); RequestBody body = RequestBody.create(mediaType, "{\"address_type\":\"MAILING\",\"street\":\"345 Michigan Ave.\",\"street2\":\"Suite 1345\",\"city\":\"San Francisco\",\"state\":\"CA\",\"zip_code\":\"12345-1234\",\"country\":\"US\",\"is_primary\":false}"); Request request = new Request.Builder() .url("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234") .patch(body) .addHeader("Content-Type", "application/json") .addHeader("Identity", "YOUR-IDENTITY") .addHeader("Authorization", "YOUR-AUTHORIZATION") .build(); Response response = client.newCall(request).execute();

An example of a response to a successful request to update a business address is shown below.

{ "address_type": "MAILING", "street": "345 California Ave.", "street2": "Suite 600", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": true }

For a complete specification and interactive examples, see Updating a business address.

Deleting a business address

To delete a business address, use the DELETE /businesses/{business_id}/addresses/{address_id} operation with no other parameters, as shown in the example below.

curl --request DELETE \ --url https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234 \ --header 'Authorization: YOUR-AUTHORIZATION' \ --header 'Identity: YOUR-IDENTITY'
require 'uri' require 'net/http' require 'openssl' url = URI("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["Identity"] = 'YOUR-IDENTITY' request["Authorization"] = 'YOUR-AUTHORIZATION' response = http.request(request) puts response.read_body
const options = { method: 'DELETE', headers: {Identity: 'YOUR-IDENTITY', Authorization: 'YOUR-AUTHORIZATION'} }; fetch('https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234', options) .then(response => response.json()) .then(response => console.log(response)) .catch(err => console.error(err));
import requests url = "https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234" headers = { "Identity": "YOUR-IDENTITY", "Authorization": "YOUR-AUTHORIZATION" } response = requests.request("DELETE", url, headers=headers) print(response.text)
var client = new RestClient("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234"); var request = new RestRequest(Method.DELETE); request.AddHeader("Identity", "YOUR-IDENTITY"); request.AddHeader("Authorization", "YOUR-AUTHORIZATION"); IRestResponse response = client.Execute(request);
OkHttpClient client = new OkHttpClient(); Request request = new Request.Builder() .url("https://sandbox.bond.tech/api/v0.1/businesses/002e0f0e-e39d-4351-876c-afcad30d9c37/addresses/12348579-5d05-4e3e-a5e3-e61e3a5b1234") .delete(null) .addHeader("Identity", "YOUR-IDENTITY") .addHeader("Authorization", "YOUR-AUTHORIZATION") .build(); Response response = client.newCall(request).execute();

An example of a response to a successful request to delete a business address is shown below.

{ "date_deleted": "2019-08-24T14:15:22Z", "date_created": "2019-07-24T14:15:22Z", "address_id": "12348579-5d05-4e3e-a5e3-e61e3a5b1234", "address_type": "MAILING", "street": "345 California Ave.", "street2": "Suite 600", "city": "San Francisco", "state": "CA", "zip_code": "12345-1234", "country": "US", "is_primary": True, "deliverability": "deliverable" }

If you try to delete a primary business addresses, an example of a response to a failed request is shown below:

{ "Message": "A business must have atleast one active address", "Status": 400, "Code": "business_address_del_err", "Type": "Request Error" }

For a complete specification and interactive examples, see Deleting a business address.


Did this page help you?