📦Send Order Request

This API is used to send a medication request from a client to the DrugNet portal.

Endpoint: POST /send_request_web

Send Request Web

POST /send_request_web

Send a medication request from a client to the DrugNet portal..

Request Body

NameTypeDescription

client_id*

integer

The ID of the client submitting the request

prescription

String

The prescription or reason for the request.

order_items

JSON array

An array of objects specifying the items in the order. Each object should have name (string) and quantity (integer) properties.

insurance

String

Insurance company

insurance_card

String

The insurance card id

recipient

String

Recipient phone number

location

String

Location to deliver drugs

file

file

The file to be uploaded, representing additional information or images related to the request.

{
    "code": 200,
    "success": true,
    "message": "Order sent successfully"
}

Take a look at how you might call this method using our official libraries, or via curl:

curl --location '/send_request_web' \
--header 'x-api-key: YOUR API KEY' \
--form 'client_id="YOUR CLIENT ID"' \
--form 'prescription="YOUR PRESCRIPTION"' \
--form 'order_items="[{\"name\": \"drug 1\", \"quantity\": 2}, {\"name\": \"drug 2\", \"quantity\": 3}]"' \
--form 'file=@"YOUR FILE"'

Example

{
  "client_id": 28378,
  "prescription": "Headache",
  "order_items": [
    {"name": "drug 1", "quantity": 2},
    {"name": "drug 2", "quantity": 3}
  ],
  "file": [file content]
}

In case of errors, the API will return a JSON object with a success field indicating whether the request was successful, and a corresponding error message in the message field.

Last updated