Shoppers

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
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": "[email protected]",
    "firstName": "Automation",
    "lastName": "Tester",
    "emailAddress": "[email protected]",
    "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
post
POST /v1/shoppers/me HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 229

{
  "shopper": {
    "username": "[email protected]",
    "firstName": "Automation",
    "lastName": "Tester",
    "emailAddress": "[email protected]",
    "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
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": "[email protected]",
    "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
post
POST /v1/shoppers (DR hosted shopper) HTTP/1.1
Host: api.digitalriver.com
Content-Type: application/json
Accept: */*
Content-Length: 229

{
  "shopper": {
    "username": "[email protected]",
    "firstName": "Automation",
    "lastName": "Tester",
    "emailAddress": "[email protected]",
    "password": "qwerasdf",
    "locale": "en_US",
    "currency": "USD",
    "sendMail": true,
    "sendEMail": true
  }
}
This will be empty response.

Last updated