Skip to main content

Upload Sales Data Int Ep

POST 

/v1/import_sales_data

Bulk Upload Sales Data

Allows for the bulk uploading of sales data, facilitating large-scale data entry and updates.

Required Scopes (ia.w)

Request

reqs: list
List of sales records to be uploaded, with a maximum size of 5000 records per request. Each record includes:

Show Child Attributes

store_number: str
The Store Number of the store, distinct from the Mongo ID.

tank_id: int
The index of the tank at the store, distinct from the Mongo ID.

sales: float
The total sales amount. Will be rounded to the nearest integer. Cannot be negative.

date: datetime
The date the sales were made. Will be truncated to midnight.


Response

The response details the outcome of the bulk upload operation, indicating how many records were successfully created or updated and which, if any, failed:

created: int
The number of records inserted into the system.


updated: int
The number of records that were updated.


failed: list
List of the records that failed to be inserted or updated. Each item in the list provides details about the failed record:

Show Child Attributes

record: dict
The data of the failed record.

errors: list
List of error messages generated for the record.

Responses

Successful Response

Loading...