get https://{subdomain}.myshoplaza.com/openapi/2022-01/price_rules/count
Requires
price_rules
access scope. More access scope
The Price Rule Count API retrieves the total number of price rules available in your store.
This API is especially useful for:
- Checking the total number of active and inactive price rules in your store.
- Providing a quick overview of discount rules without retrieving their details.
- Integrating the count with dashboards or reports for summary analytics.
Request Parameters
Public Request Parameters
Response Explanation
Public Response Parameters
Successful Response
Field | Type | Description | Example |
---|---|---|---|
count | string | Total number of price rules. | "22" |
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 | [ "invalid line_item id"] | A list of errors encountered during the request processing. |
Field | Type | Example | Description |
---|---|---|---|
error | String | "store is not active" | Indicates an error encountered during the process |
Error Detail
Status Code | Message | Possible Reason | Example Response |
---|---|---|---|
400 | Bad Request | Invalid input format or request structure (e.g., missing required fields or incorrect data types). | Bad Request |
Unauthorized | The request is missing valid authentication credentials or the credentials provided are invalid. | Unauthorized |