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 API provides access to an authenticated shopper's orders. Use the Orders API to get a specific order or all orders.

Resource URIs

All methods in this resource require a full access token.

Methods


					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{"orders": {
   "uri": "https://api.digitalriver.com/v1/shoppers/me/orders",
   "nextPage":    {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/orders?pageNumber=2&pageSize=1",
   },
   "order": [   {
      "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/order_ID",
      "id": order_ID,
      "submissionDate": "2012-12-05T17:16:00.000Z",
      "displayName": "New Order",
      "locale": "en_US",
      "optIn": "false",
      "testOrder": "true",
      "taxExempt": "false",
      "businessEntityCode": "DR_INC-ENTITY",
      "pricing":       {
         "subtotal":          {
            "currency": "USD",
            "value": 17.99
         },
         "subtotalWithDiscount":          {
            "currency": "USD",
            "value": 17.99
         },
         "incentive":          {
            "currency": "USD",
            "value": 0
         },
         "shipping":          {
            "currency": "USD",
            "value": 0
         },
         "tax":          {
            "currency": "USD",
            "value": 0
         },
         "total":          {
            "currency": "USD",
            "value": 17.99
         },
         "formattedSubtotal": "$17.99",
         "formattedSubtotalWithDiscount": "$17.99",
         "formattedIncentive": "$0.00",
         "formattedShipping": "$0.00",
         "formattedTax": "$0.00",
         "formattedTotal": "$17.99"
      },
      "payment":       {
         "paymentMethodName": "visa",
         "expirationMonth": "5",
         "expirationYear": "2017",
         "customerFirstName": "John",
         "customerLastName": "Doe",
         "paymentAmount":          {
            "currency": "USD",
            "value": 17.99
         },
         "softDescriptor": "DRI*demosft1"
      },
      "orderState": "Complete",
      "orderStateDetails":       {
         "description": "Test",
         "settled":          {
            "currency": "USD",
            "value": 0
         },
         "refunded":          {
            "currency": "USD",
            "value": 0
         }
      },
      "billingAddress":       {
         "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/12795231542/billing-address",
         "id": "billingAddress",
         "firstName": "John",
         "lastName": "Doe",
         "companyName": "Digital River",
         "line1": "9625 West 76th St",
         "line2": "Ste 1",
         "line3": "test",
         "city": "Eden Prairie",
         "countrySubdivision": "MN",
         "postalCode": "55344-3765",
         "country": "US",
         "countryName": "United States",
         "phoneNumber": "555-555-5555 x555"
      },
      "shippingAddress":       {
         "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/12795231542/shipping-address",
         "id": "shippingAddress",
         "firstName": "John",
         "lastName": "Doe",
         "companyName": "Digital River",
         "line1": "9625 West 76th St",
         "line2": "Ste 1",
         "line3": "test",
         "city": "Eden Prairie",
         "countrySubdivision": "MN",
         "postalCode": "55344-3765",
         "country": "US",
         "countryName": "United States",
         "phoneNumber": "555-555-555 x555"
      },
      "lineItems":       {
         "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/order_ID/line-items",
         "lineItem": [         {
            "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/order_ID/line-items/line_item_ID",
            "id": 13008474442,
            "quantity": 1,
            "product":             {
               "uri": "https://api.digitalriver.com/v1/shoppers/me/products/product_ID",
               "parentProduct":                {
                  "uri": "https://api.digitalriver.com/v1/shoppers/me/products/product_ID",
               },
               "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-sys-ora.img.digitalriver.com/Storefront/Company/demosft1/images/product/thumbnail/classIThumb.jpg",
               "productImage": "https://drh-sys-ora.img.digitalriver.com/Storefront/Company/demosft1/images/product/detail/classIBox.jpg",
               "keywords": "Test",
               "customAttributes": {"attribute":                [
                                    {
                     "name": "numberOfDownloads",
                     "type": "Integer",
                     "value": "5"
                  },
                                    {
                     "name": "gameRating",
                     "type": "String",
                     "value": "Adults Only"
                  },
                                    {
                     "name": "originalIsOrderable",
                     "type": "Boolean",
                     "value": "true"
                  },
                                    {
                     "name": "downloadDisplayed",
                     "type": "Boolean",
                     "value": "true"
                  },
                                    {
                     "name": "downloadDisplayName",
                     "type": "String",
                     "value": "WaterLilies.jpg"
                  },
                                    {
                     "name": "downloadDisplayNames",
                     "type": "List",
                     "value": "[]"
                  },
                                    {
                     "name": "eula",
                     "type": "String",
                     "value": "test"
                  },
                                    {
                     "name": "applicationFile",
                     "type": "String",
                     "value": "WaterLilies.jpg"
                  },
                                    {
                     "name": "numberOfIPAddresses",
                     "type": "Integer",
                     "value": "10"
                  },
                                    {
                     "name": "platform",
                     "type": "String",
                     "value": "1 User License"
                  },
                                    {
                     "name": "timeFrame",
                     "type": "Integer",
                     "value": "30"
                  },
                                    {
                     "name": "fileSize",
                     "type": "Integer",
                     "value": "82"
                  },
                                    {
                     "name": "downloadType",
                     "type": "String",
                     "value": "HTTP"
                  },
                                    {
                     "name": "fileSizeValidatedDate",
                     "type": "Date",
                     "value": "Tue Sep 25 11:00:19 CDT 2007"
                  },
                                    {
                     "name": "fileOnBackupMedia",
                     "type": "Boolean",
                     "value": "true"
                  },
                                    {
                     "name": "originalIsViewable",
                     "type": "Boolean",
                     "value": "true"
                  },
                                    {
                     "name": "downloadAdapter",
                     "type": "String",
                     "value": "com.digitalriver.downloads.adapters.DRHDownloadAdapter"
                  }
               ]}
            },
            "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": 17.99
               },
               "salePriceWithQuantity":                {
                  "currency": "USD",
                  "value": 17.99
               },
               "formattedListPrice": "$19.99",
               "formattedListPriceWithQuantity": "$19.99",
               "formattedSalePrice": "$17.99",
               "formattedSalePriceWithQuantity": "$17.99",
               "totalDiscountWithQuantity":                {
                  "currency": "USD",
                  "value": 2
               },
               "formattedTotalDiscountWithQuantity": "$2.00",
               "discountDescription": "10%"
            },
            "downloads": {"downloadUri": ["http://domain_ID.digitalriver.com/path/WaterLilies.jpg"]},
            "digitalRights": {},
            "customAttributes": {}
         }]
      },
      "customAttributes": {"attribute":       [
                  {
            "name": "supressOrderConfirmationEmail",
            "type": "string",
            "value": "true"
         },
                  {
            "name": "SELECTED_BILLING_ADDRESS_BOOK_ENTRY",
            "type": "string",
            "value": "1041251208"
         },
                  {
            "name": "orderGeneratedByFlag",
            "type": "string",
            "value": "systemGenerated"
         },
                  {
            "name": "SELECTED_SHIPPING_ADDRESS_BOOK_ENTRY",
            "type": "string",
            "value": "1041251208"
         }
      ]}
   }],
   "totalResults": 36,
   "totalResultPages": 36
}}
			
					Host: api.digitalriver.com
