List return requests
Lists the return requests on an order, newest first. Returns an empty list when the order has none. An order that does not exist or is not visible to the caller returns 404.
GET
/{orderId}/returnsAuthorization
AuthorizationBearer token · headerrequiredAPI token from the SIBI developer dashboard (developer.sibipro.com), sent as `Authorization: Bearer <token>`.
Scopes:
read:returnsPath parameters
orderIdstringrequiredThe order the return data belongs to.
min length 1
Responses
200The return requests on the order.
itemsReturnRequestResponse[]requiredThe return requests on the order, newest first. Empty when none have been opened.
Show propertiesHide properties
Array of
ReturnRequestResponseidstringrequiredThe unique identifier for the return request.
orderIdstringrequiredThe order the returned lines belong to.
createdAtstringrequiredISO 8601 timestamp of when the request was created.
updatedAtstringrequiredISO 8601 timestamp of the most recent change.
itemsReturnRequestItem[]requiredThe requested lines, each carrying its current status.
Show propertiesHide properties
Array of
ReturnRequestItemorderLineItemIdstringrequiredLinks back to the order line (Order line itemId).
quantityintegerrequiredHow many units of the order line this covers.
conditionstringrequiredPhysical condition reported at intake.
requestReasonstringrequiredWhy the line was requested for return.
statusstringrequiredPer-item status, derived from the latest decision (PENDING when none exists).
Allowed:
PENDINGAPPROVEDDENIEDlatestDecisionReturnItemDecision | nullrequiredThe most recent decision on this line; null while PENDING.
Show propertiesHide properties
outcomestringrequiredThe decision recorded for the line.
Allowed:
APPROVEDDENIEDdenialReasonstring | nullrequiredSet only when the outcome is DENIED.
decidedAtstringrequiredISO 8601 timestamp of when the decision was made.
400Bad request - Invalid path parameters
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired401Unauthorized - Missing or invalid authentication
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired403Forbidden - the token was minted for the other environment, is not a Public REST API token, does not carry the scope this operation requires, or targeted the test environment (the Returns API is production-only)
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired404Not found - no order with the given id is visible to the caller, or its return data could not be resolved
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequired500Internal server error
codestringrequiredError code indicating the type of error
messagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
Array of
objectfieldstringrequirederrorstringrequiredRequest
curl -X GET "https://api.sibipro.com/orders/SIBI-12345678/returns" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.sibipro.com/orders/SIBI-12345678/returns", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});Response
{
"items": [
{
"id": "RET-12345XYZ",
"orderId": "SIBI-12345678",
"createdAt": "string",
"updatedAt": "string",
"items": [
{
"orderLineItemId": "string",
"quantity": 0,
"condition": "UNOPENED",
"requestReason": "string",
"status": "PENDING",
"latestDecision": {
"outcome": "APPROVED",
"denialReason": "string",
"decidedAt": "string"
}
}
]
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "items.0.condition",
"error": "Invalid enum value"
},
{
"field": "items.0.quantity",
"error": "Expected positive integer"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "items.0.condition",
"error": "Invalid enum value"
},
{
"field": "items.0.quantity",
"error": "Expected positive integer"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "items.0.condition",
"error": "Invalid enum value"
},
{
"field": "items.0.quantity",
"error": "Expected positive integer"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "items.0.condition",
"error": "Invalid enum value"
},
{
"field": "items.0.quantity",
"error": "Expected positive integer"
}
]
}{
"code": "string",
"message": "The request contains invalid parameters",
"details": [
{
"field": "items.0.condition",
"error": "Invalid enum value"
},
{
"field": "items.0.quantity",
"error": "Expected positive integer"
}
]
}