Orders

An order represents a business transaction between two parties. An order typically consists of a collection of line Items, billing address, and shipping address.

The Orders resource provides access to an authenticated shopper's orders. Use the Orders API to get order details for a shopper.

Important: All methods in this API requires an authenticated (full access) token.

Example order detail page

Get orders

Use this method to retrieve the history of orders for a customer.

URI
Request header
Request body
Response header
Response body
URI
GET shoppers/me/orders?expand=all&pageSize=1
Request header
Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
Request body
The request body should be empty.
Response header
HTTP/1.1 200 OK
Response body
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders",
"order": [
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47276010023",
"id": "47276010023",
"submissionDate": "2018-04-27T18:01:01.000Z",
"displayName": "New Order",
"locale": "en_US",
"optIn": "false",
"testOrder": "false",
"taxExempt": "false",
"businessEntityCode": "DR_INC-ENTITY",
"pricing": {
"subtotal": {
"currency": "USD",
"value": "19.99"
},
"subtotalWithDiscount": {
"currency": "USD",
"value": "19.99"
},
"incentive": {
"currency": "USD",
"value": "19.99"
},
"shipping": {
"currency": "USD",
"value": "19.99"
},
"tax": {
"currency": "USD",
"value": "19.99"
},
"total": {
"currency": "USD",
"value": "19.99"
},
"formattedSubtotal": "$17.99",
"formattedSubtotalWithDiscount": "$12.99",
"formattedIncentive": "$5.00",
"formattedShipping": "$0.00",
"formattedTax": "$0.96",
"formattedTotal": "$13.95"
},
"payment": {
"paymentMethodName": "discover",
"displayableNumber": "************4321",
"expirationMonth": "01",
"expirationYear": "2020",
"customerFirstName": "AUTOMATION",
"customerLastName": "TESTER",
"customerEmail": "automatedtester68091904@digitalriver.com",
"paymentAmount": {
"currency": "USD",
"value": "19.99"
},
"softDescriptor": "DRI*demosft1"
},
"orderState": "Complete",
"orderStateDetails": {
"description": "Not Settled",
"settled": {
"currency": "USD",
"value": "19.99"
},
"refunded": {
"currency": "USD",
"value": "19.99"
}
},
"billingAddress": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/address/47278020023",
"id": "billingAddress",
"firstName": "Automation",
"lastName": "Tester",
"line1": "PO BOX 6930",
"line2": "123",
"line3": "Suite Line 3",
"city": "Waconia",
"countrySubdivision": "MN",
"postalCode": 5387,
"country": "US",
"countryName": "United States",
"phoneNumber": "099-222-44454",
"emailAddress": "automatedTester68091904@digitalriver.com"
},
"shippingAddress": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/address/47278020023",
"id": "billingAddress",
"firstName": "Automation",
"lastName": "Tester",
"line1": "PO BOX 6930",
"line2": "123",
"line3": "Suite Line 3",
"city": "Waconia",
"countrySubdivision": "MN",
"postalCode": 5387,
"country": "US",
"countryName": "United States",
"phoneNumber": "099-222-44454",
"emailAddress": "automatedTester68091904@digitalriver.com"
},
"lineItems": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47278020023/line-items",
"lineItem": [
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47278020023/line-items/488822310023",
"id": "488822310023",
"quantity": "1",
"product": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/64578500",
"parentProduct": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/64358200"
},
"id": "64578500",
"name": "Class I",
"displayName": "Class I",
"shortDescription": "Class I is the perfect GPS waypoint and route manager for the beginning or occasional GPS user.",
"longDescription": "Class I is the fast and easy way to create, edit, and transfer waypoints and routes between your computer and your Garmin, Magellan, or Lowrance GPS. Using Class I, you can manage all of your waypoints and routes, and display them in lists sorted by name, elevation, or distance. Class I connects your GPS to the best mapping and information sites on the Internet, giving you one-click access to street and topo maps, aerial photos, weather forecasts, and nearby attractions.",
"productType": "DOWNLOAD",
"sku": "Class I",
"externalReferenceId": "Test External Reference Number",
"companyId": "demosft1",
"displayableProduct": "true",
"purchasable": "true",
"manufacturerName": "Test Manufacturer Name",
"manufacturerPartNumber": "Test Manufacturer Part Number",
"thumbnailImage": "https://drh-int-ora.img.digitalriver.com/Storefront/Company/demosft1/images/product/thumbnail/classIThumb.jpg",
"productImage": "https://drh-int-ora.img.digitalriver.com/Storefront/Company/demosft1/images/product/detail/classIBox.jpg",
"keywords": "testKeyword",
"customAttributes": {
"attribute": [
{
"name": "name",
"value": "string",
"type": "string"
}
]
}
},
"lineItemState": "Complete",
"lineItemStateDetails": {
"description": "Downloadable - 1",
"backOrdered": "0",
"shipped": "0",
"returned": "0",
"pendingReturn": "0"
},
"pricing": {
"listPrice": {
"currency": "USD",
"value": "19.99"
},
"listPriceWithQuantity": {
"currency": "USD",
"value": "19.99"
},
"salePrice": {
"currency": "USD",
"value": "19.99"
},
"salePriceWithQuantity": {
"currency": "USD",
"value": "19.99"
},
"formattedListPrice": "$19.99",
"formattedListPriceWithQuantity": "$19.99",
"formattedSalePrice": "$17.99",
"formattedSalePriceWithQuantity": "$17.99",
"totalDiscountWithQuantity": {
"currency": "USD",
"value": "19.99"
},
"tax": {
"vatPercentage": 0
"currency": "USD",
"value": 2.00
},
"taxRate": 0.1111
},
"formattedTotalDiscountWithQuantity": "$2.00",
"discountDescription": "10%"
},
"downloads": {
"downloadUri": "http://wgtintot12.digitalriver.com/wgt/9B5A4FCEF11DA80C/171F14235882A3D3E56B5723F9D46513279A35381E6ECCFA38DC305C96D769173E906E98A04A2B5BBA82B10B42A63223B365B18617EBAE466D6993DA22958AFE291C52E8142F3D62B9F021B53460271F0451C577DBEF2976/demosft1/WaterLilies.jpg"
},
"customAttributes": {
"attribute": [
{
"name": "name",
"value": "string",
"type": "string"
}
]
}
}
]
},
"customAttributes": {
"attribute": [
{
"name": "name",
"value": "string",
"type": "string"
}
]
}
}
],
"totalResults": "1",
"totalResultPages": "1"
}

