# Create a Return

### **Endpoint**

**POST** `http://wms.eshopbox.com/api/return`

### **Headers**

| Name          | Type   | Description                             |
| ------------- | ------ | --------------------------------------- |
| Authorization | string | Bearer Token to grant access to the API |

### **Request Body**

<table><thead><tr><th>Name</th><th width="109.6258544921875">Mandatory</th><th width="129.0616455078125">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>externalChannelID</strong></td><td>No</td><td>string</td><td>Name of the sales channel generated by Eshopbox</td></tr><tr><td><strong>customerReturnNumber</strong></td><td>Yes</td><td>string</td><td>Unique return number against a sales channel</td></tr><tr><td><strong>assignCourier</strong></td><td>Yes</td><td>boolean</td><td><code>true</code> to assign return tracking ID, <code>false</code> if not required</td></tr><tr><td><strong>customerOrderId</strong></td><td>Yes</td><td>string</td><td>Unique order number against a sales channel (Previously <code>customerOrderNumber</code>)</td></tr><tr><td><strong>pickup_type</strong></td><td>Yes</td><td>string</td><td>Pickup type for return, default: <code>"reverse"</code></td></tr><tr><td><strong>refundAmount</strong></td><td>Yes</td><td>string</td><td>Amount to be refunded on the return request</td></tr><tr><td><strong>isCOD</strong></td><td>Yes</td><td>boolean</td><td><code>true</code> if the order is Cash on Delivery (COD), <code>false</code> if prepaid. Since we are created return, if will be false.</td></tr><tr><td><strong>return_request_date</strong></td><td>Yes</td><td>string</td><td>Return request date and time (cannot be NULL, even though it's optional)</td></tr><tr><td><strong>repaymentType</strong></td><td>No</td><td>string</td><td>Refund mode</td></tr></tbody></table>

#### **Pickup Address** (Object)

<table><thead><tr><th width="254.49737548828125">Name</th><th width="108.59722900390625">Mandatory</th><th width="132.9130859375">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>customerName</strong></td><td>Yes</td><td>string</td><td>Name of the pickup customer</td></tr><tr><td><strong>addressLine1</strong></td><td>Yes</td><td>string</td><td>Pickup address line 1</td></tr><tr><td><strong>addressLine2</strong></td><td>Yes</td><td>string</td><td>Pickup address line 2</td></tr><tr><td><strong>city</strong></td><td>Yes</td><td>string</td><td>Pickup address city</td></tr><tr><td><strong>state</strong></td><td>Yes</td><td>string</td><td>Pickup address state</td></tr><tr><td><strong>postalCode</strong></td><td>Yes</td><td>string</td><td>Pickup address PIN code</td></tr><tr><td><strong>countryCode</strong></td><td>Yes</td><td>string</td><td>Pickup address country code</td></tr><tr><td><strong>countryName</strong></td><td>Yes</td><td>string</td><td>Pickup address country name</td></tr><tr><td><strong>contactPhone</strong></td><td>Yes</td><td>string</td><td>Pickup address contact number</td></tr><tr><td><strong>email</strong></td><td>Yes</td><td>string</td><td>Pickup address email address</td></tr></tbody></table>

#### **Items** (Array)

<table><thead><tr><th width="254.8125">Name</th><th width="102.84637451171875">Mandatory</th><th width="133.33685302734375">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>lineItemSequenceNumber</strong></td><td>No</td><td>string</td><td>Unique item ID in the client system</td></tr><tr><td><strong>itemID</strong></td><td>No</td><td>string</td><td>Product availability identifier on a channel</td></tr><tr><td><strong>sku</strong></td><td>Yes</td><td>string</td><td>SKU of the product (previously <code>SKU</code>)</td></tr><tr><td><strong>quantity</strong></td><td>Yes</td><td>number</td><td>Quantity of the item to be returned</td></tr><tr><td><strong>returnReason</strong></td><td>Yes</td><td>string</td><td>Reason for return</td></tr><tr><td><strong>additionalInfo.image</strong></td><td>No</td><td>string</td><td>Image shared by the customer</td></tr><tr><td><strong>additionalInfo.comment</strong></td><td>No</td><td>string</td><td>Remarks shared by the customer</td></tr><tr><td><strong>itemImage</strong></td><td>No</td><td>string</td><td>Product image</td></tr></tbody></table>

### Response

{% tabs %}
{% tab title="200 Return successfully created." %}

```json
{
    "externalChannelID": "CH3458",
    "integrationType": "4",
    "channelLabel": "Test123",
    "customerReturnNumber": "ReturnTestviaAPI13",
    "customerOrderNumber": "DiscrepancySmoke25",
    "pickupType": "reverse",
    "status": "CREATED",
    "latest_status": "created",
    "pickupAddress": {
        "pickup_customerName": "Gajanand Jangir",
        "pickup_addressLine1": "Near diwan hotel ajeetgarh",
        "pickup_addressLine2": "",
        "pickup_city": "SIKAR",
        "pickup_state": "",
        "pickup_postalCode": "332701",
        "pickup_countryCode": "IN",
        "pickup_countryName": "India",
        "pickup_contactPhone": "+919256312345",
        "pickup_email": "gajanand.07@gmail.com"
    },
    "dropAddress": {
        "drop_name": "Delhi Warehouse",
        "drop_address": "68p sector 22, gurgaon",
        "drop_pincode": "122015",
        "drop_city": "Gurgaon",
        "drop_country": "India",
        "drop_state": "Haryana",
        "drop_contact": "9571912345"
    },
    "items": [
        {
            "lineItemSequenceNumber": 0,
            "orderItemID": "DiscrepancySmoke25-45102164",
            "itemID": "My4",
            "quantity": 1,
            "returnReason": "size is too small",
            "productName": "My product 4",
            "itemImage": "",
            "returnFlag": "1",
            "lineItemTotal": 1000,
            "productAdditionalInfo": {
                "specification": [
                    "enable batch tracking"
                ],
                "productDetails": {
                    "unitPrice": 1000,
                    "hsnCode": "4858645",
                    "dimensionHeight": 10,
                    "dimensionLength": 10,
                    "dimensionUnit": "cm",
                    "description": "My product 4",
                    "weight": 480,
                    "weight_dimension_status": "unverified",
                    "mrp": 2000,
                    "dimensionWidth": 10,
                    "type": "BASE",
                    "taxCode": "ESBGST2",
                    "imageUrl": "https://cdn.shopify.com/s/files/1/0698/9820/7478/files/PROD4.png?v=1750413384",
                    "accountSlug": "eshopboxdemo",
                    "sku": "My4",
                    "esin": "Y4SX63I3A45",
                    "brand": "",
                    "additionalNames": {
                        "others": [
                            "My4"
                        ]
                    },
                    "status": "ACTIVE",
                    "weightUnit": "g"
                }
            }
        }
    ],
    "trackingId": "24343321002736",
    "courierName": "XpressBees"
}
```

{% endtab %}
{% endtabs %}

```json
curl --location --request POST 'http://wms.eshopbox.com/api/return' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_ACCESS_TOKEN' \
--data-raw '{
    "customerReturnNumber": "RET123456",
    "assignCourier": false,
    "customerOrderId": "ORD987654",
    "externalChannelID": "SHOPIFY",
    "pickup_type": "reverse",
    "refundAmount": "1500",
    "isCOD": false,
    "return_request_date": "2025-03-19 10:30:00",
    "repaymentType": "wallet",
    "pickupAddress": {
        "customerName": "John Doe",
        "addressLine1": "123, Main Street",
        "addressLine2": "Near City Park",
        "city": "Mumbai",
        "state": "Maharashtra",
        "postalCode": "400001",
        "countryCode": "IN",
        "countryName": "India",
        "contactPhone": "9876543210",
        "email": "johndoe@example.com"
    },
    "items": [
        {
            "lineItemSequenceNumber": "1001",
            "itemID": "ABC12345",
            "sku": "PROD56789",
            "quantity": "1",
            "returnReason": "Defective product",
            "additionalInfo": {
                "image": "https://example.com/image1.jpg",
                "comments": "Product is not working"
            },
            "itemImage": "https://example.com/realImage.jpg"
        }
    ]
}'
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://eshop.gitbook.io/eshopbox-developers/order/returns/create-a-return.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
