Meditroc and Farmadeals allow users to look for missing products. E-mails are sent to other members to notify them of new product searches.
The protocol described below allows us to optimize the delivery procedure, by contacting only pharmacies that have the product in their inventory. This is a webservice that allows you to know which products are being looked for, and to let us know which pharmacy has a searched product in its inventory and which one does not.
If you wish to integrate this protocol, please contact us.
This webservice requires an access key. If you have not received one, please contact us so that we can provide one. This key is sent in POST payloads.
Every request data is encoded in JSON.
In order to retreive the search products, you must interrogate the following URL with a POST request:
The payload has to be a JSON map, containing the following keys:
For example :
This method will return stock requests that the pharmacy has to fulfill.
The returned HTTP codes are the following.
| HTTP Code | Description | Example |
|---|---|---|
| 200 | Requests in progress have been retrieved, the searched product list is returned. The cnk key will contain product CNKs that have to be looked into the inventory. |
{
"cnk": [1, 2, 3] } |
| 401 | The APB number is invalid. | |
| 500 | An error occured, the description is in the response's body. |
By default, every searched product without an answer is returned.
If you wish to limit the number of products to look into the inventory, you can add the query parameter maxQueries.
For example:
In order to send an answer to searched products, you must interrogate the following URL with a POST request:
The payload has to be a JSON map, containing the following keys:
For example:
The returned HTTP codes are the following.
| HTTP Code | Description |
|---|---|
| 200 | The inventory has been sent. No returned value is provided. |
| 401 | The APB number is invalid. |
| 500 | An error occured, the description is in the response's body. For example, you might have forgotten the "cnks" key in the payload. |
You can test your developments using our test API.