Fields and expand query parameters
Learn how to use field and expand query parameters.
Fields query parameter
GET /v1/shoppers/me{
"shopper": {
"id": "161784673509",
"username": "jsmith",
"firstname": "John",
"lastname": "Smith",
"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"
},
"_uri": "https://api.digitalriver.com/v1/shoppers/me"
}
}GET /v1/shoppers/me?fields=firstName,lastName{
"shopper": {
"firstname": "John",
"lastname": "Smith",
"_uri": "https://api.digitalriver.com/v1/shoppers/me"
}
}Expand query parameter
GET /v1/shoppers/me?expand=locale,currency1. {
2. "shopper": {
3. "id": "161784673509",
4. "username": "jsmith",
5. "firstname": "John",
6. "lastname": "Smith",
7. "emailaddress": "[email protected]",
8. "locale": "en_US",
9. "currency": "USD",
10. "paymentoptions": {
11. "_uri": "https:// api.digitalriver.com v1/shoppers/me/payment-options"
12. },
13. "addresses": {
14. "_uri": "https://api.digitalriver.com/v1/shoppers/me/addresses"
15. },
16. "orders": {
17. "_uri": "https://api.digitalriver.com/v1/shoppers/me/orders"
18. },
19. "subscriptions": {
20. "_uri": "https://api.digitalriver.com/v1/shoppers/me/subscriptions"
21. },
22. "_uri": "https://api.digitalriver.com/v1/shoppers/me"
23. }
24. }GET /v1/shoppers/me?expand=all1. {
2. "shopper": {
3. "id": "161784673509",
4. "username": "jsmith",
5. "externalreferenceid": "123456",
6. "firstname": "John",
7. "lastname": "Smith",
8. "emailaddress": "[email protected]",
9. "locale": "en_US",
10. "currency": "USD",
11. "sendmail": "false",
12. "sendemail": "true",
13. "paymentoptions": {
14. "paymentoption": {
15. "id": "1695808409",
16. "nickname": "Default",
17. "isdefault": "true",
18. "creditcard": {
19. "expirationmonth": "5",
20. "expirationyear": "2017",
21. "issuecode": {
22. "startmonth": {
23. "startyear": {
24. "displayablenumber": "************1111",
25. "type": "Visa"
26. }
27. }
28. }
29. },
30. "_uri": "https://api.digitalriver.com/v1/shoppers/me/payment-option/1695808409"
32. },
32. "_uri": "https://api.digitalriver.com/v1/shoppers/me/payment-options"
33. },
34. "addresses": {
35. "address": {
36. "id": "2268768209",
37. "nickname": "Office address",
38. "isdefault": "true",
39. "firstname": "John",
40. "lastname": "Smith",
41. "companyname": "Acme Inc.",
42. "line1": "1234 Main Street",
43. "line2": "Suite 1",
44. "line3": "Building D",
45. "city": "Eden Prairie",
46. "countrysubdivision": "MN",
47. "postalcode": "55344-3765",
48. "country": "US",
49. "countryname": "United States",
50. "phonenumber": "952-123-1234",
51. "countyname": "",
52. "_uri": "https://api.digitalriver.com/v1/shoppers/me/address/2268768209"
53. },
54. "_uri": "https://api.digitalriver.com/v1/shoppers/me/addresses"
55. },
56. "orders": {
57. "_uri": "https://api.digitalriver.com/v1/shoppers/me/orders"
58. },
59. "subscriptions": {
60. "_uri": "https://api.digitalriver.com/v1/shoppers/me/subscriptions"
61. },
62. "_uri": "https://api.digitalriver.com/v1/shoppers/me"
63. }
64. }Parameter precedence
Last updated