In this article you can find more information about how to define and encode request payloads.
Encoding
The JSON payload for PUT and POST methods must be UTF-8 encoded.
The parameter names and values must be UTF-8 encoded.
The parameter values must be escaped in case they contain special characters like:
/ ? : @ - . _ ~ ! $ & ' ( ) * + , ; =
Condition Parameters
Some endpoints allow you to specify parameters in the query string that are used to filter results (e.g. all things located in UK).
You can define multiple conditions, and all conditions are evaluated in AND on the target collection.
Property based condition can use on one of the following predicates to check values:
Comparison Predicates | |
Equal | Checks if the value in a property matches a specific value. Evaluation: case-sensitive Compatible Types: STRING | NUMBER | BOOLEAN
|
Not equal | Checks if the value in a property does not match a specific value. Evaluation: case-sensitive Compatible Types: STRING | NUMBER | BOOLEAN
|
Exists | Check the nullness of a property. Compatible Types: STRING | NUMBER | BOOLEAN | OBJECT
|
Like | Checks if the value in a property matches a pattern with wildcards. Evaluation: NOT case-sensitive Compatible Types: STRING
|
Not like | Checks if the value in a property does not match a pattern with wildcards. Evaluation: NOT case-sensitive Compatible Types: STRING
|
Set-Based Predicates | |
In | Checks whether the value of a property is contained in a given set of values. Evaluation: NOT case-sensitive Compatible Types: STRING | NUMBER | BOOLEAN
|
Not in | Checks whether the value of a property is not contained in a given set of values. Evaluation: NOT case-sensitive Compatible Types: STRING | NUMBER | BOOLEAN
|
Number-Based Predicates | |
Greater than | Checks if the value in a property is strictly greater than a specific value. Compatible Types: NUMBER
|
Greater than or equal to | Checks if the value in a property is greater than or equal to a specific value. Compatible Types: NUMBER
|
Less than | Checks if the value in a property is strictly less than a specific value. Compatible Types: NUMBER
|
Less than or equal to | Checks whether the value of a property is less than or equal to a specific value. Compatible Types: NUMBER
|
Here is an example of request to get all things with a condition on serial number and country.
GET {{baseUrl}}/v2/inventory/things?serialNumber=like;sw*&location.country=eq;Italy