> For the complete documentation index, see [llms.txt](https://docs.evitalrx.in/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.evitalrx.in/api-for-patient-app/orders/order-return.md).

# Order Return

## Make Sales Return bill with API

<mark style="color:green;">`POST`</mark> [`{{apiUrl}}patient/orders/sales_return`](https://api.evitalrx.in/v1/patient/orders/sales_return)

This API will make a Sales Return bill. chemist no need to go to the eVitalRx portal to complete the Return bill.

#### Request Body

| Name                                              | Type              | Description                                                                                                                                                                                                                                                                                                                                                                         |
| ------------------------------------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| patient\_id<mark style="color:red;">\*</mark>     | String            | Id to uniquely identify the patient for whom the order is placed                                                                                                                                                                                                                                                                                                                    |
| items<mark style="color:red;">\*</mark>           | Stringified Array | <p>List of items with quantity (in pills). </p><p>All  the params are required shown below. </p><p>Medicine Id and batch should have unique combination. </p><p></p><p><em>i.e.</em> \[{ "medicine\_id": "vjalpzMV0E33BLwzzLR6fQ==", "batch": "FRESH", "expiry": "2025-12-01", "mrp": 36.1, "quantity": 2, "discount": 0, "gst\_percentage": 12, "cess\_percentage": 0}]</p><p></p> |
| apikey<mark style="color:red;">\*</mark>          | String            | Authentication token                                                                                                                                                                                                                                                                                                                                                                |
| patient\_name<mark style="color:red;">\*</mark>   | String            | Name of the Patient                                                                                                                                                                                                                                                                                                                                                                 |
| remark                                            | String            | Note for the Order Return.                                                                                                                                                                                                                                                                                                                                                          |
| order\_date<mark style="color:red;">\*</mark>     | String            | <p>Date of the bill. </p><p>Format: YYYY-MM-DD</p><p></p>                                                                                                                                                                                                                                                                                                                           |
| payment\_status<mark style="color:red;">\*</mark> | Number            | <p>To choose payment mode of the order. </p><p>1: CASH </p><p>2: CREDIT </p><p>3: UPI </p><p>4: CHEQUE </p><p>5: PAYTM </p><p>6: CC/DC </p><p>7: RTGS/NEFT</p>                                                                                                                                                                                                                      |
| quantity\_type                                    | strip \| loose    | <p>\[strip]: The quantity you are passing will considered as strip </p><p>\[loose]: The quantity you are passing will considered as pills</p>                                                                                                                                                                                                                                       |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "status_code": "1",
    "status_message": "Return order added successfully.",
    "datetime": "2023-03-09 18:44:25",
    "ng_version": "0.0.371",
    "data": {
        "order_id": "UpQGYF77Y97maydwXEaVXQ=="
    }
}
```

{% endtab %}

{% tab title="200: OK Validation Error" %}

```json
{
    "status_code": "0",
    "status_message": "Patient Name length must be less than or equal to 50 characters long",
    "datetime": "2023-03-09 18:37:21",
    "data": null
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.evitalrx.in/api-for-patient-app/orders/order-return.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
