curl --request POST \
--url https://api-external.ezyid.io/api/inventory/query \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"clauses": [
{
"fieldId": "isConsumable",
"operator": "eq",
"value": true
},
{
"fieldId": "availableStockQty",
"operator": "lte",
"value": 5
}
]
},
"sort": [
{
"fieldId": "availableStockQty",
"direction": "asc"
}
],
"fields": [
"id",
"name",
"partNumber",
"siteName",
"qtyOnHand",
"availableStockQty",
"minQty"
],
"rows": 100
}
'import requests
url = "https://api-external.ezyid.io/api/inventory/query"
payload = {
"filters": { "clauses": [
{
"fieldId": "isConsumable",
"operator": "eq",
"value": True
},
{
"fieldId": "availableStockQty",
"operator": "lte",
"value": 5
}
] },
"sort": [
{
"fieldId": "availableStockQty",
"direction": "asc"
}
],
"fields": ["id", "name", "partNumber", "siteName", "qtyOnHand", "availableStockQty", "minQty"],
"rows": 100
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
clauses: [
{fieldId: 'isConsumable', operator: 'eq', value: true},
{fieldId: 'availableStockQty', operator: 'lte', value: 5}
]
},
sort: [{fieldId: 'availableStockQty', direction: 'asc'}],
fields: [
'id',
'name',
'partNumber',
'siteName',
'qtyOnHand',
'availableStockQty',
'minQty'
],
rows: 100
})
};
fetch('https://api-external.ezyid.io/api/inventory/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-external.ezyid.io/api/inventory/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'clauses' => [
[
'fieldId' => 'isConsumable',
'operator' => 'eq',
'value' => true
],
[
'fieldId' => 'availableStockQty',
'operator' => 'lte',
'value' => 5
]
]
],
'sort' => [
[
'fieldId' => 'availableStockQty',
'direction' => 'asc'
]
],
'fields' => [
'id',
'name',
'partNumber',
'siteName',
'qtyOnHand',
'availableStockQty',
'minQty'
],
'rows' => 100
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-external.ezyid.io/api/inventory/query"
payload := strings.NewReader("{\n \"filters\": {\n \"clauses\": [\n {\n \"fieldId\": \"isConsumable\",\n \"operator\": \"eq\",\n \"value\": true\n },\n {\n \"fieldId\": \"availableStockQty\",\n \"operator\": \"lte\",\n \"value\": 5\n }\n ]\n },\n \"sort\": [\n {\n \"fieldId\": \"availableStockQty\",\n \"direction\": \"asc\"\n }\n ],\n \"fields\": [\n \"id\",\n \"name\",\n \"partNumber\",\n \"siteName\",\n \"qtyOnHand\",\n \"availableStockQty\",\n \"minQty\"\n ],\n \"rows\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-external.ezyid.io/api/inventory/query")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"clauses\": [\n {\n \"fieldId\": \"isConsumable\",\n \"operator\": \"eq\",\n \"value\": true\n },\n {\n \"fieldId\": \"availableStockQty\",\n \"operator\": \"lte\",\n \"value\": 5\n }\n ]\n },\n \"sort\": [\n {\n \"fieldId\": \"availableStockQty\",\n \"direction\": \"asc\"\n }\n ],\n \"fields\": [\n \"id\",\n \"name\",\n \"partNumber\",\n \"siteName\",\n \"qtyOnHand\",\n \"availableStockQty\",\n \"minQty\"\n ],\n \"rows\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-external.ezyid.io/api/inventory/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"clauses\": [\n {\n \"fieldId\": \"isConsumable\",\n \"operator\": \"eq\",\n \"value\": true\n },\n {\n \"fieldId\": \"availableStockQty\",\n \"operator\": \"lte\",\n \"value\": 5\n }\n ]\n },\n \"sort\": [\n {\n \"fieldId\": \"availableStockQty\",\n \"direction\": \"asc\"\n }\n ],\n \"fields\": [\n \"id\",\n \"name\",\n \"partNumber\",\n \"siteName\",\n \"qtyOnHand\",\n \"availableStockQty\",\n \"minQty\"\n ],\n \"rows\": 100\n}"
response = http.request(request)
puts response.read_body{
"count": 123,
"start": 123,
"rows": 123,
"items": [
{}
]
}{
"error": "<string>"
}Query Inventory
Retrieve a list of stock items matching a dynamic filter.
curl --request POST \
--url https://api-external.ezyid.io/api/inventory/query \
--header 'Content-Type: application/json' \
--data '
{
"filters": {
"clauses": [
{
"fieldId": "isConsumable",
"operator": "eq",
"value": true
},
{
"fieldId": "availableStockQty",
"operator": "lte",
"value": 5
}
]
},
"sort": [
{
"fieldId": "availableStockQty",
"direction": "asc"
}
],
"fields": [
"id",
"name",
"partNumber",
"siteName",
"qtyOnHand",
"availableStockQty",
"minQty"
],
"rows": 100
}
'import requests
url = "https://api-external.ezyid.io/api/inventory/query"
payload = {
"filters": { "clauses": [
{
"fieldId": "isConsumable",
"operator": "eq",
"value": True
},
{
"fieldId": "availableStockQty",
"operator": "lte",
"value": 5
}
] },
"sort": [
{
"fieldId": "availableStockQty",
"direction": "asc"
}
],
"fields": ["id", "name", "partNumber", "siteName", "qtyOnHand", "availableStockQty", "minQty"],
"rows": 100
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
filters: {
clauses: [
{fieldId: 'isConsumable', operator: 'eq', value: true},
{fieldId: 'availableStockQty', operator: 'lte', value: 5}
]
},
sort: [{fieldId: 'availableStockQty', direction: 'asc'}],
fields: [
'id',
'name',
'partNumber',
'siteName',
'qtyOnHand',
'availableStockQty',
'minQty'
],
rows: 100
})
};
fetch('https://api-external.ezyid.io/api/inventory/query', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-external.ezyid.io/api/inventory/query",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'filters' => [
'clauses' => [
[
'fieldId' => 'isConsumable',
'operator' => 'eq',
'value' => true
],
[
'fieldId' => 'availableStockQty',
'operator' => 'lte',
'value' => 5
]
]
],
'sort' => [
[
'fieldId' => 'availableStockQty',
'direction' => 'asc'
]
],
'fields' => [
'id',
'name',
'partNumber',
'siteName',
'qtyOnHand',
'availableStockQty',
'minQty'
],
'rows' => 100
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-external.ezyid.io/api/inventory/query"
payload := strings.NewReader("{\n \"filters\": {\n \"clauses\": [\n {\n \"fieldId\": \"isConsumable\",\n \"operator\": \"eq\",\n \"value\": true\n },\n {\n \"fieldId\": \"availableStockQty\",\n \"operator\": \"lte\",\n \"value\": 5\n }\n ]\n },\n \"sort\": [\n {\n \"fieldId\": \"availableStockQty\",\n \"direction\": \"asc\"\n }\n ],\n \"fields\": [\n \"id\",\n \"name\",\n \"partNumber\",\n \"siteName\",\n \"qtyOnHand\",\n \"availableStockQty\",\n \"minQty\"\n ],\n \"rows\": 100\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-external.ezyid.io/api/inventory/query")
.header("Content-Type", "application/json")
.body("{\n \"filters\": {\n \"clauses\": [\n {\n \"fieldId\": \"isConsumable\",\n \"operator\": \"eq\",\n \"value\": true\n },\n {\n \"fieldId\": \"availableStockQty\",\n \"operator\": \"lte\",\n \"value\": 5\n }\n ]\n },\n \"sort\": [\n {\n \"fieldId\": \"availableStockQty\",\n \"direction\": \"asc\"\n }\n ],\n \"fields\": [\n \"id\",\n \"name\",\n \"partNumber\",\n \"siteName\",\n \"qtyOnHand\",\n \"availableStockQty\",\n \"minQty\"\n ],\n \"rows\": 100\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-external.ezyid.io/api/inventory/query")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"filters\": {\n \"clauses\": [\n {\n \"fieldId\": \"isConsumable\",\n \"operator\": \"eq\",\n \"value\": true\n },\n {\n \"fieldId\": \"availableStockQty\",\n \"operator\": \"lte\",\n \"value\": 5\n }\n ]\n },\n \"sort\": [\n {\n \"fieldId\": \"availableStockQty\",\n \"direction\": \"asc\"\n }\n ],\n \"fields\": [\n \"id\",\n \"name\",\n \"partNumber\",\n \"siteName\",\n \"qtyOnHand\",\n \"availableStockQty\",\n \"minQty\"\n ],\n \"rows\": 100\n}"
response = http.request(request)
puts response.read_body{
"count": 123,
"start": 123,
"rows": 123,
"items": [
{}
]
}{
"error": "<string>"
}Query Parameters
Body
Every part is optional. An empty object returns the first page of the subscriber's stock items.
Which rows to match, how to sort them, which fields to return and which page to read.
A set of clauses and nested groups joined by one operator. Groups may nest two levels deep and carry at most 20 clauses in total.
Show child attributes
Show child attributes
Shorthand window over the dataset's defaultDateFieldId. Supply either a preset or both from and to, never both. Windows are half-open in UTC: from is included, to is not.
Show child attributes
Show child attributes
At most two rules. The dataset's unique key always breaks ties, so paging is stable.
Show child attributes
Show child attributes
Field ids to return. Omit for every field in the dataset's catalog.
Rows to skip. Defaults to 0.
Page size, between 1 and 1000. Defaults to 100.
