> 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/place-order.md).

# Place Order

## <img src="https://static.vecteezy.com/system/resources/thumbnails/018/930/572/small/youtube-logo-youtube-icon-transparent-free-png.png" alt="" data-size="line"> [Placing Orders with Ease: A Step-by-Step Guide](https://youtu.be/1TlUVPaWolI?si=2ybv22QYp_P3w994)

## Place Order

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

Here is the sample cURL request to place a pick-up online order with prescriptions. Use form data to call the place order API, and push prescriptions in the **image** param:

{% file src="/files/pWruxFCsTFJqDPUCYVZk" %}

#### 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>          | String | <p>Stringified Array of items with quantity (in pills) and medicine\_id.</p><p><em>i.e.</em> \[{"medicine\_id":"Eli4pMFfzobV63G67jtjZw==","quantity": 10, "discount\_percentage": 5}]</p> |
| apikey<mark style="color:red;">\*</mark>         | String | Authentication token                                                                                                                                                                      |
| delivery\_type<mark style="color:red;">\*</mark> | String | Order Delivery type can be **pickup** or **delivery**                                                                                                                                     |
| address\_id<mark style="color:red;">\*</mark>    | String | Address ID from the address/list API.  required in case of the delivery\_type is "delivery"                                                                                               |
| parent\_patient\_id                              | String | If billing for family member, then pass parent patient's ID here.                                                                                                                         |
| order\_status                                    | String | It will save the order in the "draft" status.                                                                                                                                             |
| image                                            | File   | <p>Pass one or more prescription images in FormData.</p><p></p><p>allowed formats (png/jpg/jpeg)</p>                                                                                      |
| custom\_fields                                   | Object | <p>Key value pairs of attribute\_key and it's value.<br>For ex: <br>{"prescription\_id": "879", "appointment\_id": "123"}</p>                                                             |
| shipping                                         | Number | <p>Shipping charge for delivery<br>(Will round up the given value<br>For ex: </p><p>20.5 => 21</p><p>20.2 => 20 )</p>                                                                     |
| remark                                           | String | Optional field to include any specific notes or instructions associated with the order.                                                                                                   |

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

```
{
    "status_code": "1",
    "status_message": "Order placed successfully",
    "datetime": "2022-12-06 18:46:31",
    "data": {
        "order_id": "/6vMKQj0JOB9GvN+6I27zg==",
        "order_number": "OJLBC8WC1I"
    }
}
```

{% endtab %}

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

```json
{
    "status_code": "0",
    "status_message": "Something went wrong",
    "datetime": "2022-12-06 18:47:41",
    "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/place-order.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.
