Requires read_product access scope. For more access scope
The Product Total Count API retrieves the total number of products that match specific filter criteria. It allows you to query the product catalog using various parameters, such as creation date, update date, published status, or collection ID, providing a count of products without fetching their full details.This API is especially useful for:
Analytics and Reporting: Obtain a count of products for detailed insights and reporting purposes.
Pagination Optimization: Use the count to calculate total pages or optimize data retrieval processes.
The total number of products matching the filters.
Error Response
Error responses in the API can be represented using two different fields: errors and error. Both fields provide details about issues encountered during request processing. Below is an explanation of the fields with their respective examples and descriptions.
Field
Type
Example
Description
errors
Array
["created_at_max time format error"]
A list of errors encountered during the request processing.
Field
Type
Example
Description
error
Array
"store is not active"
Indicates an error encountered during the process.
Error Details
Status Code
Message
Possible Reason
Example Response
422
failed verification: the published status is invalid
The published_status provided is not one of the allowed values.
{"errors": ["failed verification: the published status is invalid"]}
created_at_min time format error
The created_at_min field is not in a valid time format.(e.g., not ISO8601).
{"errors": [" created_at_min time format error""]}
created_at_max time format error
The updated_at_max field is not in a valid time format.(e.g., not ISO8601).
{"errors": ["created_at_max time format error"]}
published_at_max time format error
The published_at_max field is not in a valid time format.(e.g., not ISO8601).
{"errors": ["published_at_max time format error"]}
published_at_min time format error
The published_at_min field is not in a valid time format.(e.g., not ISO8601).
{"errors": ["published_at_min time format error"]}
update_at_min time format error
The update_at_min field is not in a valid time format.(e.g., not ISO8601).
{"errors": ["update_at_min time format error"]}
update_at_max time format error
The update_at_max field is not in a valid time format.(e.g., not ISO8601).
{"errors": ["update_at_min time format error"]}
Invalid cursor or pre_cursor type
500
no_context
Missing Context
{"errors": ["No context"]}
API Structure Overview
Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!