Querying

Filtering

Upodi has specific query-enabled endpoints, which means querying will not be enabled on any other endpoints than these. Results are returned as a Paged results and can be iterated by applying the paging attributes.

Example:

curl --location --request POST 'https://api-front.upodi.io/Customers/Query/' \
--header 'Authorization: Bearer {APIKey}' \
--header 'Content-Type: application/json' \
--header 'x-version: {version}' \
--data-raw '{
    "Filters" : [{
        "Field" : "AccountNumber",
        "Operator" : "==",
        "Value" : "388"
    }]
}'

Available Operators

OperatorSyntax
Equals== or equals
Not equal!= or ne
Greater than> or gt
Greater than or equals>= or gte
Less than< or lt
Less than or equals=< or lte

Samples

Search for invoices by date later than february 24th 2017, and total amount great than 400.

curl --location --request POST 'https://api-front.upodi.io/invoices/query/' \
--header 'Authorization: Bearer {APIKey}' \
--header 'Content-Type: application/json' \
--header 'X-Version: {api-version}' \
--data-raw '{
    "Filters" : [{
        "Field" : "InvoiceDate",
        "Operator" : ">",
        "Value" : "2017-02-24T07:30:00.00Z",
        "Logic" : "and"
    },
    {
        "Field" : "TotalAmount",
        "Operator" : ">",
        "Value" : "400"
    }]
}'

Ordering

You can also order the query results, which can be used in combination with the beforementioned filters or can be used on it's own. You can order ascending or descending on all available parameters from the object you are requesting. See our customer object and other objects for parameters.

Samples

curl --location --request POST 'https://api-front.upodi.io/invoices/query/' \
--header 'Authorization: Bearer {APIKey}' \
--header 'Content-Type: application/json' \
--header 'X-Version: {api-version}' \
--data-raw '{
    "OrderBy" : [{
        "Field": "InvoiceDate",
        "Descending": true"
    },
    {
        "Field": "InvoiceNumber"
    }]
}'