Retrieving quotes

GET {{api-url}}/quote/{{tenant}}/quotes?pageSize=60&pageNumber=1&sort=<string>&q=<string>&fields=<string>

Retrieves quotes. The response includes either all quotes or a subset of quotes based on the assigned access token scopes.


Required scopes (one of)

  • quote.quote_read - assigned to employees to allow them to retrieve all tenant quotes
  • quote.quote_read_own - assigned to customers to enable them to retrieve only the quotes that they created themselves or that were created on their behalf

Request Params

KeyDatatypeRequiredDescription
pageSizenumberNumber of items to be retrieved per page.
pageNumbernumberPage number to be retrieved. The number of the first page is 1.
sortstringList of properties used to sort the results, separated by commas. The order of properties indicates their priority in sorting.

Possible values:

  • {fieldName}
  • {fieldName}.asc
  • {fieldName}.desc

Note: If you want to sort the results by localized properties, the possible values are:

  • {fieldName}.{language}
  • {fieldName}.{language}.asc
  • {fieldName}.{language}.desc

If the sorting direction is not specified, the fields are sorted in ascending order. | | q | string | | A standard query parameter is used to search for specific values.

  • Searching for items by string-based properties:
    • By a field value: q=siteCode:main, where siteCode is the field name, and main is its desired value.
    • By a localized field value: q=items.product.name.en:apple_lobo, where name is the field name of product, en is the language code, and apple_lobo is the field value expressed in the specified language. Note: This query works only for localized fields, which are stored in a map format, where key is the language code and value is the translation to particular language.
  • Searching for items by a number-based property:
    • With a specific value: q=items.quantity.quantity:20
    • With a value greater than: q=items.quantity.quantity:&gt;20
    • With a value lower than: q=items.quantity.quantity:&lt;20
    • With a value greater than or equal to: q=items.quantity.quantity:&gt;=20
    • With a value lower than or equal to: q=items.quantity.quantity:&lt;=20
    • With a value within a range of values: q=items.quantity.quantity:(&gt;=10 AND &lt;=20)
      where items.quantity.quantity is the name of the number-based field, and 20 is its querying value.
  • Searching for items by a date-based property: All numer-based property queries are also valid for dates. In that case, the date should be placed within double quotes: q=metadataCreatedAt:(&gt;=&quot;2021-05-18T07:27:27.455Z&quot; AND &lt;&quot;2021-05-20T07:27:27.455Z&quot;)
  • Searching for items by a boolean-based property: q=description.multiLanguage:true, where description.multiLanguage is the boolean field name, and true is its desired value.
  • Searching for items with a nonexistent or empty property: q=description.en:null, where description.en is the field that has its value set to null.
  • Searching for items with an existing property: q=mixin:exists, where mixin is the field that has a non-empty value.
  • Searching for items by multiple specific values: q=id:(5c3325baa9812100098ff48f,5c3325d1a9812100098ff494), where id is the field name, and strings within the bracket are the desired values.
  • Searching for items by multiple fields: q=id:5c3325baa9812100098ff48f siteCode:main where id and siteCode are field names. All objects that contain the specified values are returned. Multiple fields (separated by space) can be specified. Multiple values for each field can also be specified in the format presented earlier.
  • Searching for items with string-based properties conforming to a regex: q=siteCode:~ain or q=code:(~U PL) - in case of searching for strings with space, where siteCode is the name of the field, and ain or U PL is its querying regex.
  • Searching for items with a localized string-based property conforming to a regex: items.product.name.en:~(Joghurt im) - where name is the product field name, en is the desired language, and Joghurt im is the search term. | | fields | string | | Fields to be returned in the response.

When this parameter is passed, only the id and {fieldName} are retrieved for each entry. You can specify multiple fields by separating them with commas. |

HEADERS

KeyDatatypeRequiredDescription
Accept-LanguagestringList of language codes acceptable for the response. You can specify factors that indicate which language should be retrieved if the one with a higher factor was not found in the localized fields. If a value is specified, then it must be present in the tenant configuration.
  • If the header is set to a particular language or a list of languages, all localized fields are retrieved as strings.
  • If the header is set to *, all localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages.
  • If the header is empty, localized fields are retrieved in the default language defined in the Configuration Service. | | X-Total-Count | boolean | | Flag indicating whether the total number of retrieved items should be returned. | | Accept | string | | |