# Filter Attribute Sets

Filters the tenant's <b>Attribute Set</b> resources using OData query options (<b>$select</b>, <b>$expand</b>, <b>$filter</b>, <b>$orderby</b>, <b>$skip</b>, <b>$top</b>, <b>$skipToken</b>). Result's paging is done using the default paging size options.
<b>Parameters details</b>
<para>
<b>
<i>X-API-KEY</i>
</b>
Custom HTTP request header containing the API key used for authentication.
<b>
<i>Accept-Language</i>
</b>
Standard HTTP request header indicates the natural language and locale that the client prefers.
It can take one of the following values:
<b>*</b> : All the localized content is available in the result, regardless of the culture . This option is currently disabled.
<b><i>null</i></b> : The content localized in the default culture is available in the result.
<b>culture-code</b> : The content localized in the specified culture is available in the result.
Specifying various culture codes or q-factor weighting are currently disabled.
<i>Examples:</i>
- Expression <b>es</b> returns the content localized in the culture <b>es</b>.
- Expression <b>en-us</b> returns the content localized in the culture <b>en-us</b>.
<b>
<i>$select</i>
</b>

Expression describing the list of <b>Attribute Set</b> resource properties to be included in the result.
The full list of the available <b>Attribute Set</b> resource properties is available in the JSON schema returned by the <b>/AttributeSets/$metadata</b> endpoint.
The name of the <b>Attribute Set</b> resource properties (both implicit and custom properties) must be specified.
Currently, the API does not support selecting the properties of an embedded resource or the properties of a resource within an embedded collection.
The expression follows the format: <b>ATTRIBUTE_SET_PROPERTY1_NAME{, ATTRIBUTE_SET_PROPERTY2_NAME...}</b>.
<i>Examples:</i>
- Expression <b>typ_title</b> includes in the result only the property <b>typ_title</b> of the current resource (<b>Attribute Set</b>).
- Expression <b>typ_stat,typ_title</b> includes in the result only the properties <b>typ_stat</b> and <b>typ_title</b> of the current resource (<b>Attribute Set</b>).
<b>
<i>$expand</i>
</b>

Expression describing the list of collections embedded in the <b>Attribute Set</b> resource (<b>Products</b>) to be included in the result.
By default (if no value is supplied to this parameter), the result doesn't include the embedded collections (<b>Products</b>).
The expression follows the format: <b>EMBEDDED_COLLECTION_OF_RESOURCE1_NAME{,EMBEDDED_COLLECTION_OF_RESOURCE1_NAME...}</b>.
Currently only the embedded collections are supported, not the embedded resources.
<i>Examples:</i>
- Expression <b>Products</b> includes in the result the number elements of the <b>Products</b> resource, embedded in the current resource (<b>Attribute Set</b>).
<b>
<i>$filter</i>
</b>

