Search products
1 min
GET
/api/v1/products
Query Parameters
- filter[search]stringDescription
- filter[service_package_id]integer
- filter[categories]integer[]Description
- filter[producer_ids]integer[]
- filter[aaha_codes]string[]
- filter[status]stringDescriptionDefaultactive
- filter[only_in_stock]booleanDefaultfalse
- filter[subset]stringDescription
- sortstring[]Description
- includestringDescription
Responses
200
- object
- dataobject[]
- idintegerExample
- namestringExample
- unitstringExample
- unitsobject
- 0stringExample
- 1stringExample
- sub_unitstringExample
- recommended_unit_pricestringExample
- recommended_subunit_pricenumberExample
- formulaintegerExample
- active_substancesstring
- administrationstring
- recommendationsstring
- fixed_feestringExample
- barcodestringExample
- producer_idstringExample
- clinic_idstringExample
- vatinteger
- is_controlledboolean
- statusbooleanExample
- linkslinks
- metameta
400
curl
curl --request GET \
--url '/api/v1/products?filter[status]=active&filter[only_in_stock]=false' \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'GET',
headers: myHeaders,
redirect: 'follow'
};
fetch("/api/v1/products?filter[status]=active&filter[only_in_stock]=false", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("/api/v1/products?filter[status]=active&filter[only_in_stock]=false")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Get.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/v1/products?filter[status]=active&filter[only_in_stock]=false"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
200
// Successful operation
{
"data": [
{
"id": 670,
"name": "Product Prof. Peter Dach",
"unit": "package",
"units": {
"0": "tablets",
"1": "package"
},
"sub_unit": "tablets",
"recommended_unit_price": "11.853",
"recommended_subunit_price": 1.6932857142857143,
"formula": 7,
"active_substances": "",
"administration": "",
"recommendations": "",
"fixed_fee": "0.000",
"barcode": "99425161",
"producer_id": "670",
"clinic_id": "3876",
"vat": 0,
"is_controlled": false,
"status": true
}
],
"links": {},
"meta": {}
}400