The Sale Report API allows retrieval of sales data. Authentication is required to securely access and manage your account information. Further details regarding the authentication process and requirements can be found in our documentation here.
http://api.shopper.com/v1/report/sales
Request body
Parameter | Type | Required | Values | Default |
---|---|---|---|---|
page | Number | Optional | 1 | |
limit | Number | Optional | 1-100 | 20 |
start_date | ISO Date | Optional | 2024-02-01T00:00:00 | Today's ISO date - 30 days |
end_date | ISO Date | Optional | 2024-02-28T00:00:00 | Today's ISO date |
order_by | String | Optional | transaction_date | -transaction_date | transaction_date |
commission_status | String | Optional | all | approved | pending | all |
payment_status | String | Optional | all | paid | pending | all |
subid | String | Optional | sub affiliate id |
Use the following optional parameters to retrieve the data in the desired format
page - Page number, please note that the starting page number is 1
limit - The maximum number of results to fetch, please note that the default limit is 20.
start_date - Start date in ISO format.
end_date - End date in ISO format.
order_by - This parameter allows sorting the results. For ascending order (default), use "transaction_date", and for descending order, prepend '-' before the value. For example, order_by=-transaction_date.
commission_status - To filter results based on commission status. Options include "all," "approved," or "pending."
payment_status - To filter out results by payment status, values can be "all" or "paid" or "pending".
subid - To Flter out results by subid, pass the corresponding sub affiliate ID and get the results specific to that id. Eg: subid=johndoe
Response status
Status | Reason |
---|---|
500 | Internal server error |
200 | Success |
400 | Invalid request parameters |
405 | API method is not allowed, contact admin to get access |
401 | Invalid authentication parameters |
Sample output
{
"status": 200,
"message": "OK",
"current": 1,
"start": 1,
"end": 1,
"limit": 20,
"total": 2,
"next_page": "https://api.shopper.com/v1/report/sales?page=2&limit=20",
"data": [
{
"reference": "dFtGed",
"commission_amount": 52,
"currency": "USD",
"commission_status": "approved",
"transaction_amount": 968,
"category": "product",
"transaction_date": "10-02-2024",
"payment_status": "paid",
"payment_date": "19-01-2023",
"product_slug": "WrsQ",
"product_name": "Jordan Max Aura 5 Men's Shoes. Nike INn",
"collection_slug": "CTbG",
"collection_name": "Nike Shoes",
"collection_url": "https://www.shopper.com/c/nike-shoes/ctbg",
"subid": "SaraSmith"
},
{
"reference": "eQtMVh",
"commission_amount": 56,
"currency": "USD",
"commission_status": "approved",
"transaction_amount": 1000,
"category": "product",
"transaction_date": "20-02-2024",
"payment_status": "paid",
"payment_date": "19-01-2023",
"product_slug": "GdlK",
"product_name": "Pacer Future Unisex Sneakers",
"collection_slug": "ZeFE",
"collection_name": "Puma Shoes",
"collection_url": "https://www.shopper.com/c/puma-shoes/zefe"
"subid": "DavidDoe"
}
]
}
Response body
reference: The unique identifier for sales recorded within the system.
commission_amount: Commission Amount earned from the sale
currency: ISO 4217 currency code representing the commission amount
commission_status: Status of the commission (approved, declined or pending)
transaction_amount: Total transaction amount of the sale
category: Category of the sale made product (coupon, referral or offer)
transaction_dete: Date of sale in dd-mm-yyyy format
payment_status: Status of money transfer/ payment for the corresponding sale pending | paid
payment_dete: Date of payment/ money transfer in dd-mm-yyyy format
product_slug: Unique ID representing product associated with the sale
product_name: Name of the product associated with the sale if applicable
collection_slug: The unique slug ID of the collection containing the product responsible for the sale.
collection_name: Name of the collection associated with the product
collection_url: Store URL of the collection related to the sale
subid: The unique sub ID transmitted to the system via the affiliate URL during a click action.
Response status
Status | Reason |
---|---|
500 | Internal server error |
200 | Success |
400 | Invalid request parameters |
405 | API method is not allowed, contact admin to get access |
401 | Invalid authentication parameters |