# Order Save as Draft

## Save Draft Order

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

#### 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                                                                                                                                                                                                                                                                                                                                                                                   |
| 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                                                                                                                                                                                                                                                                                                                                                                                                                               |
| 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>                                                                                                                                                                                                                                                                                            |
| payment\_due\_date                                   | date              | <p>Date of the bill.</p><p>Format: YYYY-MM-DD<br>(Required but conditional i.e. if payment\_status is 2 then)</p>                                                                                                                                                                                                                                                                                                                                  |
| bill\_no                                             | String            | The bill number, can be empty, or if you have any specific bill to save                                                                                                                                                                                                                                                                                                                                                                            |
| wholesale\_draft\_id                                 | number            | <p>The ID of the wholesale draft<br>(If draft order is being saved)</p>                                                                                                                                                                                                                                                                                                                                                                            |
| bill\_base                                           | String            | <p>Base for billing, accepts:<br>1. mrp<br>2. ptr (default)</p>                                                                                                                                                                                                                                                                                                                                                                                    |
| shipping                                             | String            | The cost of shipping if made                                                                                                                                                                                                                                                                                                                                                                                                                       |
| remark                                               | String            | Note for the Prescription                                                                                                                                                                                                                                                                                                                                                                                                                          |
| delivery\_note                                       | String            | Delivery notes if any                                                                                                                                                                                                                                                                                                                                                                                                                              |
| doctor\_id                                           | String            | Doctor ID                                                                                                                                                                                                                                                                                                                                                                                                                                          |

{% tabs %}
{% tab title="200 Order Saved successfully." %}

<pre class="language-json"><code class="lang-json"><strong>{
</strong>    "status_code": "1",
    "status_message": "Bill created successfully",
    "datetime": "2024-10-01 12:50:37",
    "data": {
        "chemist_order_id": "QlOCazEdBCkSk9qdEQF2qA==" // Order ID
    }
}
</code></pre>

{% endtab %}

{% tab title="200: OK Order failed." %}

```json
{
    "status_code": "0",
    "status_message": "Something broken. Please try again later.",
    "datetime": "2024-10-01 12:51:23",
    "data": null
}
```

{% endtab %}
{% endtabs %}


---

# 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://docs.evitalrx.in/api-for-b2b/orders/order-save-as-draft.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.
