Business Assist API - CreateForecast

Send historical data to create a forecast job.

POST https://businessassist.microsoft.com/api/beta/forecast
POST https://eu.businessassist.microsoft.com/api/beta/forecast

URI Parameters

Name In Required Type Description
inputDataMethod
query True

string

Code for format of input data - 0 for JSON-formatted string, 1 for file attachment

Request Body

The request body can be one of the following:

Name Description
inputDataMethod=0

Data provided in JSON-formatted string within request body.
POST https://businessassist.microsoft.com/api/beta/forecast?inputMethod=0
POST https://eu.businessassist.microsoft.com/api/beta/forecast?inputMethod=0

inputDataMethod=1

Data provided in csv file attachment.
POST https://businessassist.microsoft.com/api/beta/forecast?inputMethod=1
POST https://eu.businessassist.microsoft.com/api/beta/forecast?inputMethod=1

inputDataMethod=0

Data provided in JSON-formatted string within request body.
POST https://businessassist.microsoft.com/api/beta/forecast?inputMethod=0
POST https://eu.businessassist.microsoft.com/api/beta/forecast?inputMethod=0

Name Type Description
dateTimeColumnName

string

Column header for the column containing data and time information.

endDateTime

DateTimeOffset

End date for the forecasting. It can be yyyymmdd, mm/dd/yyyy, or other widely known date format.

inputDataJson

string

JSON-formatted version of the historical data. See inputDataJson for details.

name

string

User-defined name for the Forecast job.

seasonality

enum

Divide forecasts by time periods for comparison. Select at most two seasonality from (daily, weekly, monthly, quarterly, yearly). See seasonality for details.

specialDateAdjustmentColumnName

string

Name of the column in the special event data describing the adjustments to make.

specialDateAdjustmentDataJson

string

JSON-formatted string containing adjustments to make on special dates. See specialDateAdjustmentDataJson for details.

specialDateColumnName

string

Name of the column in the specialDateFileName listing dates for special days and holidays.

specialDateDataJson

string

JSON-formatted string containing adjustments to make on special dates. See specialDateAdjustmentDataJson for details.

specialDateEventColumnName

string

Name of the column in the specialDateFilename listing names of special days and holidays.

volumeColumnName

string

Column header for the column containing volume data.

inputDataMethod=1

Data provided in csv file attachment.
POST https://businessassist.microsoft.com/api/beta/forecast?inputMethod=1
POST https://eu.businessassist.microsoft.com/api/beta/forecast?inputMethod=1

Name Type Description
dateTimeColumnName

string

Column header for the column containing data and time information.

endDateTime

DateTimeOffset

End date for the forecasting. It can be yyyymmdd, mm/dd/yyyy, or other widely known date format.

inputDataFileName

string

Name of the file containing your historical data.

name

string

User-defined name for the Forecast job.

seasonality

enum

Divide forecasts by time periods for comparison. Select at most two seasonality from (daily, weekly, monthly, quarterly, yearly). See seasonality for details.

volumeColumnName

string

Column header for the column containing volume data.

Responses

Name Type Description
202

The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.

400

Input Data is null

403

Missing or incorrect permissions

500

Submit request failed

Examples

Create a forecast, European endpoint, inputDataMethod=0
Create a forecast, European endpoint, inputDataMethod=1
Create a forecast, global endpoint, inputDataMethod=0
Create a forecast, global endpoint, inputDataMethod=1

Create a forecast, European endpoint, inputDataMethod=0

Sample request

POST https://eu.businessassist.microsoft.com/api/beta/forecast?inputDataMethod=0
{
  "name": "String",
  "inputDataJson": "String",
  "dateTimeColumnName": "String",
  "volumeColumnName": "String",
  "seasonality": "Enum",
  "endDateTime": "DateTimeOffset",
  "notificationUrl": "URI"
}

Sample response

{
  "operationId": "String",
  "name": "String",
  "status": "integer",
  "diagnostics": "String"      
}

Create a forecast, European endpoint, inputDataMethod=1

Sample request

