Managing line items
Learn how to manage line items.
Getting all line items from a cart
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items' \
--header 'authorization: Basic ***\
...{
"lineItems": {
"links": [
{
"rel": "self",
"href": "https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items"
},
{
"rel": "cart",
"href": "https://api.digitalriver.com/v1/shoppers/me/carts/active"
},
{
"rel": "new",
"href": "https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items",
"method": "post",
"type": "application/json"
}
],
"entities": [
{
"name": "lineItem",
"links": [
{
"rel": "lineitem",
"href": "https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items/53820030082"
}
],
"data": {
"id": 53820030082,
"quantity": 1,
"billingAgreementId": "39b40910-3267-4b38-a07d-a6b05807f227"
},
"entities": [
{
"name": "product",
"links": [
{
"rel": "product",
"href": "https://api.digitalriver.com/v1/shoppers/me/products/287271100",
"title": "Subscription Physical"
}
],
"data": {
"displayName": "Subscription Physical",
"thumbnailImage": null
}
},
{
"name": "pricing",
"data": {
"listPrice": {
"currency": "USD",
"value": 100
},
"listPriceWithQuantity": {
"currency": "USD",
"value": 100
},
"salePriceWithQuantity": {
"currency": "USD",
"value": 100
},
"formattedListPrice": "$100.00",
"formattedListPriceWithQuantity": "$100.00",
"formattedSalePriceWithQuantity": "$100.00",
"productTax": {
"currency": "USD",
"value": 8.53
},
"shippingTax": {
"currency": "USD",
"value": 0.01
},
"feeTax": {
"currency": "USD",
"value": 0
},
"taxRate": 0.08525,
"importTax": {
"currency": "USD",
"value": 0
},
"formattedImportTax": "$0.00",
"importDuty": {
"currency": "USD",
"value": 0
},
"formattedImportDuty": "$0.00"
}
}
]
}
]
}
}Getting a specific line item from a cart
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items/{lineItesId}' \
--header 'authorization: Basic ***\
...{
"lineItem": {
"links": [
{
"rel": "self",
"href": "https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items/53820030082"
},
{
"rel": "save",
"href": "https://api.digitalriver.com/v1/shoppers/me/carts/active/line-items/53820030082",
"method": "POST",
"type": "application/json"
}
],
"data": {
"id": 53820030082,
"quantity": 1,
"billingAgreementId": "39b40910-3267-4b38-a07d-a6b05807f227"
},
"entities": [
{
"name": "product",
"links": [
{
"rel": "product",
"href": "https://api.digitalriver.com/v1/shoppers/me/products/287271100",
"title": "Subscription Physical"
}
],
"data": {
"displayName": "Subscription Physical",
"thumbnailImage": null
}
},
{
"name": "pricing",
"data": {
"listPrice": {
"currency": "USD",
"value": 100
},
"listPriceWithQuantity": {
"currency": "USD",
"value": 100
},
"salePriceWithQuantity": {
"currency": "USD",
"value": 100
},
"formattedListPrice": "$100.00",
"formattedListPriceWithQuantity": "$100.00",
"formattedSalePriceWithQuantity": "$100.00",
"productTax": {
"currency": "USD",
"value": 8.53
},
"shippingTax": {
"currency": "USD",
"value": 0.01
},
"feeTax": {
"currency": "USD",
"value": 0
},
"taxRate": 0.08525,
"importTax": {
"currency": "USD",
"value": 0
},
"formattedImportTax": "$0.00",
"importDuty": {
"currency": "USD",
"value": 0
},
"formattedImportDuty": "$0.00"
}
}
]
}
}
```Getting line items for an order
curl --location --request GET 'https://api.digitalriver.com/v1/shoppers/me/orders/{orderId}/line-items' \
--header 'authorization: Basic ***\
...{
"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": "string"
},
"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": {
"serialNumber": {}
},
"billingAgreementId": "fc86a666-9f2f-4294-b591-468ae34122ff",
"subscriptionIds": [
"[15564325189,15564325289]"
]
}
]
}Getting a specific line item for an order
Adding line items to a cart
Updating one or more line items to a cart
Deleting all line items from a cart
Deleting a specific line item from a cart
Last updated