Create Return Order API
This endpoint allows you to initiate a return process. It creates a return shipment, generates a tracking link, and provides a detailed breakdown of the order and its synchronization status (Saga).
POST
https://api-fulfillment.bosta.co/api/v1/orders/returnCreate a return order. The response includes a 'shipment' object with tracking details and a 'saga' object to track the processing steps.
REQUEST BODY
{
"referenceOrderId": "7YR8y9F2QuDC3X_5lz9eamnfC",
"returnReason": "DAMAGED_PRODUCT",
"items": [
{
"orderItemId": "SH-3",
"skuCode": "SH-3",
"quantity": 1
}
],
"pickupAddress": {
"firstLine": "madinty 3ndha kda",
"cityName": "Cairo",
"cityId": "FceDyHXwpSYYF9zGW",
"districtId": "Iy7-lFD0BE0",
"buildingNumber": "11",
"floor": "22",
"apartment": "A",
"isWorkAddress": true
},
"shipment": {
"codAmount": 0,
"note": "delivery note",
"allowToOpenPackage":false
},
"customer": {
"firstName": "ahmed",
"lastName": "ayman",
"mobile": "01028687408",
"secondPhone": "01028687408"
}
}
Responses
201Return order created successfully
Return Reason Values
The returnReason field is required and must be one of the following values:
| Value | Description |
|---|---|
DAMAGED_PRODUCT | Damaged product |
WRONG_ITEM | Wrong item received |
DEFECTIVE_PRODUCT | Defective product |
SIZE_FIT_ISSUE | Size/fit issue |
COLOR_STYLE_ISSUE | Color/style issue |
CHANGED_MIND | Changed mind |
LATE_DELIVERY | Late delivery |
POOR_QUALITY | Poor quality |
MISSING_PARTS | Missing parts/accessories |
OTHER | Other |
Key Response Components
- shipment.trackingUrl: Direct link for the customer to track their return package.
- shipment.deliveryStatus: Initial status of the delivery (e.g.,
PICKUP_REQUESTED). - saga: This object tracks the background tasks. For example,
deliveryCreatedconfirms the shipping partner has received the order details. - invoice: Displays the financial summary. For returns,
totalis often0.