Get Salespop Datagraph

🔒

Requires price_rules access scope. More access scope

The Get Discount Code List API retrieves all discount codes associated with a specific price rule.

This API is especially useful for:

  1. Fetching all discount codes linked to a particular price rule.
  2. Managing and validating discount codes efficiently.
  3. Monitoring usage and details of all discount codes under a price rule.

Request Parameters

Public Request Parameters

📘

Public Request Parameters

Query Parameters

NameTypeDescriptionRequired/OptionalExample
typestringThe data type, e.g., bannerRequiredbanner
subtypestringThe data subtype, e.g., sales_pop_exposureRequiredsales_pop_exposure
begin_timeintThe datagraph begin time, in timestamp formatRequired1680000000
end_timeintThe datagraph end time, in timestamp formatRequired1680086400
tzintThe time zone offset, e.g., 8 for UTC+8Required8

Response Explanation

Public Response Parameters

📘

Public Response Parameters

Success Response

NameTypeDescriptionExample
checkoutintThe total number of checkouts0
clickintThe total number of clicks0
exposureintThe total number of exposures0
purchaseintThe total number of purchases0
salesintThe total sales generated0

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
500Internal Server ErrorInvalid input formatInternal Server Error

API Structure Overview

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