Import Sales Data

Description Calling this endpoint by providing token to import sales Data 
Endpoint {V9Url}/v9/api/Import/Sales
Method POST
Headers
  1. AToken: Token value return from API 'GenerateAccessToken' by providing the user name & password
Body Description

SiteCode must be existing Branch's BranchCode, the code can be retrieved from Site Info Page. 

Data will be deleted per site per Day when Sales have TransactionDate which is same as existing Data (Saved in database). For example: when transaction date being imported have 2024-04-04 01:21:00, regardless the hour, the whole day of that particular branch (2024-04-04) will be deleted and reinsert with imported data.  Data will later be aggregated into hourly, which if:

2024-04-04 1:21:00 , 2024-04-04 1:23:00 

The above will be merge together become hourly data. 

Body
[
    {
        "SiteCode":"SiteCode",
        "TransactionDate":"2024-06-16 01:23:00",
        "TotalTransactionQuantity":3,
        "TotalTransactionAmount":1000,
        "UnitPerTransaction":3
    },{
        "SiteCode":"SiteCode",
        "TransactionDate":"2024-06-16 01:21:00",
        "TotalTransactionQuantity":3,
        "TotalTransactionAmount":555,
        "UnitPerTransaction":3
    },{
        "SiteCode":"SiteCode",
        "TransactionDate":"2024-06-16 01:32:00",
        "TotalTransactionQuantity":3,
        "TotalTransactionAmount":22,
        "UnitPerTransaction":3
    }
]
Response - JSON Example
{    "done": 24,    "total": 24}
Updated on October 29, 2024