Product Queries
This section documents the GraphQL queries available for retrieving information about products in the YSCP platform. Product queries allow you to fetch details about product attributes, pricing, availability, and related products.
Available Queries
The following product queries are available:
- ProductCountQuery - Retrieves the total count of products matching specified filters, useful for pagination and inventory analysis.
- ProductQuery - Retrieves detailed information about a specific product, including attributes, pricing, availability, and related products.
- ProductsQuery - Retrieves a list of products matching specified filters, with support for pagination, sorting, and filtering by various attributes.
Common Parameters
Most product queries require the following parameters:
skuorid: The unique identifier of the product to retrieve information aboutsiteId: (Optional) The site ID where the product is available
Product Structure
The product structure returned by product queries typically includes:
- Basic Information: Name, SKU, description, and other basic details
- Attributes: Product attributes such as color, size, and other characteristics
- Pricing: Base price, special price, tier pricing, and other pricing information
- Images: Product images and thumbnails
- Availability: Stock status, quantity available, and backorder information
- Categories: Categories the product belongs to
- Related Products: Cross-sells, up-sells, and related products
- Reviews: Product reviews and ratings
Filtering and Sorting
Product queries support filtering and sorting to help you find specific products or organize results in a particular way. Common filtering options include:
- Filter by category
- Filter by price range
- Filter by attribute values
- Filter by availability
Examples
Each query documentation includes examples showing how to use the query and what response to expect.