Accept: application/json
Authorization: bearer your_access_token
User-Agent: Apache-HttpClient/4.5.2 (Java/1.8.0_102)
			
					The request body should be empty.
			
					HTTP/1.1 200 OK
			
					{
    "order": {
        "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999",
        "id": 9999999999,
        "submissionDate": "2012-03-28T15:56:43.000Z",
        "displayName": "New Order",
        "businessEntityCode": "DR_INC-ENTITY",
        "pricing": {
            "subtotal": {
                "currency": "USD",
                "value": 39.99
            },
            "subtotalWithDiscount": {
                "currency": "USD",
                "value": 39.99
            },
            "incentive": {
                "currency": "USD",
                "value": 0
            },
            "shipping": {
                "currency": "USD",
                "value": 0
            },
            "tax": {
                "currency": "USD",
                "value": 2.91
            },
            "total": {
                "currency": "USD",
                "value": 42.9
            },
            "formattedSubtotal": "$39.99",
            "formattedSubtotalWithDiscount": "$39.99",
            "formattedIncentive": "$0.00",
            "formattedShipping": "$0.00",
            "formattedTax": "$2.91",
            "formattedTotal": "$42.90"
        },
        "payment": {
            "paymentMethodName": "visa",
            "expirationMonth": "5",
            "expirationYear": "2017",
            "customerFirstName": "Automation",
            "customerLastName": "Tester",
            "paymentAmount": {
                "currency": "USD",
                "value": 42.9
            },
            "softDescriptor": "DRI*demosft1"
        },
        "orderState": "Complete",
        "billingAddress": {
            "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/billing-address",
        },
        "shippingAddress": {
            "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/shipping-address",
        },
        "lineItems": {
            "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/line-items",
            "lineItem": [
                {
                    "uri": "https://api.digitalriver.com/v1/shoppers/me/orders/9999999999/line-items/line_item_ID",
                    "id": 12481883100,
                    "quantity": 1,
                    "product": {
                        "uri": "https://api.digitalriver.com/v1/shoppers/me/products/product_ID",
                        "displayName": "Class III",
                        "thumbnailImage": "https://drh-sys-ora.img.digitalriver.com/Storefront/Company/demosft1/images/product/thumbnail/classIIIThumb_v2.jpg"
                    },
                    "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",
                        "digitalRight": [
                            {
                                "id": "digital_right_ID",
                                "lineItemQuantityId": 1,
                                "content": "1234567890",
                                "externalReferenceId": null,
                                "type": "SERIAL_NUMBER",
                                "state": "issued"
                            }
                        ]
                    }
                }
            ]
        }
    }
}
			

