Returns
The Returns resource in the Digital River API allows businesses to handle returning items from an order. It supports full and partial returns, offering flexibility in managing customer requests to return goods. This resource allows businesses to process returns, initiate refunds, and update inventory and order statuses accordingly. See Return basics for more information.
Get all returns.
A cursor for use in pagination. The endingBefore parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with xyz your subsequent calls can include endingBefore=xyz in order to fetch the previous page of the list.
A cursor for use in pagination. The startingAfter parameter is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with xyz, your subsequent calls can include startingAfter=xyz in order to fetch the next page of the list.
A limit on the number of objects returned. Limit can range between 1 and 100, and the default is 10.
Only return objects with these IDs.
Only return objects in the given state
The order to retrieve returns for.
The sku to retrieve returns for.
200 OK
Whether or not there are more elements available after this set. If false this set represents the end of the list.
true400 Bad Request
401 Unauthorized
403 Forbidden
405 Method Not Allowed
406 Not Acceptable
408 Request Timeout
429 Too Many Requests
500 Internal Server Error
502 Bad Gateway Error
503 Service Unavailable Error
504 Gateway Timeout Error
GET /returns HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"hasMore": true,
"data": [
{
"id": "ret_5823594809",
"createdTime": "2018-04-25T20:36:00Z",
"updatedTime": "2018-04-25T20:36:00Z",
"orderId": "ord_6645940010",
"currency": "USD",
"items": [
{
"itemId": "99341140336",
"skuId": "sku_5823594809",
"amount": 899,
"quantity": 1,
"quantityAccepted": 1,
"state": "created"
}
],
"reason": "requested_by_customer",
"failureReason": "text",
"state": "created",
"location": {
"address": {
"line1": "10380 Bren Rd W",
"line2": "text",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"name": "John Smith",
"phone": "952-111-1111",
"email": "jsmith@digitalriver.com"
},
"liveMode": false,
"metadata": {
"coupon": "iOS"
},
"refundIds": [
"0848750667"
]
}
]
}Returns all or part of a previously created order.
The unique identifier of the Order associated with the Return.
ord_6645940010The reason for the return.
requested_by_customer201 Created
The unique identifier of the return.
ret_5823594809Time at which the return was created.
2018-04-25T20:36:00ZThe unique identifier of the order.
ord_6645940010Three-letter ISO currency code.
USDThe reason for the return.
requested_by_customerEnumeration indicating the state of the return.
createdPossible values: Has the value true if the object exists in live mode or the value false if the object exists in test mode.
falseThe identifier of a refund requested for this return.
ref_0848750667400 Bad Request
401 Unauthorized
403 Forbidden
405 Method Not Allowed
406 Not Acceptable
408 Request Timeout
409 Conflict
429 Too Many Requests
500 Internal Server Error
502 Bad Gateway Error
503 Service Unavailable Error
504 Gateway Timeout Error
POST /returns HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 371
{
"orderId": "ord_6645940010",
"reason": "requested_by_customer",
"items": [
{
"itemId": "99341140336",
"skuId": "99341140336",
"quantity": 1
}
],
"location": {
"address": {
"line1": "10380 Bren Rd W",
"line2": "text",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"name": "John Smith",
"phone": "952-111-1111",
"email": "jsmith@digitalriver.com"
},
"metadata": {
"coupon": "iOS"
}
}{
"id": "ret_5823594809",
"createdTime": "2018-04-25T20:36:00Z",
"orderId": "ord_6645940010",
"currency": "USD",
"items": [
{
"itemId": "99341140336",
"skuId": "sku_5823594809",
"amount": 899,
"quantity": 1,
"quantityAccepted": 1,
"state": "created"
}
],
"reason": "requested_by_customer",
"state": "created",
"location": {
"address": {
"line1": "10380 Bren Rd W",
"line2": "text",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"name": "John Smith",
"phone": "952-111-1111",
"email": "jsmith@digitalriver.com"
},
"livemode": false,
"metadata": {
"coupon": "iOS"
},
"refundIds": [
"ref_0848750667"
]
}Retrieves the details of a return. Supply the unique identifier of the return.
Return ID
OK.
The unique identifier of the return.
ret_5823594809The time at which the return was created.
2018-04-25T20:36:00ZThe time at which the return was updated.
2018-04-25T20:36:00ZThe unique identifier of the order.
ord_6645940010A three-letter ISO currency code.
USDThe reason for the return.
requested_by_customerAn enumeration indicating the reason for the return failure, if known.
An enumeration indicating the state of the return.
createdPossible values: Has the value true if the object exists in live mode or the value false if the object exists in test mode.
falseThe identifier of a refund issued for this return.
0848750667400 Bad Request
401 Unauthorized
403 Forbidden
404 Not Found
405 Method Not Allowed
406 Not Acceptable
408 Request Timeout
429 Too Many Requests
500 Internal Server Error
502 Bad Gateway Error
503 Service Unavailable Error
504 Gateway Timeout Error
GET /returns/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"id": "ret_5823594809",
"createdTime": "2018-04-25T20:36:00Z",
"updatedTime": "2018-04-25T20:36:00Z",
"orderId": "ord_6645940010",
"currency": "USD",
"items": [
{
"itemId": "99341140336",
"skuId": "sku_5823594809",
"amount": 899,
"quantity": 1,
"quantityAccepted": 1,
"state": "created"
}
],
"reason": "requested_by_customer",
"failureReason": "text",
"state": "created",
"location": {
"address": {
"line1": "10380 Bren Rd W",
"line2": "text",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"name": "John Smith",
"phone": "952-111-1111",
"email": "jsmith@digitalriver.com"
},
"liveMode": false,
"metadata": {
"coupon": "iOS"
},
"refundIds": [
"0848750667"
]
}Updates an existing return.
Return ID
Enumeration indicating the state of the return.
acceptedPossible values: 200 OK
The unique identifier of the return.
ret_5823594809The time at which the return was created.
2018-04-25T20:36:00ZThe time at which the return was updated.
2018-04-25T20:36:00ZThe unique identifier of the order.
ord_6645940010A three-letter ISO currency code.
USDThe reason for the return.
requested_by_customerAn enumeration indicating the reason for the return failure, if known.
An enumeration indicating the state of the return.
createdPossible values: Has the value true if the object exists in live mode or the value false if the object exists in test mode.
falseThe identifier of a refund issued for this return.
0848750667400 Bad Request
401 Unauthorized
403 Forbidden
401 Not Found
405 Method Not Allowed
406 Not Acceptable
408 Request Timeout
409 Conflict
429 Too Many Requests
500 Internal Server Error
502 Bad Gateway Error
503 Service Unavailable Error
504 Gateway Timeout Error
POST /returns/{id} HTTP/1.1
Host: api.digitalriver.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 349
{
"location": {
"address": {
"line1": "10380 Bren Rd W",
"line2": "text",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"name": "John Smith",
"phone": "952-111-1111",
"email": "jsmith@digitalriver.com"
},
"state": "accepted",
"items": [
{
"itemId": "99596460336",
"skuId": "99596460336",
"quantity": 1,
"state": "accepted"
}
],
"metadata": {
"coupon": "iOS"
}
}{
"id": "ret_5823594809",
"createdTime": "2018-04-25T20:36:00Z",
"updatedTime": "2018-04-25T20:36:00Z",
"orderId": "ord_6645940010",
"currency": "USD",
"items": [
{
"itemId": "99341140336",
"skuId": "sku_5823594809",
"amount": 899,
"quantity": 1,
"quantityAccepted": 1,
"state": "created"
}
],
"reason": "requested_by_customer",
"failureReason": "text",
"state": "created",
"location": {
"address": {
"line1": "10380 Bren Rd W",
"line2": "text",
"city": "Minnetonka",
"postalCode": "55129",
"state": "MN",
"country": "US"
},
"name": "John Smith",
"phone": "952-111-1111",
"email": "jsmith@digitalriver.com"
},
"liveMode": false,
"metadata": {
"coupon": "iOS"
},
"refundIds": [
"0848750667"
]
}Last updated