Open a return request
Opens a return request for one or more lines of an order. A 201 means the request was opened — not that any line is approved yet. Every requested line starts PENDING.
Learning the outcome: Sibi staff approve or deny each line independently (one request can end with some lines approved and others denied). Learn the result by subscribing to the order.returnrequest.item-approved and order.returnrequest.item-denied webhook events — see Order Return Requests events — or by re-reading the order with GET /orders/{orderId}, whose returns array carries each line’s current status.
A line that is not eligible, is not on the order, appears more than once, or exceeds the returnable quantity is rejected with a 400. The 400 lists every failing line in details[] — each carrying its own code from the set below — and no return request is created unless all lines pass.
| Code | Meaning |
|---|---|
RETURN_INVALID_CONDITION |
The condition is not one of the accepted values |
RETURN_INVALID_QUANTITY |
The quantity is not a positive whole number |
RETURN_DUPLICATE_LINE |
The same order line appears more than once in the request |
RETURN_LINE_NOT_ON_ORDER |
The orderLineItemId is not a line on the order |
RETURN_ITEM_NOT_ELIGIBLE |
Policy does not allow returning this line |
RETURN_QUANTITY_EXCEEDED |
The requested quantity exceeds what remains returnable on the line |
/{orderId}/returnsAuthorizationBearer token · headerrequiredAPI token from the SIBI developer dashboard (developer.sibipro.com), sent as Authorization: Bearer <token>.
create:returnsorderIdstringrequiredThe order the return data belongs to.
application/jsonitemsReturnRequestItemInput[]requiredThe lines to return. At least one; each must reference a distinct order line.
Show propertiesHide properties
ReturnRequestItemInputorderLineItemIdstringrequiredThe order line to return, referencing the order line by its itemId.
quantityintegerrequiredUnits of the order line to return. At least one, and bounded by the ordered quantity.
conditionstringrequiredPhysical condition of the item at intake.
UNOPENEDOPENED-UNUSEDINSTALLEDDAMAGEDrequestReasonstringrequiredWhy the line is being returned.
The return request was opened. Every line starts PENDING.
idstringrequiredThe 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
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).
PENDINGAPPROVEDDENIEDlatestDecisionReturnItemDecision | nullrequiredThe most recent decision on this line; null while PENDING.
Show propertiesHide properties
outcomestringrequiredThe decision recorded for the line.
APPROVEDDENIEDdenialReasonstring | nullrequiredSet only when the outcome is DENIED.
decidedAtstringrequiredISO 8601 timestamp of when the decision was made.
Bad request - Invalid input data. See the operation description for the possible error codes.
codestringrequiredError code indicating the type of error
VALIDATION_ERRORRETURN_INVALID_CONDITIONRETURN_INVALID_QUANTITYRETURN_DUPLICATE_LINERETURN_LINE_NOT_ON_ORDERRETURN_ITEM_NOT_ELIGIBLERETURN_QUANTITY_EXCEEDEDmessagestringrequiredHuman-readable error message explaining what went wrong
detailsobject[]Detailed validation errors when applicable
Show propertiesHide properties
objectfieldstringrequirederrorstringrequiredUnauthorized - 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
objectfieldstringrequirederrorstringrequiredForbidden - 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
objectfieldstringrequirederrorstringrequiredNot 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
objectfieldstringrequirederrorstringrequiredInternal 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
objectfieldstringrequirederrorstringrequired