Generic Data API EndPoint Instructions
Testing Endpoints:
A program called Postman is useful for testing the endpoints. It can be downloaded at https://www.getpostman.com/
If you do not wish to install Postman, you can test the endpoints by entering the URL into any web browser and navigating to the page. The results will be output in plain text. Example URLs are provided in the Endpoints section.
If using Postman, you can enter the base URL of the endpoints into the request URL. For Demo the URL is http://olypointofsale.com:5000/ and the secure URL is https://olypointofsale.com:5001/
Once the URL is entered, you can add the parameters by clicking the Parameter button on the right end of the request URL. You will need to enter the apikey parameter for all endpoints. The value for the apikey parameter is the API Credentials that were generated for you on the Data API Users page. You can copy and paste it here. It will be different for each user.
Most endpoints will require more parameters, which can be entered in the parameter list.
When parameters are added or edited, the URL in the request URL will automatically be updated.
If you are not using Postman, you will have to manually edit the URL you enter into your web browser. The keys will always be the same, but the values will be changed depending on which store you need to see or which date range you are looking for.
If you are using Postman, once you have entered all of the parameters, click the blue “Send” button to run the report. It is useful to format the output by clicking the button that says “HTML” and changing it to “JSON”.
Endpoints Available:
simpleTest
Used just to test passing a correct and incorrect key.
Verb: GET
Parameters:
· Apikey=key of the api user
getStore
Returns the list of stores for a particular company and apikey
http://olypointofsale.com:5000/getStore
Verb: GET
Parameters:
· companyID=id of the company whose stores will be queried
· Apikey=key of the api user
Examples: http://olypointofsale.com:5000/getStore?apikey={---API-KEY-HERE---}
http://olypointofsale.com:5000/getStore?apikey={---API-KEY-HERE---}&companyID=293
getCompany
Returns the list of companies the apikey has access to
http://olypointofsale.com:5000/getCompany
Verb: GET
Parameters:
· companyID=id of the company to query
· APIcompanyID=id of the api company. Required because it is required by the stored procedure
· Apikey=key of the api user
Example: http://olypointofsale.com:5000/getCompany?apikey={---API-KEY-HERE---}
Reports endpoint:
API
Production
https://linkpos.net:5001/API
Test/Demo
https://olypointofsale.com:5001/API
Verb: GET
Parameters:
· storeID=id of the store to query
· Apikey=key of the api user
· reportType= (the number of the report to be ran: 1=menu information; 2=sales information; 3=sales by category; 4=sales cats; 5=sales items; 6=time card; 7=employee time card information; 8=employee information; 9=job information; 10=employee job information)
· startDate=start date of the report
· endDate=end date of the report
The reportTypes (based on the attached spec):
- Menu query that returns: store id, name of the item, its price, the product's cost, the item’s id, item’s category (corresponds to our menu sections e.g. appetizers). https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=1
- Sales query that returns information for a given time period (day): store id, net sales, amount of tax, amount of discounts, financial amount of voids, financial amount of all payments (gross), amount of the cash deposit, paid ins and outs (Total Paid Ins/Outs amount for a given day), amount paid in purchasing gift cards/gift certificates, date of the sales being reported, cc tip reduction, if the ticket and the till amounts matched, recon (This can be set to a default of zero. It's where a customer matches credit card transactions to a sales day on the website). Can be compared to the Sales Summary report in Link POS for most values. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=2&startDate=1/1/2017&endDate=1/31/2017
- Sales by category query that returns: total items sold grouped by category id: sale id, category id of the sales item, the aggregated amount of sales for that category for the query. Can be compared to the Sales Summary report’s Category Summary in Link POS. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=3&startDate=1/1/2017&endDate=1/31/2017
- Eyenalyze does not know what they want this to return, so it is not implemented yet. Sales cats query that returns: store id, name of the sales category type, and category type. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=4
- Items query that returns: Total items sold grouped by the sales id: sale id, name of the item, id of the POS transaction, price at which item was sold, quantity, item’s category id. Can be compared to the Sales Summary report’s Item Summary in Link POS. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=4&startDate=1/1/2017&endDate=1/31/2017
- Labor query which returns: store id, date of the report, total hours, total salary, total overtime paid, total tips, total tips shared, total blessing (can be left as a default of '0'. It's a flag for the website where customers can verify a date for labor exporting). Tip amounts can be compared to the Tips report in Link POS. Tipshare is Credit Tips, tips is Total. I’m looking for a report we can use to compare the labor. We seem to be having some issues with demo outpar at the moment. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=6&startDate=1/2/2017&endDate=1/15/2017
- Employee timecard query which returns the total employee timecards entries for the time period (day) with the following data: employee id, labor id, employee pay rate, hours worked, salary, overtime hours, tips earned, tips shared, job id, clock in time, clock out time. Data is returned per punch in/out. Can compare to the Time Approval page with “Show Approved Records” checked. Use the results of report #8 below to match the employee ID to a name. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=7&startDate=1/2/2017&endDate=1/15/2017
- Employee query that returns: store id, payroll id, name, export id (can be set to a default of '0'. A user can enter a payroll id from a 3rd party on the website. This shouldn't come from a POS unless you have a payroll integration) and salary. Can compare to the Cashier page in Link POS. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=8
- Jobs query which returns: store id, job code, name of the job. Can compare to the Project/Task list on the Time Approval page. All stores have the default job code -1 with just the store name. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=9
- Employee job query which returns: employee id, job id, the pay rate of that job. Comparable to the employee list. We do not track pay rate by job currently, so it only lists the employees pay rate for each job. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=10
- This returns a list of accounting categories for the store. These are used for reporting, and are not menu sections. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=11
- This returns the sales by accounting category listed in step 11. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=12
- Labor Schedule Report https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=13&startDate=1/2/2017&endDate=1/15/2017
- Receipts Report startDate parameter is the single day for the report to be run. Register parameter can be left empty to return receipts from all registers. All receipts will have a refunddate returned, but only receipts with the field receiptrefunded with a value of true are refunded. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=14&startDate=1/2/2017®ister=0
- Sales Summary Report Can be compared to the Sales Summary report in Link POS for most values. Register parameter can be left empty to return receipts from all registers. overShort 0 will return 0 for the OverShort value, overShort 1 will calculate the OverShort value from drop form records. refundedAmount 0 will return 0 for RefundedAmount, refundedAmount 1 will calculate the RefundedAmount from receipt data. dayChangeOffset 0 will use 12:00 AM as the start and end of the day, 1 will use the Day Change Offset set in the store in LinkPOS. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=4&reportType=15&startDate=6/12/2018&endDate=6/12/2018®ister=&overShort=0&refundedAmount=0&dayChangeOffset=0
- Receipt Detail Report Can be compared to the Sales Summary report in Link POS for most values. date parameter is the single day for the report to be run. rangeStart and rangeEnd are the rows of the record set that will be returned, for example 1-50 or 51-100. The range returned is limited to 50 at one time, based on the rangeStart. All receipts will have a refunddate returned, but only receipts with the field receiptrefunded with a value of true are refunded. Each distinct menu item for a receipt will have its own record, so receipt information will potentially be repeated. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=16&date=6/12/2018&rangeStart=1&rangeEnd=50
- Loyalty Customer Information Report Returns loyalty customers activity at the selected store on the selected date. date parameter is the single day for the report to be run. rangeStart and rangeEnd are the rows of the record set that will be returned, for example 1-50 or 51-100. The range returned is limited to 50 at one time, based on the rangeStart. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=17&date=6/12/2018&rangeStart=1&rangeEnd=50
- Hourly Sales Report Can be compared to the Hourly Sales report in Link POS for most values. Register parameter can be left empty to return receipts from all registers. deductDiscounts 1 will deduct discounts from sales values, deductDiscounts 0 will return the base price of all items sold. averageSales 1 will return the average sales for each hour, averageSales 0 will return the total sales for each hour. percentage 1 will return the percentage of the day’s sales for each hour; This option can only be set when averageSales is set to 0. includeGiftSales 1 will include gift card sales in the sales amounts returned, includeGiftSales 0 will deduct gift card sales from the sales returned. "SundayTotal","MondayTotal","TuesdayTotal","WednesdayTotal","ThursdayTotal","FridayTotal","SaturdayTotal","TotalAverage" are repeated in each hour’s record, and are the total sales for the corresponding day and the average daily sales over the entire date range. https://olypointofsale.com:5001/API?apikey={---API-KEY-HERE---}&storeID=457&reportType=18&startDate=1/1/2022&endDate=1/31/2022®ister=&deductDiscounts=1&averageSales=0&percentage=0&includeGiftSales=0