Skip to main content

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).

POSThttps://api-fulfillment.bosta.co/api/v1/orders/return

Create 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
 {
"success": true,
"message": "Return order created successfully",
"data": {
"order": {
"id": "bi2gKAXt6v3DoXO_RET_ehjOo3Vci8",
"orderNumber": "bi2gKAXt6v3DoXO_RET_ehjOo3Vci8",
"trackingNumber": "78961641",
"type": "RETURN",
"status": "PENDING",
"shipment": {
"deliveryStatus": "PICKUP_REQUESTED",
"trackingUrl": "https://bosta.co/ar-eg/tracking-shipments?shipment-number=24267594",
"shippingPartnerName": "bosta"
},
"saga": {
"orderSaved": {
"completedAt": "2026-01-15T12:47:02.967Z"
},
"deliveryCreated": {
"completedAt": "2026-01-15T12:47:05.379Z"
}
}
}
},
"meta": {
"timestamp": "2026-01-15T12:47:05.380Z"
}
}

Return Reason Values​

The returnReason field is required and must be one of the following values:

ValueDescription
DAMAGED_PRODUCTDamaged product
WRONG_ITEMWrong item received
DEFECTIVE_PRODUCTDefective product
SIZE_FIT_ISSUESize/fit issue
COLOR_STYLE_ISSUEColor/style issue
CHANGED_MINDChanged mind
LATE_DELIVERYLate delivery
POOR_QUALITYPoor quality
MISSING_PARTSMissing parts/accessories
OTHEROther

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, deliveryCreated confirms the shipping partner has received the order details.
  • invoice: Displays the financial summary. For returns, total is often 0.