Expression describing the filters applied to the resources included in the result.
By default (if no value is supplied to this parameter), no filters are applied
Currently, filtering on the nested resources properties is not supported.
The expression follows the ODATA version 4.01 URI conventions (http://docs.oasis-open.org/odata/odata/v4.01/odata-v4.01-part2-url-conventions.html).
The following filter options are currently supported:
- logical operators (<b>eq</b>, <b>ne</b>, <b>gt</b>, <b>lt</b>, <b>ge</b>, <b>le</b>, <b>or</b>, <b>and</b>, <b>in</b>)
- functions: string functions (<b>contains</b>, <b>startswith</b>, <b>endswith</b>)

Currently it supports only the operators and functions applied on the properties of the root resource (<b>Category</b>).
The logical operators/functions are applied over the data types of the corresponding properties in the filter criteria:
- integer : <i>property_of_type_integer lt -100</i>
- big integer: <i>property_of_type_big_integer gt 10000</i>
- double: <i>property_of_type_double ge 0.31415926535897931e1</i>
- decimal: <i>property_of_type_decimal eq 12.34</i>
- string: <i>property_of_type_string eq 'Hello world!'</i>
- date: <i>property_of_type_date eq 2023-12-01</i>
- date time offset: <i>property_of_type_datetimeoffset lt 2012-12-03T07:16:23Z</i> or <i>property_of_type_datetimeoffset lt 2012-12-03T07:16:23+00:00</i> or <i>property_of_type_datetimeoffset lt 2012-12-03</i>
Further examples:
- <i>contains(property1, 'stringValue1')</i>
- <i>endswith(property1, 'stringValue1')</i>
- <i>startswith(property1, 'stringValue1')</i>
- <i>property1 in (value1, value2)</i>
- <i>property1 gt integerValue1 and property2 eq 'stringValue1'</i>
- <i>property1 gt integerValue1 or property2 eq 'stringValue1'</i>
- <i>(property1 eq 'stringValue1' or property1 eq 'stringValue2') and (contains(property2, 'stringValue3') or startsWith(property3, 'stringValue4') or startsWith(property4, 'stringValue5'))</i>
<b>
<i>$orderby</i>
</b>

Expression describing the ordering applied to the properties of resources included in the result.
By default (if no value is supplied to this parameter), no sorting is applied.
Currently, ordering on multiple properties and ordering on embedded resources properties are not supported.
The expression follows the format: <b>RESOURCE_PROPERTY_NAME (asc)|desc</b>.
<i>Examples:</i>
- Expression <b>typ_title</b> orders the result <b>ascendingly</b> on the property <b>typ_title</b> of the current resource (<b>Attribute Set</b>).
- Expression <b>typ_title asc</b> orders the result <b>ascendingly</b> on the property <b>typ_title</b> of the current resource (<b>Attribute Set</b>).
- Expression <b>typ_stat desc</b> orders the result <b>descendingly</b> on the property <b>typ_stat</b> of the current resource (<b>Attribute Set</b>).
<b>
<i>$skip</i>
</b>

Expression setting up result's paging according to the <b>limit and offset paging strategy</b>.
Using this paging strategy involves using both <b>$skip</b> and <b>$top</b> parameters.
We recommend <b>limit and offset paging strategy</b> for the extraction of data where $orderby clauses needs to be applied to the data to be extracted.
<b>limit and offset paging</b> is not as fast as the <b>continuation token paging</b>, but has 2 advantages over the later:
- the possibility of applying sorting on the result;
- a fine control over the data extracted.

The expression follows the format: NUMBER_OF_ITEMS_TO_BE_SKIPPED_IN_THE_RESULT.
The page size for the <b>Attribute Set</b> resource is limited by default to 100 items.
The paging is performed through resource (<b>Attribute Set</b>), not through the resources in the embedded collections.
<i>Examples:</i>
- Expression <b>1000</b> returns the <b>Attribute Set</b> items starting from the 1001st element in the result.
<b>
<i>$skipToken</i>
</b>

Expression setting up the continuation token used in paging the result.
The expression follows the format: [CONTINUATION_TOKEN].
The page size for the <b>Attribute Set</b> resource is limited to 1 item.
The paging is performed through resource (<b>Attribute Set</b>), not through the resources in the embedded collections.
<i>Examples:</i>
- Expression <b>123456789</b> limits the <b>Attribute Set</b> items to the <b>next default</b> number of items, starting from the continuation token <b>123456789</b>.
<b>
<i>$top</i>
</b>

Expression setting up the number of items in the result.
The expression follows the format: [PAGE_SIZE].
The page size for the <b>Attribute Set</b> resource is limited to 1 item.
The paging is performed through resource (<b>Attribute Set</b>), not through the resources in the embedded collections.
<i>Examples:</i>
- Expression <b>10</b> limits the <b>Attribute Set</b> items to the first 10 elements, given the other filter, sorting and paging criteria.
<b>See also:</b> A newer version of this endpoint is available at <b>GET /v2/AttributeSets</b>.
The v2 endpoint returns a structured response (<b>GetAttributeSetsResponse</b>) that includes form layout configuration (<b>ProductLayout</b>, <b>VariantLayout</b>) and is not interchangeable with the OData-style response returned by this endpoint.

</para>

Endpoint: GET /AttributeSets
Version: 2.0.0

## Query parameters:

  - `$filter` (string)

  - `$orderby` (string)

  - `$skip` (integer)

  - `$skipToken` (string)

  - `$top` (integer)

  - `$select` (string)

  - `$expand` (string)

## Header parameters:

  - `X-API-KEY` (string)
    Tenant's API key

  - `Accept-Language` (string)
    The localization cultures

## Response 200 fields (application/json):

  - `@readLink` (string)

  - `@nextLink` (string)

  - `@deltaLink` (string)

  - `@context` (string)

  - `value` (any)

  - `@count` (integer)

## Response 401 fields (application/json):

  - `message` (string)

  - `request_id` (string)

## Response 403 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 404 fields (application/json):

  - `type` (string)

  - `title` (string)

  - `status` (integer)

  - `detail` (string)

  - `instance` (string)

## Response 500 fields (application/json):

  - `error` (string)

  - `details` (any)

