Cloud POS Data Export/Intelligence API
Welcome to the Cloud POS API documentation. By using the API, you agree to the Terms and Conditions outlined on the API homepage.
Getting Started
- Base URL: https://intelligence.citruslime.com/BI/
- All requests must use HTTPS and include your API Key as an Authorization header.
- The content type must be set to
application/json
. - For endpoints that accept
FromDate
andToDate
, you can pass one or both. - To filter results using timestamps, append
?timestamp=123456
to the request. -
Note: The
timestamp
represents the RowVersion, which updates when a record is created or modified. This allows you to filter for records that have changed since your last request.
Example API Request
Here’s an example of making an API request using cURL
and JavaScript:
curl --location 'https://intelligence.citruslime.com/BI/Department.aspx'
--header 'Authorization: YOUR_API_KEY'
--header "Content-Type: application/json"
fetch('https://intelligence.citruslime.com/BI/Transaction.aspx?timestamp=123456', {
headers: {
'Authorization': 'YOUR_API_KEY',
'Content-Type': 'application/json'
}
})
.then(response => response.json())
.then(data => console.log(data));
Example Workflow
To effectively manage data retrieval, follow this two-step approach: an initial synchronization to load historical data and an ongoing sync process to fetch newly added or modified records.
Initial Data SynchronizationThe first step is to load past data incrementally while ensuring that no records are processed twice. We achieve this by storing a timestamp value that marks the most recent record retrieved. This approach allows handling failures gracefully, as data processing can resume from the last stored timestamp.
// Store the last processed timestamp
var maxTimestamp = storeGet("maxTimestamp"); // Persist this value
// Loop through historic data in daily increments
loop process each day:
data = intelligence.citruslime.com/BI/Transaction.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01;
foreach record in data.orderBy(timestamp):
if (record.timestamp >= maxTimestamp):
processRecord(record);
maxTimestamp = record.timestamp;
storeSave("maxTimestamp", maxTimestamp);
end if;
end loop;
end process;
Ongoing Data Synchronization
Once historical data is synchronized, subsequent API calls should retrieve only new or modified records. This is done by querying records that have a timestamp greater than the last stored timestamp. The process ensures minimal data transfer and optimizes performance.
data = intelligence.citruslime.com/BI/Transaction.aspx?timestamp=maxTimestamp;
foreach record in data.orderBy(timestamp):
if (record.timestamp >= maxTimestamp):
processRecord(record);
maxTimestamp = record.timestamp;
storeSave("maxTimestamp", maxTimestamp);
end if;
end loop;
URL : | intelligence.citruslime.com/BI/AccountType.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔
intelligence.citruslime.com/BI/AccountType.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Brand.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Brand.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Cashier.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/Cashier.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Cashiers updated between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Cashier.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Category.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Category.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/CourierBooking.aspx?OrderID=1234 |
---|---|
Data : | This takes an OrderID as a parameter in the URL and returns the individual courier booking for that order. Returns a 404 response if there is no record available. |
DBTimeStamp : | DBTimeStamp not available. |
Timestamp Filtering : | ✘ |
URL : | intelligence.citruslime.com/BI/Customer.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/Customer.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Customers updated between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Customer.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Department.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Department.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Inventory.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/Inventory.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Inventory updated between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Inventory.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Item.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/Item.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Items updated between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Item.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/ItemMovementLog.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/ItemMovementLog.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Item Movement Logs posted between those date/times. |
DBTimeStamp : | DBTimeStamp not available |
Timestamp Filtering : | ✘ |
URL : | intelligence.citruslime.com/BI/Order.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/Order.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Orders created between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Order.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/OrderEntry.aspx?OrderID=1234 |
---|---|
Data : | This takes an OrderID as a parameter in the URL and returns a list of Order Entries for that order. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/OrderEntry.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/PurchaseOrder.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/PurchaseOrder.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Purchase Orders created between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/PurchaseOrder.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/PurchaseOrderEntry.aspx?PurchaseOrderID=1234 |
---|---|
Data : | This takes an PurchaseOrderID as a parameter in the URL and returns a list of Purchase Order Entries for that purchase order. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/PurchaseOrderEntry.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/ReasonCode.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/ReasonCode.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Register.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Register.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/SalesRep.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/SalesRep.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Sales Reps updated between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/SalesRep.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Season.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Season.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Store.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Store.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Supplier.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/Supplier.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Suppliers updated between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Supplier.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Tax.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Tax.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Tender.aspx |
---|---|
Data : | All data is returned. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Tender.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/TaxEntry.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/TaxEntry.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Tax Entries posted between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/TaxEntry.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/TenderEntry.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/TenderEntry.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Tender Entries posted between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/TenderEntry.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/Transaction.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/Transaction.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Transactions posted between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/Transaction.aspx?timestamp=123456 |
URL : | intelligence.citruslime.com/BI/TransactionEntry.aspx |
---|---|
URL with parameters : | intelligence.citruslime.com/BI/TransactionEntry.aspx?FromDate=30/07/2018 15:00&ToDate=01/08/2018 00:01 |
Data : |
All data is available between 4am and 6am GMT.
With a datetime parameter, this will return Transaction Entries posted between those date/times. |
DBTimeStamp : |
DBTimeStamp as string. DBTimeStamp as long. |
Timestamp Filtering : |
✔ intelligence.citruslime.com/BI/TransactionEntry.aspx?timestamp=123456 |