Order Management
List or create provider orders using the fields in the API definition.
GET /orders
Fetch all orders for a provider.
Inputs
| Location | Field | Type | Required |
|---|---|---|---|
| query | status | string | No |
| query | page | integer | No |
| query | limit | integer | No |
Example
GET https://dispensaryapi.famasi.africa/api/v1/providers/orders?status={value}&page={value}&limit={value}Returns 200 with these fields in data:
| Field | Type |
|---|---|
id | string |
delivery_fee | number |
sub_total | number |
total | number |
status | string |
created_at | string |
updated_at | string |
patient | object |
Errors: 401 provider not authenticated, 500 internal server error.
POST /orders
Create a new order for a provider.
Inputs
| Location | Field | Type | Required |
|---|---|---|---|
| body | items | array | Yes |
| body | address | string | Yes |
| body | user_first_name | string | Yes |
| body | user_last_name | string | Yes |
| body | user_email | string | Yes |
| body | user_phone_number | string | Yes |
| body | user_dial_code | string | Yes |
| body | delivery_type | string | No |
| body | additional_notes | string | No |
| body | items[].id | string | No |
| body | items[].Product_Name | string | No |
| body | items[].Strength | string | No |
| body | items[].SI_Unit | string | No |
| body | items[].Selling_Price | number | No |
| body | items[].quantity | integer | No |
Example
POST https://dispensaryapi.famasi.africa/api/v1/providers/ordersReturns 201 with these fields:
| Field | Type |
|---|---|
order | object |
Errors: 400 missing required fields, 404 user or provider not found, 500 internal server error.
Authentication
Send a provider API key as x-api-key. Provider API keys →