Skip to content

Create Sales per Store/Seller POST

URL: https://api.painelalter.com/api/sales/:store_alias_id/postSalesPerStore

Request used to insert sales data into the system. The same route can be used to insert sales per store or per seller.

Store Insertion

Example request body for store insertion:

json
{
    "sales": [
        {
            "localDate": "2022-12-01 10:32:15",
            "total": "150.15",
            "id_saleType": 1
        },
        {
            "localDate": "2022-12-01 11:15:20",
            "total": "12.32"
        }
    ]
}

Seller Insertion

Example request body for seller insertion:

json
{
    "sales": [
        {
            "localDate": "2022-12-01 10:32:15",
            "total": "150.15",
            "id_sellerPDV": "SELLER_01",
            "sellerName": "John Doe"
        },
        {
            "localDate": "2022-12-01 11:15:20",
            "total": "12.32",
            "id_sellerPDV": "SELLER_02",
            "sellerName": "Jane Smith"
        }
    ]
}

Sale Object Parameters

FieldTypeRequiredDescription
localDatestringYesSale date and time in the format YYYY-MM-DD HH:mm:ss
totalstringYesTotal sale value
id_saleTypenumberNoSale type
id_sellerPDVstringNoSeller identifier in the POS. When present, the sale is assigned to the specified seller
sellerNamestringNoSeller name

Sale Types (id_saleType)

IDNameDescription
1DefaultStandard sale, counted toward revenue
2ReturnThe sale is not counted as a new sale. You can send a negative value so the revenue amount is deducted