Best Practices
Querying Data
How to query data with the SKULabs API
The SKULabs API presents MongoDB-like querying capabilities. This allows you to filter and sort data to retrieve only the information you need.
Required Parameters
To query against SKULabs collections, 4 parameters are required. We’ve included them below.
- selector
- sort
- limit
- skip
Example
Selector
Use the selector field to help filter queries. Commonly available fields are included below.
Common Fields
- name
- sku
- upc
- start_date
- end_date
- items
- listings
- custom_fields
- barcodes
- listing_sku
- tags
- fulfillment_sku
- variants
- status
- type
- batch_number
- provider
- order_number
- service
- tracking_number
Example
Sort
Use the sort field to help sort returned documents. Commonly available fields are included below.
Common Fields
- name
- sku
- upc
- type
- store_id
- listing_sku
- fulfillment_sku
- order_number
- status
- batch_number
- date
Example
Limit
Limit represents an integer that is used to limit the number of documents returned. By default, it is 10.
Example
Skip
Skip represents an integer that is used to aid in pagination. By default, it is 0.