Lamha
Api HomeHome
Api HomeHome
  1. Order
  • lamha
    • Welcome 👋
    • Status Order
    • Payment Method
    • Webhook Order
    • API
      • Order
        • Orders List
          GET
        • Order Create
          POST
        • Order Show
          GET
        • Order Edit
          PUT
        • Delete Order
          DELETE
        • Cancel Order
          POST
        • Return Order
          POST
      • Country
        • Countries
        • City
      • Carrier
        • Carriers
        • Create Shippment
        • Cancel Shippment
        • Label Shipment
  1. Order

Return Order

Developing
POST
https://dev.your-api-server.com{{baseUrl}}/api/v2/order/return/{order_id}

Important Notes on Returned Orders#

When processing returned shipments, it's important to note that the Order ID provided in the return shipment response not match the original Order ID that was created during the initial purchase.

Explanation#

The reason behind this discrepancy is that, for tracking and logistical purposes, the return process may generate a new, unique order ID or tracking number specific to the return shipment. This new identifier is separate from the original order number.

Example Response for Returned Orders:#

The response for a returned order might look like this:
{
  "success": true,
  "msg": "The Order has been Returned",
  "order_id": 1111111,
  "number_tracking": "7745377811104381",
  "link_tracking": ""
}

Explanation#

order_id: This is the new order ID generated for the returned shipment.
number_tracking: The unique tracking number for the return shipment.
link_tracking: A URL to track the return shipment online.

Why It Differs:#

The order_id in the response corresponds to the return shipment and not the original order.
The return shipment may be handled by different logistics or processes, necessitating the use of a new identifier.

Conclusion:#

Always ensure that you track the return shipment using the provided number_tracking and use the order_id for any reference related to the return process.

Request

Path Params

Header Params

Body Params application/json

Example
{
    "customer_name" : "Lamha Customer",
    "customer_phone" : "+966512345678",
    "address" : "SA , Riyadh",
    "shipper": {
        "name" : "متجر الاكسسوارات",
        "phone" : "+966512345677",
        "Country" : "SA",
        "City" : "Jeddah",
        "AddressLine1" : "جدة , بجوار صيدلية الاحمدي"
    },
    "carrier_id": 9,
    "callback_url" : null,
    "callback_pdf_url" : null
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST '{{baseUrl}}/api/v2/order/return/' \
--header 'X-LAMHA-TOKEN: Lamha_rPAHG9wey1xjYJErCz9678EuBkyExIzOksbHygh0' \
--header 'Content-Type: application/json' \
--data-raw '{
    "customer_name" : "Lamha Customer",
    "customer_phone" : "+966512345678",
    "address" : "SA , Riyadh",
    "shipper": {
        "name" : "متجر الاكسسوارات",
        "phone" : "+966512345677",
        "Country" : "SA",
        "City" : "Jeddah",
        "AddressLine1" : "جدة , بجوار صيدلية الاحمدي"
    },
    "carrier_id": 9,
    "callback_url" : null,
    "callback_pdf_url" : null
}'

Responses

🟢200Success
application/json
Body

Example
{
    "success": true,
    "msg": "The Order has been Return",
    "order_id": 1111111,
    "number_tracking": "7745377811104381",
    "link_tracking": "https://mkhdoom.sa/tracking?id=7745377811104381"
}
🟢200False
Modified at 2024-12-14 09:09:44
Previous
Cancel Order
Next
Countries
Built with