Web Scraper worked but now does not

I built a web scraper to pull daily sales information/per location as the data was not readily available via API. After working for a few months, there is now a captcha at the login…why…Can an API be added to pull the daily sales by location?

:wave: With the Payments API and the Order API you can pull all sales data for each of your locations. :slightly_smiling_face:

Bryan, that is a very Generic answer to a very specific question of pulling daily sales stats. I posted the question after I had already reviewed the API references and have tried to create a python script that emulates what was being done in the web scraper that was broken by the change made with the captcha. There is nothing that has all of the sales data for day as in on the actual webpage when logging into the application.

At this time there isn’t an API that returns the sales data that you see when logging into the Seller Dashboard. It’s a combination of the the Payments API and the Order API. With the results from these APIs the sales data is calculated.

Bryan
Has this changed? The reason I ask is because when I am looking at the order detail now, it shows information for sales for each item.
Also…the amount appears to be a whole number without decimal places.

To calculate gross sales like in the summary report would the calculation be:

‘gross_sales_money’: {‘amount’: 295, ‘currency’: ‘USD’} minus ‘total_discount_money’: {‘amount’: 0, ‘currency’: ‘USD’} and ‘return_amounts’: {‘discount_money’: {‘amount’: 0, ‘currency’: ‘USD’},
‘service_charge_money’: {‘amount’: 0, ‘currency’: ‘USD’},
‘tax_money’: {‘amount’: 0, ‘currency’: ‘USD’},
‘tip_money’: {‘amount’: 0, ‘currency’: ‘USD’},
‘total_money’: {‘amount’: 0, ‘currency’: ‘USD’}}

Not sure I understand what difference you are seeing with the Orders API? Our APIs have always retuned the amount in whole numbers. With Square’s APIs, the amount field is always in the smallest denomination of the currency indicated by currency_code. When currency_code is USD (US dollars), the amount will reflect in cents. For example, an object priced at $5.00 will be inputted as 500 in the amount field.

The gross sales in the Sales Summary is the total amount of all the items before any discounts or taxes are calculated.