Upload your demand data as CSV, line-delimited JSON or JSON.
When providing data for a Beam Analysis, the minimum amount of data required is 6 months (180 data points), and the maximum is 1 year into the future (today + 365 days).
Beam can impute up to 20% of missing values, provided that the minimum data requirements are satisfied.
Uploading data replaces existing data for the same date. It's not currently possible to remove data for a particular date. The idea with this endpoint is that you're continuously adding new demand data over time.
Request
HTTP Request
POST https://api.predicthq.com/v1/beam/analyses//sink
Path Parameters
Parameter
Description
analysis_id
An existing Beam Analysis ID.
Request Headers
Header
Value
Content-Type
Must be one of the following:
text/csv
application/x-ldjson
application/json
Request Body
You can upload the demand data for your analysis in any of the following formats:
The request body should contain comma-separated values that represent multiple data points with the column names (in lowercase) as date and demand, demonstrated by the example below:
Number value (float or integer, must be a positive number).
Demand will typically be the demand you use in your demand forecast if you are forecasting. For example, it could be units sold, room bookings, or number of staff rostered on per day or any other unit.
E.g., 12.235
The request body should consist of line-delimited JSON objects, each representing a distinct data point. Ensure that the fields within these objects are named date and demand (lowercase). The format should follow the example given below:
Number value (float or integer, must be a positive number).
Demand will typically be the demand you use in your demand forecast if you are forecasting. For example, it could be units sold, room bookings, or number of staff rostered on per day or any other unit.
E.g., 12.235
The request body should contain a JSON object that represents a single data point. For each request, only one data point is permitted. Ensure that the fields are named date and demand (lowercase), as demonstrated in the example below:
{"date":"2023-01-01","demand":12.235}
The following request headers must be set:
Header
Value
Content-Type
application/json
JSON Fields:
Field
Description
date
string
required
ISO8601 Date format (YYYY-MM-DD)
E.g., 2023-01-01
demand
string
required
Number value (float or integer, must be a positive number).
Demand will typically be the demand you use in your demand forecast if you are forecasting. For example, it could be units sold, room bookings, or number of staff rostered on per day or any other unit.
E.g., 12.235
Response
If successful, the HTTP response code will be 202 Accepted.