API Modules

Overview

 

Configured modules:

https://test-api.logiaction.nl/site/v2

 

Filtering Request

End user is usually expected to provide optional filtering conditions in the request by one or more of the allowed methods (which should be explicitly stated in the API documentation). For example, if filtering is handled via POST method using JSON it can be something similar to:

{
    "filter": {
        "id": {"in": [2, 5, 9]},
        "title": {"like": "cheese"}
    }
}

The above conditions are:

  • id must be either 2, 5, or 9 AND
  • title must contain the word cheese.

The same conditions sent as a part of GET query are:

?filter[id][in][]=2&filter[id][in][]=5&filter[id][in][]=9&filter[title][like]=cheese

You can change the default filter key word by setting yii\data\DataFilter::$filterAttributeName.

Filter Control Keywords

The default list of allowed filter control keywords is as the following:

filter control translates to
and AND
or OR
not NOT
lt <
gt >
lte <=
gte >=
eq =
neq !=
in IN
nin NOT IN
like LIKE

Voorbeelden

Vind het adres: zoek in extern nummer

https://test-api.logiaction.nl/site/v2/common-address?filter[external_number][like]=123

Vind het StockId mbv item_id

https://test-api.logiaction.nl/site/v2/stock?filter[item_id][eq]=10010