Response Body Parameters

Field
Data Type
Visibility
Description
billingAddress
link
default
The billing address for the order. See the Addresses API and Fields Used as Keys for more information.
businessEntityCode
string default The code for the business entity.
digitalRights.unlockCode
string
default
The unlock code of the purchased product. The maximum length is 2000 characters. See Fields Used as Keys for more information.
displayName
string
default
The name of the order to display to the shopper.
downloads
structured
default
Contains the download information for purchased digital products in a submitted cart.
downloads.download
link
default
Contains links for an app to follow so a customer can download purchased digital products.
id
string
default
The order ID. The ID is assigned automatically when the order is created.
lineItems
collection
default
A collection of line items. See the Line Items API for more information.
lineItemState
string
default
The state of the order. The order state is a combination of order state, payment settlement state, refund state.
Payment settlement state:
  • Settled
  • Not Settled
  • Partially Settled
Refund state:
  • Refund – Completed
  • Refund – Failed
  • Refund – Pending
  • Partial Refund – Completed
  • Partial Refund – Failed
  • Partial Refund – Pending
lineItemStateDetails
structured
default
The details for the line item state.
locale
string
default
The locale associated with this order.
optIn
Boolean
default

order
link
default
The order information for the submitted cart. For more information, see the Orders API.
order.id
string
default
The order ID. The ID is assigned automatically when the order is created.
orders
link
default
The orders for a shopper. For more information, see the Orders API. Only available for authenticated shopper sessions. The orders link cannot be expanded; additional calls are required to get order details.
orderState
string
default
The state of the order. The order state is a combination of order state, payment settlement state, refund state.
Payment settlement state:
  • Settled
  • Not Settled
  • Partially Settled
Refund state:
  • Refund – Completed
  • Refund – Failed
  • Refund – Pending
  • Partial Refund – Completed
  • Partial Refund – Failed
  • Partial Refund – Pending
payment
structured
default
The payment information for an order.
payment.customerFirstName
string
default
The customer's first name. See Fields Used as Keys for more information.
payment.customerLastName
string
default
The customer's last name. See Fields Used as Keys for more information.
payment.expirationMonth
string
default
The month when a credit card expires. A numeric value that represents the month. Possible values: 1 = January, .... 12 = December. 
payment.expirationYear
string
default
The year when a credit card expires.
payment.paymentAmount
decimal
default
The payment amount for the order.
payment.paymentMethodName
string
default
The payment method name for the order. Possible values include the following: Visa, Mastercard, Americanexpress, JCB, Invoice, Lite, or Purchaseorder.
payment.softDescriptor
string
default
Describes how the charge will appear on the credit card statement. Only applicable for credit card payments.
pricing
structured
default
The pricing information for the order. See the Pricing API for more information.
shippingAddress
link
expand
The shipping address for the order. See the Addresses API and Fields Used as Keys for more information.
submissionDate
date
default
The date the order was created. For delayed payments, this date is the date when the payment was received.
taxExempt
Boolean
default
When true, the order is tax exempt.
testOrder
Boolean
hidden
When true, the order is a test order. Visibility must be set to true for non-test orders. 

Related APIs

The following table lists methods for related APIs that provide order information.

Related APIs
Methods
Billing and Shipping Address
GET /shoppers/me/orders/{id}/billing-address
GET /shoppers/me/orders/{id}/shipping-address

Line Items GET /shoppers/me/orders/{id}/line-items
GET /shoppers/me/orders/{id}/line-items/{id}
Returns GET /shoppers/me/orders/{id}/returns
POST /shoppers/me/ordes/{id}/returns