Price Rule 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:

  1. Checking the total number of active and inactive price rules in your store.
  2. Providing a quick overview of discount rules without retrieving their details.
  3. Integrating the count with dashboards or reports for summary analytics.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Successful Response

FieldTypeDescriptionExample
countstringTotal 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.

FieldTypeExampleDescription
errorsArray[ "invalid line_item id"]A list of errors encountered during the request processing.
FieldTypeExampleDescription
errorString "store is not active"Indicates an error encountered during the process

Error Detail

Status CodeMessagePossible ReasonExample Response
400Bad RequestInvalid input format or request structure (e.g., missing required fields or incorrect data types).Bad Request
UnauthorizedThe request is missing valid authentication credentials or the credentials provided are invalid.Unauthorized

API Structure OverviewV

Language
Credentials
Header
URL
Click Try It! to start a request and see the response here!