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

Shoppers

PreviousAccess tokensNextAddresses

Last updated 6 months ago

  • GETGet the current shopper
  • POSTUpdate the current shopper
  • POSTCreate a shopper (Client hosted shopper)
  • POSTCreate a shopper (Digital River hosted shopper)

Get the current shopper

get

Get the current shopper and shopper data. You can get shopper information for both anonymous and authenticated shoppers.

Query parameters
tokenstringOptional

Provide the authorized or anonymous token for a shopper.

ipAddressstringOptional

Provide the shopper's IP address for the current session.

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
409
* Restricted IP address
application/json
get
GET /v1/shoppers/me HTTP/1.1
Host: api.digitalriver.com
Accept: */*
{
  "shopper": {
    "uri": "https://api.digitalriver.com/v1/shoppers/me",
    "id": 489475657389,
    "username": "jswanson@digitalriver.com",
    "firstName": "Automation",
    "lastName": "Tester",
    "emailAddress": "jswanson@digitalriver.com",
    "paymentOptions": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/payment-options"
    },
    "addresses": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/addresses"
    },
    "orders": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/orders"
    },
    "subscriptions": {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/subscriptions"
    }
  }
}

Update the current shopper

post

Updates shopper information for the current shopper. The information you can update depends on the type of access token you are currently using. If you have an anonymous shopper token and are therefore updating an anonymous shopper, you can only update the IP address, locale, and currency. Updating shopper information beyond that requires an authenticated shopper token. You can update all shopper information including username and password for an authenticated shopper.

Query parameters
tokenstringOptional

Provide the authorized or anonymous token for a shopper.

currencystringOptional

Use this query parameter to update the preferred currency in the cart for authenticated and anonymous shoppers.

ipAddressstringOptional

Provide the shopper's IP address for the current session.

localestringOptional

Use this query parameter to update the shopper's preferred locale for authenticated and anonymous shoppers.

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.

applyEmailToSubscriptionsbooleanOptional

When the value for this parameter is true, and you provide the emailAddress in the request body, all active and inactive subscription shipping and billing email addresses will be updated when you update the shopper's subscription billing and shipping email addresses.

Body
Responses
204
No Content
400
* Bad Request
application/json
401
* Invalid Token
application/json
409
* Restricted IP address * Invalid Currency Code * Invalid Locale
application/json
post
POST /v1/shoppers/me HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 229

{
  "shopper": {
    "username": "jswanson@digitalriver.com",
    "firstName": "Automation",
    "lastName": "Tester",
    "emailAddress": "jswanson@digitalriver.com",
    "password": "qwerasdf",
    "locale": "en_US",
    "currency": "USD",
    "sendMail": true,
    "sendEMail": true
  }
}

No content

Create a shopper (Client hosted shopper)

post

Create a Digital River partner maintained shopper.

Query parameters
tokenstringOptional

Provide the authorized or anonymous token for a 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
201
* Created (Empty Response) * Created (With additional information, contact the Digital River team for setup.)
application/json
Responseone of
stringOptionalExample: This will be empty response.
or
or
400
* Bad Request
application/json
401
* Invalid Token
application/json
409
* Restricted IP address * Invalid Currency Code * Invalid Locale
application/json
post
POST /v1/shoppers (Client hosted shopper) HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 208

{
  "shopper": {
    "firstName": "Automation",
    "lastName": "Tester",
    "externalReferenceId": "ABC123456789ABC",
    "emailAddress": "jswanson@digitalriver.com",
    "locale": "en_US",
    "currency": "USD",
    "sendMail": true,
    "sendEMail": true
  }
}
This will be empty response.

Create a shopper (Digital River hosted shopper)

post

Create a Digital River maintained shopper.

Query parameters
tokenstringOptional

Provide the authorized or anonymous token for a 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
201
* Created (Empty Response) * Created (With additional information, contact the Digital River team for setup.)
application/json
Responseone of
stringOptionalExample: This will be empty response.
or
or
400
* Bad Request
application/json
401
* Invalid Token
application/json
409
* Restricted IP address * Invalid Currency Code * Invalid Locale
application/json
post
POST /v1/shoppers (DR hosted shopper) HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 229

{
  "shopper": {
    "username": "jswanson@digitalriver.com",
    "firstName": "Automation",
    "lastName": "Tester",
    "emailAddress": "jswanson@digitalriver.com",
    "password": "qwerasdf",
    "locale": "en_US",
    "currency": "USD",
    "sendMail": true,
    "sendEMail": true
  }
}
This will be empty response.