LogoLogo
Shopper APIs reference
Shopper APIs reference
  • Shopper APIs reference
  • OAuth
    • Tokens
    • Access tokens
  • Shoppers
    • Shoppers
    • Addresses
    • Payment options
  • Browse (product discovery)
    • Categories
    • Products
    • Product variations
    • Pricing
    • Inventory status
    • Financing
    • Offers
    • Purchase plan
    • Find a purchase plan
    • Authorize a purchase plan
  • Cart
    • Apply a shopper to a cart
    • Line items
    • Billing address
    • Shipping address
    • Payment methods
    • Shipping options
    • Web checkout
    • Submit a cart
    • Apply or detach payment methods
    • Apply a shipping option
    • Carts
    • Cart offers
    • API trigger offer
    • Resume cart
    • Third-party subscription engine
    • Tax registration
    • Price override
  • Orders
    • Orders
    • Order lookup
    • Order address
    • Returns
  • Subscriptions
    • Manage a subscription
    • Manage the subscription's renewal plan
    • Immediate midterm change
    • Payment
    • Address
    • Orders
    • Pending actions
    • Retrieve subscriptions
    • Subscription billing and shipping addresses
Powered by GitBook
On this page
  1. Shoppers

Addresses

PreviousShoppersNextPayment options

Last updated 11 months ago

Get an address by ID

get

To get an address by ID, specify the ID of the address in the {id} URI path parameter.

Path parameters
addressIdstringRequired

The address ID.

Query parameters
tokenstringOptional

Provide the authorized token for the shopper.

expandstringOptional

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

Responses
200
Successful response.
application/json
Responseone of
or
401
* Invalid Token
application/json
404
* Not Found
application/json
get
GET /v1/shoppers/me/addresses/{addressId} HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "address": {
    "uri": "https://api.digitalriver.com/v1/shoppers/me/addresses/1234567890",
    "id": 1655007697,
    "nickName": "test",
    "isDefault": "true",
    "firstName": "Jon",
    "lastName": "Doe",
    "line1": "10380 Bren Road West",
    "line2": "text",
    "city": "Minnetonka",
    "countrySubdivision": "MN",
    "postalCode": "55343",
    "country": "US",
    "countryName": "United States",
    "phoneNumber": "952-253-1234",
    "phoneticFirstName": "クリス",
    "phoneticLastName": "ミラー",
    "division": "製品開発"
  }
}

Delete a shoppers address

delete

To delete the shopper's address, specify the of the address ID in the {id} URI path parameter. No warning message appears if you delete the last address linked to the shopper.

Path parameters
addressIdstringRequired

The address ID.

Query parameters
tokenstringOptional

Provide the authorized token for the shopper.

Responses
204
No Content
401
* Invalid Token
application/json
delete
DELETE /v1/shoppers/me/addresses/{addressId} HTTP/1.1
Host: api.digitalriver.com
Accept: */*

No content

Get all shopper addresses

get

Retrieve all addresses configured for a shopper, such as home and work addresses. If you need to access a billing or shipping address, use the methods available in the Carts API.

Query parameters
tokenstringOptional

Provide the authorized token for the shopper.

expandstringOptional

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

Responses
200
Successful response.
application/json
Responseone of
or
401
* Invalid Token
application/json
get
GET /v1/shoppers/me/addresses HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "addresses": {
    "uri": "https://api.digitalriver.com/v1/shoppers/me/addresses",
    "address": [
      {
        "uri": "https://api.digitalriver.com/v1/shoppers/me/addresses/1234567890",
        "nickName": "test",
        "isDefault": "true"
      }
    ]
  }
}
  • GETGet an address by ID
  • DELETEDelete a shoppers address
  • GETGet all shopper addresses
  • POSTCreate or update shopper address

Create or update shopper address

post

Creates or updates a shopper's address. An address entry must have a unique nickname. If a current address has the same nickname specified in the request, that address is updated; otherwise, a new address is created.

Query parameters
tokenstringOptional

Provide the authorized token for the shopper.

expandstringOptional

Use the expand query parameter when you want additional fields to appear in the response. The expand query parameter provides more fields in the response. Expanding resources reduces the number of API calls required to accomplish a task.

fieldsstringOptional

Specify the fields that you want to appear in the response. Filtering the fields returned in the response can conserve bandwidth and accelerate response time.

Body
Responses
204
No Content
401
* Invalid Token
application/json
409
* invalid-state-code * invalid-postal-code
application/json
post
POST /v1/shoppers/me/addresses HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 430

{
  "address": {
    "nickName": "test",
    "isDefault": "true",
    "firstName": "Jon",
    "lastName": "Doe",
    "companyName": "Digital River",
    "line1": "10380 Bren Road West",
    "line2": "text",
    "line3": "text",
    "city": "Minnetonka",
    "countrySubdivision": "MN",
    "postalCode": "55343",
    "country": "US",
    "countryName": "United States",
    "countyName": "Hennepin",
    "phoneNumber": "952-253-1234",
    "phoneticFirstName": "クリス",
    "phoneticLastName": "ミラー",
    "division": "製品開発"
  }
}

No content