Get order by ID

To retrieve an order, you must specify the order identifier (orderId) and the state of the order. Possible order states are:

  • Open

  • In Process

  • Cancelled

  • Submitted

URI
Request header
Request body
Response header
Response body
URI
GET shoppers/me/orders/9999999999
Request header
Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
Request body
The request body should be empty.
Response header
HTTP/1.1 200 OK
Response body
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47276010023",
"id": "47276010023",
"submissionDate": "2018-04-27T18:01:01.000Z",
"displayName": "New Order",
"locale": "en_US",
"optIn": "false",
"testOrder": "false",
"taxExempt": "false",
"businessEntityCode": "DR_INC-ENTITY",
"pricing": {
"subtotal": {
"currency": "USD",
"value": "19.99"
},
"subtotalWithDiscount": {
"currency": "USD",
"value": "19.99"
},
"incentive": {
"currency": "USD",
"value": "19.99"
},
"shipping": {
"currency": "USD",
"value": "19.99"
},
"tax": {
"currency": "USD",
"value": "19.99"
},
"total": {
"currency": "USD",
"value": "19.99"
},
"formattedSubtotal": "$17.99",
"formattedSubtotalWithDiscount": "$12.99",
"formattedIncentive": "$5.00",
"formattedShipping": "$0.00",
"formattedTax": "$0.96",
"formattedTotal": "$13.95"
},
"payment": {
"paymentMethodName": "discover",
"displayableNumber": "************4321",
"expirationMonth": "01",
"expirationYear": "2020",
"customerFirstName": "AUTOMATION",
"customerLastName": "TESTER",
"customerEmail": "automatedtester68091904@digitalriver.com",
"paymentAmount": {
"currency": "USD",
"value": "19.99"
},
"softDescriptor": "DRI*demosft1"
},
"orderState": "Complete",
"orderStateDetails": {
"description": "Not Settled",
"settled": {
"currency": "USD",
"value": "19.99"
},
"refunded": {
"currency": "USD",
"value": "19.99"
}
},
"billingAddress": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/address/47278020023",
"id": "billingAddress",
"firstName": "Automation",
"lastName": "Tester",
"line1": "PO BOX 6930",
"line2": "123",
"line3": "Suite Line 3",
"city": "Waconia",
"countrySubdivision": "MN",
"postalCode": 5387,
"country": "US",
"countryName": "United States",
"phoneNumber": "099-222-44454",
"emailAddress": "automatedTester68091904@digitalriver.com"
},
"shippingAddress": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/address/47278020023",
"id": "billingAddress",
"firstName": "Automation",
"lastName": "Tester",
"line1": "PO BOX 6930",
"line2": "123",
"line3": "Suite Line 3",
"city": "Waconia",
"countrySubdivision": "MN",
"postalCode": 5387,
"country": "US",
"countryName": "United States",
"phoneNumber": "099-222-44454",
"emailAddress": "automatedTester68091904@digitalriver.com"
},
"lineItems": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47278020023/line-items",
"lineItem": [
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47278020023/line-items/488822310023",
"id": "488822310023",
"quantity": "1",
"product": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/64578500",
"parentProduct": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/64358200"
},
"id": "64578500",
"name": "Class I",
"displayName": "Class I",
"shortDescription": "Class I is the perfect GPS waypoint and route manager for the beginning or occasional GPS user.",
"longDescription": "Class I is the fast and easy way to create, edit, and transfer waypoints and routes between your computer and your Garmin, Magellan, or Lowrance GPS. Using Class I, you can manage all of your waypoints and routes, and display them in lists sorted by name, elevation, or distance. Class I connects your GPS to the best mapping and information sites on the Internet, giving you one-click access to street and topo maps, aerial photos, weather forecasts, and nearby attractions.",
"productType": "DOWNLOAD",
"sku": "Class I",
"externalReferenceId": "Test External Reference Number",
"companyId": "demosft1",
"displayableProduct": "true",
"purchasable": "true",
"manufacturerName": "Test Manufacturer Name",
"manufacturerPartNumber": "Test Manufacturer Part Number",
"thumbnailImage": "https://drh-int-ora.img.digitalriver.com/Storefront/Company/demosft1/images/product/thumbnail/classIThumb.jpg",
"productImage": "https://drh-int-ora.img.digitalriver.com/Storefront/Company/demosft1/images/product/detail/classIBox.jpg",
"keywords": "testKeyword",
"customAttributes": {
"attribute": [
{
"name": "name",
"value": "string",
"type": "string"
}
]
}
},
"lineItemState": "Complete",
"lineItemStateDetails": {
"description": "Downloadable - 1",
"backOrdered": "0",
"shipped": "0",
"returned": "0",
"pendingReturn": "0"
},
"pricing": {
"listPrice": {
"currency": "USD",
"value": "19.99"
},
"listPriceWithQuantity": {
"currency": "USD",
"value": "19.99"
},
"salePrice": {
"currency": "USD",
"value": "19.99"
},
"salePriceWithQuantity": {
"currency": "USD",
"value": "19.99"
},
"formattedListPrice": "$19.99",
"formattedListPriceWithQuantity": "$19.99",
"formattedSalePrice": "$17.99",
"formattedSalePriceWithQuantity": "$17.99",
"totalDiscountWithQuantity": {
"currency": "USD",
"value": "19.99"
},
"tax": {
"vatPercentage": 0
"currency": "USD",
"value": 2.00
},
"taxRate": 0.1111
},
"discountDescription": "string",
"msrpPrice": {
"value": 0,
"formattedValue": "string"
},
"formattedTotalDiscountWithQuantity": "$2.00",
"discountDescription": "10%"
},
"downloads": {
"downloadUri": "http://wgtintot12.digitalriver.com/wgt/9B5A4FCEF11DA80C/171F14235882A3D3E56B5723F9D46513279A35381E6ECCFA38DC305C96D769173E906E98A04A2B5BBA82B10B42A63223B365B18617EBAE466D6993DA22958AFE291C52E8142F3D62B9F021B53460271F0451C577DBEF2976/demosft1/WaterLilies.jpg"
},
"customAttributes": {
"attribute": [
{
"name": "name",
"value": "string",
"type": "string"
}
]
}
}
]
},
"customAttributes": {
"attribute": [
{
"name": "name",
"value": "string",
"type": "string"
}
]
}
}

