Retrieve orders
Last updated
Last updated
To get a shopper's order by ID, specify the order ID in the {id} URI path parameter.
Provide the order's identifier.
Successful response.
const response = await fetch('https://api.digitalriver.com/v1/shoppers/me/orders/{orderId}?orderState=text', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"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",
"taxInclusive": false,
"landedCostState": "NOT_ELIGIBLE",
"pricing": {
"subtotal": {
"currency": "USD",
"value": 1059.5
},
"subtotalWithDiscount": {
"currency": "USD",
"value": 1059.5
},
"incentive": {
"currency": "USD",
"value": 0
},
"shipping": {
"currency": "USD",
"value": 11.47
},
"tax": {
"currency": "USD",
"value": 178.49
},
"total": {
"currency": "USD",
"value": 1070.97
},
"formattedSubtotal": "1,059.50GBP",
"formattedIncentive": "0.00USB",
"formattedShipping": "11.47USD",
"formattedTax": "178.49USD",
"formattedTotal": "1,070.97USD"
},
"paymentMethod": {
"type": "creditCard",
"sourceId": "a231f38d-3a07-4a13-96ed-89693ba7d56c",
"sourceClientSecret": "a231f38d-3a07-4a13-96ed-89693ba7d56c_f6d8c951-59c9-4ef3-ac45-9f33c77d2f46",
"creditCard": {
"expirationYear": "2030",
"lastFourDigits": "0000",
"clientSecret": "a231f38d-3a07-4a13-96ed-89693ba7d56c_f6d8c951-59c9-4ef3-ac45-9f33c77d2f46",
"expirationMonth": "08",
"fundingSource": "debit",
"brand": "Visa",
"reusable": "true"
},
"amountContributed": {
"currency": "USD",
"value": 1059.5
},
"charges": [
{
"chargeId": "1cac37c0-98a7-46b2-b9ed-fbc615c9f18a",
"amount": {
"currency": "USD",
"value": 1059.5
},
"status": "failed",
"createdTime": "2021-12-06T09:03:46.877Z",
"updatedTime": "2021-12-06T09:03:46.877Z"
}
],
"supplementaryPaymentMethods": [
{
"type": "customerCredit",
"sourceId": "a231f38d-3a07-4a13-96ed-89693ba7d56c",
"sourceClientSecret": "a231f38d-3a07-4a13-96ed-89693ba7d56c_f6d8c951-59c9-4ef3-ac45-9f33c77d2f46",
"customerCredit": {
"flow": "standard",
"reusable": "true"
},
"charges": [
{
"chargeId": "cf57f9c9-8b0d-4e64-998a-816499fefa01",
"amount": {
"currency": "USD",
"value": 1059.5
},
"status": "failed",
"createdTime": "2021-12-06T09:03:46.877Z",
"updatedTime": "2021-12-06T09:03:46.877Z"
}
],
"amountContributed": {
"currency": "USD",
"value": 1059.5
}
}
]
},
"payment": {
"paymentMethodName": "discover",
"displayableNumber": "************4321",
"expirationMonth": "08",
"expirationYear": "2030",
"customerFirstName": "AUTOMATION",
"customerLastName": "TESTER",
"customerEmail": "automatedtester68091904@digitalriver.com",
"paymentAmount": {
"currency": "USD",
"value": "19.99"
},
"softDescriptor": "DRI*demosft1"
},
"orderState": "Complete",
"billingAddress": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/address/47278020023",
"relation": "https://developers.digitalriver.com/v1/shoppers/AddressesResource",
"id": "billingAddress",
"firstName": "Automation",
"lastName": "Tester",
"companyName": "Digital River",
"line1": "PO BOX 6930",
"line2": "123",
"line3": "Suite Line 3",
"city": "Waconia",
"countrySubdivision": "MN",
"postalCode": "5387.0",
"country": "US",
"countryName": "United States",
"phoneNumber": "099-222-44454",
"emailAddress": "automatedTester@digitalriver.com",
"countyName": "Hennepin",
"phoneticFirstName": "クリス",
"phoneticLastName": "ミラー",
"division": "製品開発",
"title": "M"
},
"shippingAddress": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/address/47278020023",
"relation": "https://developers.digitalriver.com/v1/shoppers/AddressesResource",
"id": "shippingAddress",
"firstName": "Automation",
"lastName": "Tester",
"companyName": "Digital River",
"line1": "PO BOX 6930",
"line2": "123",
"line3": "Suite Line 3",
"city": "Waconia",
"countrySubdivision": "MN",
"postalCode": "5387.0",
"country": "US",
"countryName": "United States",
"phoneNumber": "099-222-44454",
"countyName": "Hennepin",
"emailAddress": "automatedTester@digitalriver.com",
"phoneticFirstName": "クリス",
"phoneticLastName": "ミラー",
"division": "製品開発"
},
"lineItems": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47276010023/line-items",
"lineItem": [
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47276010023/line-items/488822300023",
"id": "488822300023",
"quantity": 1,
"product": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/5112133200",
"displayName": "Good Product",
"thumbnailImage": "text"
},
"lineItemState": "Complete",
"lineItemStateDetails": {
"description": "Downloadable - 1",
"backOrdered": 0,
"shipped": 0,
"returned": 0,
"pendingReturn": 0
},
"pricing": {
"listPrice": {
"currency": "USD",
"value": 101
},
"listPriceWithQuantity": {
"currency": "USD",
"value": 1010
},
"salePriceWithQuantity": {
"currency": "USD",
"value": 959.5
},
"formattedListPrice": "101.00USD",
"formattedListPriceWithQuantity": "1010.00USD",
"formattedSalePriceWithQuantity": "959.50USD",
"formattedCommitmentPrice": "$240.00",
"commitmentPrice": {
"currency": "USD",
"value": "240.00"
},
"productTax": {
"currency": "USD",
"value": "1.35"
},
"shippingTax": {
"currency": "USD",
"value": "0.65"
},
"feeTax": {
"currency": "USD",
"value": "2.00"
},
"taxRate": "0.1111",
"importTax": {
"currency": "USD",
"value": 0
},
"formattedImportTax": "0.00USD",
"importDuty": {
"currency": "USD",
"value": 0
},
"formattedImportDuty": "0.00USD"
},
"downloads": {
"downloadUri": [
"https://wgtsysot12.digitalriver.com/wgt/9B5A4FCEF11DA80C/171F14235882A3D349C4DF3E9F68F51B28573D6CB50E888238DC305C96D769176F6A4F895B77C58CF0F67A3572E1FE49934F924414F2486E45C01D39B94ADFA2E0920C4390CBA6042FE0C88CD46AAEA99C060E2044E521050A7DE0793B014624647C638FDE4F6D4D/demosft1/WaterLilies.jpg"
]
},
"digitalRights": {},
"billingAgreementId": "fc86a666-9f2f-4294-b591-468ae34122ff",
"subscriptionIds": [
"[15564325189,15564325289]"
],
"components": {
"lineItem": [
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/47276010023/line-items/488822300023",
"id": "488822300023",
"quantity": 1,
"product": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/products/5112133200",
"displayName": "Good Product",
"thumbnailImage": "text"
},
"lineItemState": "Complete",
"lineItemStateDetails": {
"description": "Downloadable - 1",
"backOrdered": 0,
"shipped": 0,
"returned": 0,
"pendingReturn": 0
},
"pricing": {
"listPrice": {
"currency": "USD",
"value": 101
},
"listPriceWithQuantity": {
"currency": "USD",
"value": 1010
},
"salePriceWithQuantity": {
"currency": "USD",
"value": 959.5
},
"formattedListPrice": "101.00USD",
"formattedListPriceWithQuantity": "1010.00USD",
"formattedSalePriceWithQuantity": "959.50USD",
"formattedCommitmentPrice": "$240.00",
"commitmentPrice": {
"currency": "USD",
"value": "240.00"
},
"productTax": {
"currency": "USD",
"value": "1.35"
},
"shippingTax": {
"currency": "USD",
"value": "0.65"
},
"feeTax": {
"currency": "USD",
"value": "2.00"
},
"taxRate": "0.1111",
"importTax": {
"currency": "USD",
"value": 0
},
"formattedImportTax": "0.00USD",
"importDuty": {
"currency": "USD",
"value": 0
},
"formattedImportDuty": "0.00USD"
},
"downloads": {
"downloadUri": [
"https://wgtsysot12.digitalriver.com/wgt/9B5A4FCEF11DA80C/171F14235882A3D349C4DF3E9F68F51B28573D6CB50E888238DC305C96D769176F6A4F895B77C58CF0F67A3572E1FE49934F924414F2486E45C01D39B94ADFA2E0920C4390CBA6042FE0C88CD46AAEA99C060E2044E521050A7DE0793B014624647C638FDE4F6D4D/demosft1/WaterLilies.jpg"
]
},
"digitalRights": {},
"billingAgreementId": "fc86a666-9f2f-4294-b591-468ae34122ff",
"subscriptionIds": [
"[15564325189,15564325289]"
]
}
]
}
}
]
},
"customAttributes": {
"attribute": [
{
"name": "name",
"value": "string",
"type": "string"
}
]
},
"paymentSession": {
"id": "text",
"status": "text",
"clientSecret": "text",
"redirectUrl": "https://api.digitalriver.com:80/payments/redirects/12759bb0-xxxx-4bdb-bfeb-9095ba8059fc?apiKey=a88fxxxx1eef47eb95bc609c22e593c8"
},
"customerType": "B",
"taxRegistrations": [
{
"key": "UK_VAT",
"value": "GB698588737"
}
]
}
}
Use this method to retrieve the shopper's order history.
Successful response.
const response = await fetch('https://api.digitalriver.com/v1/shoppers/me/orders', {
method: 'GET',
headers: {},
});
const data = await response.json();
{
"orders": {
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders",
"order": [
{
"uri": "https://api.digitalriver.com/v1/shoppers/me/orders/829223750082"
}
],
"totalResults": "1",
"totalResultPages": "1"
}
}