POST https://eu.businessassist.microsoft.com/api/beta/forecast?inputDataMethod=1
{
  "name": "String",
  "inputDataJson": "String",
  "dateTimeColumnName": "String",
  "volumeColumnName": "String",
  "specialDateDataJson": "String",
  "specialDateAdjustmentDataJson": "String",
  "specialDateColumnName": "String",
  "specialDateEventColumnName": "String",
  "specialDateAdjustmentColumnName": "String",
  "seasonality": "Enum",
  "endDateTime": "DateTimeOffset"
}

Sample response

{
  "operationId": "String",
  "name": "String",
  "status": "integer",
  "diagnostics": "String"      
}

Create a forecast, global endpoint, inputDataMethod=0

Sample request

POST https://businessassist.microsoft.com/api/beta/forecast?inputDataMethod=0
{
  "name": "String",
  "inputDataJson": "String",
  "dateTimeColumnName": "String",
  "volumeColumnName": "String",
  "seasonality": "Enum",
  "endDateTime": "DateTimeOffset",
  "notificationUrl": "URI"
}

Sample response

{
  "operationId": "String",
  "name": "String",
  "status": "integer",
  "diagnostics": "String"      
}

Create a forecast, global endpoint, inputDataMethod=1

Sample request

POST https://businessassist.microsoft.com/api/beta/forecast?inputDataMethod=1
{
  "name": "String",
  "inputDataJson": "String",
  "dateTimeColumnName": "String",
  "volumeColumnName": "String",
  "specialDateDataJson": "String",
  "specialDateAdjustmentDataJson": "String",
  "specialDateColumnName": "String",
  "specialDateEventColumnName": "String",
  "specialDateAdjustmentColumnName": "String",
  "seasonality": "Enum",
  "endDateTime": "DateTimeOffset"
}

Sample response

{
  "operationId": "String",
  "name": "String",
  "status": "integer",
  "diagnostics": "String"      
}

Definitions

Name Description
dateTimeColumnName

Column header for the column containing data and time information.

endDateTime

End date for the forecasting. It can be yyyymmdd, mm/dd/yyyy, or other widely known date format.

inputDataFileName

Name of the file containing your historical data.

inputDataJson

JSON-formatted version of the historical data. See inputDataJson for details.

inputDataMethod

Code representing the format of the historical data in the request body.

Job status codes
Code Job Status
0 Not started
1 In progress
2 Completed
name

User-defined name for the forecast job.

operationId

Job Id for the forecast job.

seasonality

Divide forecasts by time periods for comparison. Select at most two seasonality from (daily, weekly, monthly, quarterly, yearly). See seasonality for details.

specialDateAdjustmentColumnName

Name of the column in the special event data describing the adjustments to make.

specialDateAdjustmentDataJson

JSON-formatted string containing adjustments to make on special dates. See specialDateAdjustmentDataJson for details.

specialDateColumnName

Name of the column in the specialDateFileName listing dates for special days and holidays.

specialDateDataJson

JSON-formatted string containing adjustments to make on special dates. See specialDateAdjustmentDataJson for details.

specialDateEventColumnName

Name of the column in the specialDateFilename listing names of special days and holidays.

volumeColumnName

Column header for the column containing volume data.

dateTimeColumnName

Column header for the column containing data and time information.

endDateTime

End date for the forecasting. It can be yyyymmdd, mm/dd/yyyy, or other widely known date format.

inputDataFileName

Name of the file containing your historical data.

inputDataJson

JSON-formatted version of the historical data. See inputDataJson for details.

inputDataMethod

Code representing the format of the historical data in the request body.

Job status codes

Code Job Status
0 Not started
1 In progress
2 Completed

name

User-defined name for the forecast job.

operationId

Job Id for the forecast job.

seasonality

Divide forecasts by time periods for comparison. Select at most two seasonality from (daily, weekly, monthly, quarterly, yearly). See seasonality for details.

specialDateAdjustmentColumnName

Name of the column in the special event data describing the adjustments to make.

specialDateAdjustmentDataJson

JSON-formatted string containing adjustments to make on special dates. See specialDateAdjustmentDataJson for details.

specialDateColumnName

Name of the column in the specialDateFileName listing dates for special days and holidays.

specialDateDataJson

JSON-formatted string containing adjustments to make on special dates. See specialDateAdjustmentDataJson for details.

specialDateEventColumnName

Name of the column in the specialDateFilename listing names of special days and holidays.

volumeColumnName

Column header for the column containing volume data.