Retrieve order addresses

It's possible to retrieve the shipping and billing addresses for an order with the Orders resource.

To retrieve a billing address, use the GET /shoppers/me/orders/orderId/billing-address resource.

URI
Request header
Request body
Response header
Response body
URI
GET shoppers/me/orders/9999999999/billing-address
Request header
Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
Request body
The request body should be empty.
Response header
HTTP/1.1 200 OK
Response body
{"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"
}}

To retrieve a shipping address, use the GET /shoppers/me/orders/orderId/shipping-address resource.

URI
Request header
Request body
Response header
Response body
URI
GET shoppers/me/orders/9999999999/shipping-address
Request header
Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
Request body
The request body should be empty.
Response header
HTTP/1.1 200 OK
Response body
{"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"
}}

Retrieve order line items

You can retrieve all line items or specific line items from an order using the Orders resource.

To retrieve all line items, use the GET /shoppers/me/orders/orderId/line-items resource.

URI
Request header
Request body
Response header
Response body
URI
GET shoppers/me/orders/9999999999/line-items
Request header
Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
Request body
The request body should be empty.
Response header
HTTP/1.1 200 OK
Response body
{"lineItem": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/line-items/1111111111",
"id": 1111111111,
"quantity": 1,
"product": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/product_ID",
"id": product_ID,
"name": "Class III",
"displayName": "Class III",
"shortDescription": "Class III adds the ability to export waypoints, routes, and tracks from your GPS device. With Class II, all GPS data is converted to .shp, .shx, and .dbf files for further use in a GIS environment.",
"longDescription": "Class III adds the ability to transfer waypoints, routes, and tracks between GPS devices. With Class II, all GPS data can be saved as .shp, .shx, and .dbf files for further use in a GIS environment. In addition, Class III can import shapefiles and convert attributes from the .dbf file into waypoint names and comments. Shapefile import currently supports geometric projection (lat/lon) only.",
"productType": "DOWNLOAD",
"sku": "Class III",
"externalReferenceId": "GPS-XFSD",
"companyId": "demosft1",
"displayableProduct": "true",
"purchasable": "true",
"manufacturerName": null,
"manufacturerPartNumber": null,
"thumbnailImage": "https://domain_ID.digitalriver.com/path/images/product/thumbnail/classIIIThumb_v2.jpg",
"productImage": "https://domain_ID.digitalriver.com/path/images/product/detail/classIIIBox_v2.jpg",
"keywords": null,
"customAttributes": {"attribute": [
{
"name": "applicationFiles",
"type": "List",
"value": "[]"
},
{
"name": "numberOfDownloads",
"type": "Integer",
"value": "5"
},
{
"name": "gameRating",
"type": "String",
"value": "Adults Only"
},
{
"name": "downloadDisplayName",
"type": "String",
"value": "WaterLilies.jpg"
},
{
"name": "eula",
"type": "String",
"value": "Adipiscing, dolore amet magna feugait eum ea, nisl, wisi suscipit lobortis zzril, quis nulla et blandit. Diam dignissim, ex vulputate ullamcorper dolore qui, in, ut. Sit accumsan minim, nulla suscipit magna wisi eros volutpat, vulputate vero eum elit iriure. Ex, iusto duis dolore, ea praesent et vulputate vel ut molestie, lorem tincidunt augue consequat duis vel nulla nostrud exerci, blandit enim duis vero tation in. Facilisis eu in esse molestie nostrud consectetuer suscipit duis at wisi illum nostrud tincidunt vero nulla dolore."
},
{
"name": "downloadDisplayNames",
"type": "List",
"value": "[]"
},
{
"name": "fileSizes",
"type": "List",
"value": "[]"
},
{
"name": "platform",
"type": "String",
"value": "1 User License"
},
{
"name": "applicationFile",
"type": "String",
"value": "WaterLilies.jpg"
},
{
"name": "numberOfIPAddresses",
"type": "Integer",
"value": "10"
},
{
"name": "systemRequirements",
"type": "String",
"value": "Exerci ad nisl commodo esse facilisis consequat in vel laoreet vel tation praesent molestie zzril, ut. At accumsan, ex autem illum volutpat eu veniam enim eu eu, nisl augue suscipit dolore aliquam iusto. Et te dolor ut ad magna tation quis at at augue dolore, aliquip lorem wisi, hendrerit praesent facilisi consectetuer commodo nostrud ut blandit odio et. Eum qui velit odio lobortis vel autem ad consequat lorem praesent facilisis dolore et eros, aliquip aliquip, velit, vel, praesent, ex. Vel, dolor nostrud eu vel delenit et eu qui et commodo dolore consequat ut augue duis."
},
{
"name": "fileSize",
"type": "Integer",
"value": "82"
},
{
"name": "downloadType",
"type": "String",
"value": "HTTP"
},
{
"name": "downloadAdapter",
"type": "String",
"value": "com.digitalriver.downloads.adapters.DRHDownloadAdapter"
}
]}
},
"lineItemState": "Complete",
"lineItemStateDetails": {
"description": "Downloadable - 1,Pending Refund - 1",
"backOrdered": 0,
"shipped": 0,
"returned": 0,
"pendingReturn": 1
},
"pricing": {
"listPrice": {
"currency": "USD",
"value": 39.99
},
"listPriceWithQuantity": {
"currency": "USD",
"value": 39.99
},
"salePriceWithQuantity": {
"currency": "USD",
"value": 39.99
},
"formattedListPrice": "$39.99",
"formattedListPriceWithQuantity": "$39.99",
"formattedSalePriceWithQuantity": "$39.99"
},
"downloads": {"downloadUri": ["http://domain_ID.digitalriver.com/path/WaterLilies.jpg"]},
"digitalRights": {"serialNumber": serial_number}
}}</span>
{"lineItem": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/line-items/1111111111",
"id": 1111111111,
"quantity": 1,
"product": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/product_ID",
"id": product_ID,
"name": "Class III",
"displayName": "Class III",
"shortDescription": "Class III adds the ability to export waypoints, routes, and tracks from your GPS device. With Class II, all GPS data is converted to .shp, .shx, and .dbf files for further use in a GIS environment.",
"longDescription": "Class III adds the ability to transfer waypoints, routes, and tracks between GPS devices. With Class II, all GPS data can be saved as .shp, .shx, and .dbf files for further use in a GIS environment. In addition, Class III can import shapefiles and convert attributes from the .dbf file into waypoint names and comments. Shapefile import currently supports geometric projection (lat/lon) only.",
"productType": "DOWNLOAD",
"sku": "Class III",
"externalReferenceId": "GPS-XFSD",
"companyId": "demosft1",
"displayableProduct": "true",
"purchasable": "true",
"manufacturerName": null,
"manufacturerPartNumber": null,
"thumbnailImage": "https://domain_ID.digitalriver.com/path/images/product/thumbnail/classIIIThumb_v2.jpg",
"productImage": "https://domain_ID.digitalriver.com/path/images/product/detail/classIIIBox_v2.jpg",
"keywords": null,
"customAttributes": {"attribute": [
{
"name": "applicationFiles",
"type": "List",
"value": "[]"
},
{
"name": "numberOfDownloads",
"type": "Integer",
"value": "5"
},
{
"name": "gameRating",
"type": "String",
"value": "Adults Only"
},
{
"name": "downloadDisplayName",
"type": "String",
"value": "WaterLilies.jpg"
},
{
"name": "eula",
"type": "String",
"value": "Adipiscing, dolore amet magna feugait eum ea, nisl, wisi suscipit lobortis zzril, quis nulla et blandit. Diam dignissim, ex vulputate ullamcorper dolore qui, in, ut. Sit accumsan minim, nulla suscipit magna wisi eros volutpat, vulputate vero eum elit iriure. Ex, iusto duis dolore, ea praesent et vulputate vel ut molestie, lorem tincidunt augue consequat duis vel nulla nostrud exerci, blandit enim duis vero tation in. Facilisis eu in esse molestie nostrud consectetuer suscipit duis at wisi illum nostrud tincidunt vero nulla dolore."
},
{
"name": "downloadDisplayNames",
"type": "List",
"value": "[]"
},
{
"name": "fileSizes",
"type": "List",
"value": "[]"
},
{
"name": "platform",
"type": "String",
"value": "1 User License"
},
{
"name": "applicationFile",
"type": "String",
"value": "WaterLilies.jpg"
},
{
"name": "numberOfIPAddresses",
"type": "Integer",
"value": "10"
},
{
"name": "systemRequirements",
"type": "String",
"value": "Exerci ad nisl commodo esse facilisis consequat in vel laoreet vel tation praesent molestie zzril, ut. At accumsan, ex autem illum volutpat eu veniam enim eu eu, nisl augue suscipit dolore aliquam iusto. Et te dolor ut ad magna tation quis at at augue dolore, aliquip lorem wisi, hendrerit praesent facilisi consectetuer commodo nostrud ut blandit odio et. Eum qui velit odio lobortis vel autem ad consequat lorem praesent facilisis dolore et eros, aliquip aliquip, velit, vel, praesent, ex. Vel, dolor nostrud eu vel delenit et eu qui et commodo dolore consequat ut augue duis."
},
{
"name": "fileSize",
"type": "Integer",
"value": "82"
},
{
"name": "downloadType",
"type": "String",
"value": "HTTP"
},
{
"name": "downloadAdapter",
"type": "String",
"value": "com.digitalriver.downloads.adapters.DRHDownloadAdapter"
}
]}
},
"lineItemState": "Complete",
"lineItemStateDetails": {
"description": "Downloadable - 1,Pending Refund - 1",
"backOrdered": 0,
"shipped": 0,
"returned": 0,
"pendingReturn": 1
},
"pricing": {
"listPrice": {
"currency": "USD",
"value": 39.99
},
"listPriceWithQuantity": {
"currency": "USD",
"value": 39.99
},
"salePriceWithQuantity": {
"currency": "USD",
"value": 39.99
},
"formattedListPrice": "$39.99",
"formattedListPriceWithQuantity": "$39.99",
"formattedSalePriceWithQuantity": "$39.99"
},
"downloads": {"downloadUri": ["http://domain_ID.digitalriver.com/path/WaterLilies.jpg"]},
"digitalRights": {"serialNumber": serial_number}
}}

