> 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-b2b/orders/order-return-save.md).

# Order Return Save

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

#### Request Body

| Name                                                 | Type              | Description                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| ---------------------------------------------------- | ----------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| bill\_date<mark style="color:red;">\*</mark>         | date              | <p>Date of the bill.</p><p>Format: YYYY-MM-DD</p>                                                                                                                                                                                                                                                                                                                                                                                                  |
| buyer\_chemist\_id<mark style="color:red;">\*</mark> | String            | Id to uniquely identify the chemist for whom the order is placed                                                                                                                                                                                                                                                                                                                                                                                   |
| 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>                                                                                                                                                                                                                                                                                            |
| 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><em>i.e.</em> \[{"medicine\_id":"TF7Wm49nceLV+NmoM6HJYw==","batch":"WER321","expiry":"2030-02-01","mrp":23.5,"price\_to\_retailer":15.85,"quantity":10,"free":0,"hf":0,"base\_price":15.85,"discount\_percentage":0,"scheme\_amount":0,"gst\_percentage":12,"cess\_percentage":5}]</p> |
| apikey<mark style="color:red;">\*</mark>             | String            | Authentication token                                                                                                                                                                                                                                                                                                                                                                                                                               |
| bill\_no                                             | String            | The bill number should match the bill number from sales in order to create sales return bill                                                                                                                                                                                                                                                                                                                                                       |
| remark                                               | String            | Note for the Prescription                                                                                                                                                                                                                                                                                                                                                                                                                          |
| delivery\_note                                       | String            | Delivery notes if any                                                                                                                                                                                                                                                                                                                                                                                                                              |
| doctor\_id                                           | String            | Doctor ID                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| wholesale\_order\_id                                 | Number            | The ID of the related wholesale order                                                                                                                                                                                                                                                                                                                                                                                                              |
|                                                      |                   |                                                                                                                                                                                                                                                                                                                                                                                                                                                    |

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

```json
{
    "status_code": "1",
    "status_message": "Bill created successfully",
    "datetime": "2024-10-01 14:56:06",
    "data": {
        "chemist_wholesale_return_id": "f4Prpako4VmiRuhdUA8gYg==" // Return Order ID
    }
}
```

{% endtab %}

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

```json
{
    "status_code": "0",
    "status_message": "bill_date must be in [YYYY-MM-DD, YYYY-MM-D, YYYY-M-D, YYYY-M-DD] format",
    "datetime": "2024-10-01 15:07:27",
    "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-b2b/orders/order-return-save.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.
