Billing and Shipping Address

The Billing and Shipping Address APIs provides access to the billing and shipping address for a shopper's cart or order. Use the Billing and Shipping Address APIs to:

  • Get, apply, or update the billing or shipping address for a cart
  • Retrieve a billing or shipping address for an order

Resource URIs

All methods in this API require a full access token.

Methods


					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{
  "address": {
    "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/billing-address",
    "id": "billingAddress",
    "firstName": "John",
    "lastName": "Does",
    "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",
    "emailAddress": "jdoe@acme.com",
    "suggestions": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/billing-address/suggestions"
    }
  }
}
			
					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{"address": {
   "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-address",
   "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",
   "emailAddress": "jdoe@acme.com"
}}
			
					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{"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"
}}
			
					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					HTTP/1.1 200 OK
			
					HTTP/1.1 200 OK
			
					{"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"
}}
			
					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{
  "cart": {
    ...
    "testOrder": "true",
    "sendEmail": "false",
    "totalItemsInCart": 1,
    "businessEntityCode": "DR_INC-ENTITY",
    "billingAddress": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/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,
      "emailAddress": jdoe@acme.com
    },
    "shippingAddress": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-address",
      "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-555,
      "emailAddress": jdoe@acme.com
    },
    "payment": {},
    ...
}
			
					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{
  "cart": {
    ...
    "testOrder": "true",
    "sendEmail": "false",
    "totalItemsInCart": 1,
    "businessEntityCode": "DR_INC-ENTITY",
    "billingAddress": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/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,
      "emailAddress": jdoe@acme.com
    },
    "shippingAddress": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/carts/active/shipping-address",
      "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-555,
      "emailAddress": jdoe@acme.com
    },
    "payment": {},
    ...
}
			
					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
			
					<address>
   <firstName>John</firstName>
   <lastName>Doe</lastName>
   <line1>PO BOX 3940</line1>
   <line2>123</line2>
   <city>Waconia</city>
   <countrySubdivision>MN</countrySubdivision>
   <postalCode>55387</postalCode>
   <country>US</country>
   <countryName>United States</countryName>
   <phoneNumber>555-555-5555</phoneNumber>
</address>
			
					HTTP/1.1 204 No Content
date: Thu, 27 Oct 2016 15:37:06 GMT
x-dr-requestid: dr_request_ID
access-control-allow-origin: *
server: Apache
keep-alive: timeout=5, max=99
x_request_id: TIME=1477582626797:NODE=gcapp01_gcadmsys022002.c022:THREAD=45330
x-server-name: server_name
connection: Keep-Alive
			
					The response body should be empty.
			
					Host: api.digitalriver.com
Accept: application/json
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
Authorization: bearer your_access_token
			
					<address>
   <firstName>John</firstName>
   <lastName>Doe</lastName>
   <line1>PO BOX 3940</line1>
   <line2>123</line2>
   <city>Waconia</city>
   <countrySubdivision>MN</countrySubdivision>
   <postalCode>55387</postalCode>
   <country>US</country>
   <countryName>United States</countryName>
   <phoneNumber>555-555-5556</phoneNumber>
</address>
			
					HTTP/1.1 204 No Content
date: Thu, 27 Oct 2016 15:37:06 GMT
x-dr-requestid: dr_request_ID
access-control-allow-origin: *
server: Apache
keep-alive: timeout=5, max=99
x_request_id: TIME=1477582626797:NODE=gcapp01_gcadmsys022002.c022:THREAD=45330
x-server-name: server_name
connection: Keep-Alive
			
					The response body should be empty.
			

Response Body Parameters

Fields
Data Type
Visibility
Description
address structured default The billing or shipping for the order. See the Addresses API and Fields Used as Keys for more information.
Note: The address also appears in the request body.
billingAddress
link
default
The billing address for the order. See the Addresses API and Fields Used as Keys for more information.
businessEntityCode
string
default
The code for the business entity.
companyName string default The name of the company associated with the addressee.
customAttributes
collection
default
A collection of the custom attributes configured for the cart. Custom attributes are not included with the resource by default. Expanding the customAttributes returns all of the configured attributes for the cart.
id
string
default
The shipping or billing address ID.
sendMail
Boolean
hidden
When true, the shopper wants to receive promotional newsletters.
shippingAddress
link
default
The carts shipping address. See the Addresses API and Fields Used as Keys for more information.
testOrder
Boolean
hidden
When true, the cart is a test order. Visibility must be set to true for non-test orders.
totalItemsInCart
int
default
The total number of line items in the cart.