To retrieve a specific line item, use the GET /shoppers/me/orders/orderId/line-items/lineItemId resource. The second URI path parameter (lineItemId) specifies the line-item ID.

URI
Request header
Request body
Response header
Response body
URI
GET shoppers/me/orders/9999999999/line-items/1111111111?expand=all
Request header
Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
Request body
The request body should be empty.
Response header
HTTP/1.1 200 OK
Response body
{"lineItem": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/line-items/1111111111",
"id": 1111111111,
"quantity": 1,
"product": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/product_ID",
"id": product_ID,
"name": "Class III",
"displayName": "Class III",
"shortDescription": "Class III adds the ability to export waypoints, routes, and tracks from your GPS device. With Class II, all GPS data is converted to .shp, .shx, and .dbf files for further use in a GIS environment.",
"longDescription": "Class III adds the ability to transfer waypoints, routes, and tracks between GPS devices. With Class II, all GPS data can be saved as .shp, .shx, and .dbf files for further use in a GIS environment. In addition, Class III can import shapefiles and convert attributes from the .dbf file into waypoint names and comments. Shapefile import currently supports geometric projection (lat/lon) only.",
"productType": "DOWNLOAD",
"sku": "Class III",
"externalReferenceId": "GPS-XFSD",
"companyId": "demosft1",
"displayableProduct": "true",
"purchasable": "true",
"manufacturerName": null,
"manufacturerPartNumber": null,
"thumbnailImage": "https://domain_ID.digitalriver.com/path/images/product/thumbnail/classIIIThumb_v2.jpg",
"productImage": "https://domain_ID.digitalriver.com/path/images/product/detail/classIIIBox_v2.jpg",
"keywords": null,
"customAttributes": {"attribute": [
{
"name": "applicationFiles",
"type": "List",
"value": "[]"
},
{
"name": "numberOfDownloads",
"type": "Integer",
"value": "5"
},
{
"name": "gameRating",
"type": "String",
"value": "Adults Only"
},
{
"name": "downloadDisplayName",
"type": "String",
"value": "WaterLilies.jpg"
},
{
"name": "eula",
"type": "String",
"value": "Adipiscing, dolore amet magna feugait eum ea, nisl, wisi suscipit lobortis zzril, quis nulla et blandit. Diam dignissim, ex vulputate ullamcorper dolore qui, in, ut. Sit accumsan minim, nulla suscipit magna wisi eros volutpat, vulputate vero eum elit iriure. Ex, iusto duis dolore, ea praesent et vulputate vel ut molestie, lorem tincidunt augue consequat duis vel nulla nostrud exerci, blandit enim duis vero tation in. Facilisis eu in esse molestie nostrud consectetuer suscipit duis at wisi illum nostrud tincidunt vero nulla dolore."
},
{
"name": "downloadDisplayNames",
"type": "List",
"value": "[]"
},
{
"name": "fileSizes",
"type": "List",
"value": "[]"
},
{
"name": "platform",
"type": "String",
"value": "1 User License"
},
{
"name": "applicationFile",
"type": "String",
"value": "WaterLilies.jpg"
},
{
"name": "numberOfIPAddresses",
"type": "Integer",
"value": "10"
},
{
"name": "systemRequirements",
"type": "String",
"value": "Exerci ad nisl commodo esse facilisis consequat in vel laoreet vel tation praesent molestie zzril, ut. At accumsan, ex autem illum volutpat eu veniam enim eu eu, nisl augue suscipit dolore aliquam iusto. Et te dolor ut ad magna tation quis at at augue dolore, aliquip lorem wisi, hendrerit praesent facilisi consectetuer commodo nostrud ut blandit odio et. Eum qui velit odio lobortis vel autem ad consequat lorem praesent facilisis dolore et eros, aliquip aliquip, velit, vel, praesent, ex. Vel, dolor nostrud eu vel delenit et eu qui et commodo dolore consequat ut augue duis."
},
{
"name": "fileSize",
"type": "Integer",
"value": "82"
},
{
"name": "downloadType",
"type": "String",
"value": "HTTP"
},
{
"name": "downloadAdapter",
"type": "String",
"value": "com.digitalriver.downloads.adapters.DRHDownloadAdapter"
}
]}
},
"lineItemState": "Complete",
"lineItemStateDetails": {
"description": "Downloadable - 1,Pending Refund - 1",
"backOrdered": 0,
"shipped": 0,
"returned": 0,
"pendingReturn": 1
},
"pricing": {
"listPrice": {
"currency": "USD",
"value": 39.99
},
"listPriceWithQuantity": {
"currency": "USD",
"value": 39.99
},
"salePriceWithQuantity": {
"currency": "USD",
"value": 39.99
},
"formattedListPrice": "$39.99",
"formattedListPriceWithQuantity": "$39.99",
"formattedSalePriceWithQuantity": "$39.99"
},
"downloads": {"downloadUri": ["http://domain_ID.digitalriver.com/path/WaterLilies.jpg"]},
"digitalRights": {"serialNumber": serial_number}
}}

Returns

You can also retrieve returns for a specific order, as well as process a return for one or more line items in an order.

To retrieve a return for a specified order:

URI
Request header
Request body
Reqponse header
Response body
URI
GET /shoppers/me/orders/9999999999/returns
Request header
Authorization: bearer your_access_token
Accept:application/json
Request body
The request body should be empty.
Reqponse header
HTTP/1.1 200 OK
Response body
{
"returns": {
"return": [
{
"id": 9999999999,
"reason": "PHONE_ORDER_ERROR",
"comments": "hello change it",
"type": "LineItemLevelReturnProduct",
"status": "PendingProductReturn",
"generationDate": "2016-10-17T15:00:24.000Z",
"generatedBy": "aianand",
"origin": "CUSTOMER_SERVICE",
"policy": "LOD",
"dateRefunded": "In Process",
"refundTotal": {
"currency": "USD",
"value": 0
},
"formattedRefundTotal": "0.00$",
"outstandingTotal": {
"currency": "USD",
"value": 19.14
},
"formattedOutstandingTotal": "19.14$",
"requestedTotal": {
"currency": "USD",
"value": 19.14
},
"formattedRequestedTotal": "19.14$",
"returnLineItems": {
"returnLineItem": [
{
"dueDate": "2016-10-25T04:59:59.000Z",
"offerId": 464443297,
"offerDiscount": "10%",
"expectedQty": 1,
"returnedQty": 0,
"type": "Download",
"notes": "LOD_OPEN2016-10-25T04:59:59.000Z",
"date": "2016-10-17T15:00:25.000Z",
"status": "PendingProductReturn",
"returnLITotal": {
"currency": "USD",
"value": 9.57
},
"formattedReturnLITotal": "9.57$",
"lineItem": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/order_ID/line-items/lin_item_ID"
}
},
{
"dueDate": "2016-10-25T04:59:59.000Z",
"offerId": offer_ID,
"offerDiscount": "10%",
"expectedQty": 1,
"returnedQty": 0,
"type": "Download",
"notes": "LOD_OPEN2016-10-25T04:59:59.000Z",
"date": "2016-10-17T15:00:25.000Z",
"status": "PendingProductReturn",
"returnLITotal": {
"currency": "USD",
"value": 9.57
},
"formattedReturnLITotal": "9.57$",
"lineItem": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/order_ID/line-items/line_item_ID"
}
}
]
}
}
]
}
}

To request the return of one or more line items in a specific order:

URI
Request header
Request body
Response header
Response body
URI
POST /shoppers/me/orders/9999999999/returns
Request header
Authorization: bearer your_access_token
Accept:application/json
Request body
{
"return" : {
"reason":"Duplicate Order",
"comments":"Duplicate Order",
"acceptELOD":"true",
"returnLineItems":
{
"returnLineItem":
[
{
"lineItemQuantityIDs": [1,3,4]
"lineItem":
{
"id":"your_line_item_ID",
"quantity": 3,
}
},
{
"lineItemQuantityIDs": [1]
"lineItem":
{
"id":"your_line_item_ID",
"quantity": 1
}
}
]
}
}
}
Response header
HTTP/1.1 200 OK
Response body
{
"returns": {
"return": [
{
"id": <return_ID>,
"reason": "PHONE_ORDER_ERROR",
"comments": "hello change it",
"type": "LineItemLevelReturnProduct",
"status": "PendingProductReturn",
"generationDate": "2016-10-17T15:00:24.000Z",
"generatedBy": "aianand",
"origin": "CUSTOMER_SERVICE",
"policy": "LOD",
"dateRefunded": "In Process",
"refundTotal": {
"currency": "USD",
"value": 0
},
"formattedRefundTotal": "0.00$",
"outstandingTotal": {
"currency": "USD",
"value": 19.14
},
"formattedOutstandingTotal": "19.14$",
"requestedTotal": {
"currency": "USD",
"value": 19.14
},
"formattedRequestedTotal": "19.14$",
"returnLineItems": {
"returnLineItem": [
{
"dueDate": "2016-10-25T04:59:59.000Z",
"offerId": <offer_ID>,
"offerDiscount": "10%",
"expectedQty": 1,
"returnedQty": 0,
"type": "Download",
"notes": "LOD_OPEN2016-10-25T04:59:59.000Z",
"date": "2016-10-17T15:00:25.000Z",
"status": "PendingProductReturn",
"returnLITotal": {
"currency": "USD",
"value": 9.57
},
}
"formattedReturnLITotal": "9.57$",
"substitutionProduct":"substitution_product_ID",
"lineItem": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/order_ID/line-items/line_item_ID"
"digitalRights":{
"digitalRight":[
{
"lineItemQuantityId":"1",
"content":"ABC",
"type":"SERIAL_NUMBER"
},
{
"lineItemQuantityId":"1",
"content":"CBA",
"type":"SERIAL_NUMBER"
}
]
}
},
{
"dueDate": "2016-10-25T04:59:59.000Z",
"offerId": 464443297,
"offerDiscount": "10%",
"expectedQty": 1,
"returnedQty": 0,
"type": "Download",
"notes": "LOD_OPEN2016-10-25T04:59:59.000Z",
"date": "2016-10-17T15:00:25.000Z",
"status": "PendingProductReturn",
"returnLITotal": {
"currency": "USD",
"value": 9.57
},
"formattedReturnLITotal": "9.57$",
"substitutionProduct":"substitution_ID",
"lineItem": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/order_ID/line-items/line_item_ID"
}
"digitalRights":{
"digitalRight":[
{
"lineItemQuantityId":"1",
"content":"ABC",
"type":"SERIAL_NUMBER"
},
{
"lineItemQuantityId":"1",
"content":"CBA",
"type":"SERIAL_NUMBER"
}
]
}
}
]
}
}
]
}
}