Sales forecasts
Endpoints
Get list of last sales forecasts from VIF Forecast
/forecast/companies/{companycode}/establishments/{establishmentcode}/plans/{planCode}/horizons/{horizonCode}/periods/{period}/last-sales-forecasts |
Parameters
Type | Name | Description | Schema | Business rules |
---|---|---|---|---|
Path |
companyCode |
Current context company code |
string |
2 characters max |
Path |
establishmentCode |
Current context establishment code |
string |
2 characters max |
Path |
planCode |
Forecast plan |
string |
10 characters max |
Path |
horizonCode |
Forecast horizon |
string |
10 characters max |
Path |
period |
Period size |
string |
within (DAY, DAY_THEN_WEEK, WEEK, WEEK_OF_MONTH, MONTH) |
Query |
nbPeriods |
Number of periods (if it’s not necessary to export all periods : export only first periods) |
integer (int32) |
Number of periods in WEEK or MONTH according to "period" value |
Query |
afterNbPeriods |
Beyond a number of periods (if it’s not necessary to export all periods : export only periods beyond a number of periods) |
integer (int32) |
Number of periods in WEEK or MONTH according to "period" value |
Query |
nbWeeksInDays |
Number of weeks in days (export only first weeks in days) |
integer (int32) |
if period = DAY_THEN_WEEK |
Query |
siteCode |
Site code |
string |
|
Query |
levelOfDetail |
Level of detail |
string |
within (ITEM, FORECAST_LINE_ITEM) : ITEM = by item |
Query |
withZeroForecast |
True if it’s necessary to export forecast at 0 |
boolean |
|
Query |
withStatUnits |
True if it’s necessary to export quantities in statistical units |
boolean |
|
Query |
withDiscounts |
True if it’s necessary to export discount amounts |
boolean |
|
Query |
withCosts |
True if it’s necessary to export cost amounts |
boolean |
|
Query |
page |
Page index |
integer (int32) |
|
Query |
size |
Entity count per page |
integer (int32) |
Responses
HTTP Code | Description | Schema |
---|---|---|
200 |
Successfull |
< GetSalesForecasts > array |
400 |
Functionnal error |
No Content |
500 |
Internal server error |
No Content |
Import entity list
/forecast/companies/{companycode}/establishments/{establishmentcode}/sales-forecasts/import |
Parameters
Type | Name | Description | Schema | Business rules |
---|---|---|---|---|
Path |
companyCode |
Current context company code |
string |
2 characters max |
Path |
establishmentCode |
Current context establishment code |
string |
2 characters max |
Body |
body |
Data structure
GetSalesForecasts
Sales forecast data structure for Get.
Name | Description | Value | Business rules |
---|---|---|---|
companyCode |
string |
2 characters max |
|
establishmentCode |
string |
2 characters max |
|
planCode |
Forecast plan |
string |
10 characters max |
versionCode |
Version code |
string |
10 characters max |
internalLineNumber |
Internal line number |
integer |
|
itemCode |
Item code |
string |
20 characters max |
siteCode |
Site code |
string |
10 characters max |
forecasts |
Forecasts |
Forecast list |
Forecast
Name | Description | Value | Business rules |
---|---|---|---|
startDate |
Start date |
datetime |
YYYY-MM-DDTHH:MM:SSZ |
endDate |
End date |
datetime |
YYYY-MM-DDTHH:MM:SSZ |
quantity |
Quantity |
double |
|
computedQuantity |
Computed quantity |
double |
|
eventQuantity |
Event quantity |
double |
|
promotionQuantity |
Promotional quantity |
double |
|
eventPromotionQuantity |
Event promotional quantity |
double |
|
unitCode |
Unit code |
string |
5 characters max |
quantityStatUnit1 |
Quantity in statistical unit 1 |
double |
|
computedQuantityStatUnit1 |
Computed quantity in statistical unit 1 |
double |
|
eventQuantityStatUnit1 |
Event quantity in statistical unit 1 |
double |
|
promotionQuantityStatUnit1 |
Promotional quantity in statistical unit 1 |
double |
|
eventPromotionQuantityStatUnit1 |
Event promotional quantity in statistical unit 1 |
double |
|
statUnitCode1 |
Statistical unit code 1 |
string |
5 characters max |
quantityStatUnit2 |
Quantity in statistical unit 2 |
double |
|
computedQuantityStatUnit2 |
Computed quantity in statistical unit 2 |
double |
|
eventQuantityStatUnit2 |
Event quantity in statistical unit 2 |
double |
|
promotionQuantityStatUnit2 |
Promotional quantity in statistical unit 2 |
double |
|
eventPromotionQuantityStatUnit2 |
Event promotional quantity in statistical unit 2 |
double |
|
statUnitCode2 |
Statistical unit code 2 |
string |
5 characters max |
quantityStatUnit3 |
Quantity in statistical unit 3 |
double |
|
computedQuantityStatUnit3 |
Computed quantity in statistical unit 3 |
double |
|
eventQuantityStatUnit3 |
Event quantity in statistical unit 3 |
double |
|
promotionQuantityStatUnit3 |
Promotional quantity in statistical unit 3 |
double |
|
eventPromotionQuantityStatUnit3 |
Event promotional quantity in statistical unit 3 |
double |
|
statUnitCode3 |
Statistical unit code 3 |
string |
5 characters max |
quantityStatUnit4 |
Quantity in statistical unit 4 |
double |
|
computedQuantityStatUnit4 |
Computed quantity in statistical unit 4 |
double |
|
eventQuantityStatUnit4 |
Event quantity in statistical unit 4 |
double |
|
promotionQuantityStatUnit4 |
Promotional quantity in statistical unit 4 |
double |
|
eventPromotionQuantityStatUnit4 |
Event promotional quantity in statistical unit 4 |
double |
|
statUnitCode4 |
Statistical unit code 4 |
string |
5 characters max |
amount |
Amount |
double |
|
currencyCode |
Currency code |
string |
3 characters max |
discountAmount1 |
Discount amount 1 |
double |
|
discountAmount2 |
Discount amount 2 |
double |
|
discountAmount3 |
Discount amount 3 |
double |
|
discountAmount4 |
Discount amount 4 |
double |
|
discountAmount5 |
Discount amount 5 |
double |
|
discountAmount6 |
Discount amount 6 |
double |
|
discountAmount7 |
Discount amount 7 |
double |
|
discountAmount8 |
Discount amount 8 |
double |
|
discountAmount9 |
Discount amount 9 |
double |
|
discountAmount10 |
Discount amount 10 |
double |
|
costAmount1 |
Cost amount 1 |
double |
|
costAmount2 |
Cost amount 2 |
double |
|
costAmount3 |
Cost amount 3 |
double |
|
costAmount4 |
Cost amount 4 |
double |
|
costAmount5 |
Cost amount 5 |
double |
|
costAmount6 |
Cost amount 6 |
double |
|
costAmount7 |
Cost amount 7 |
double |
|
costAmount8 |
Cost amount 8 |
double |
|
costAmount9 |
Cost amount 9 |
double |
|
costAmount10 |
Cost amount 10 |
double |
ImportSalesForecastList
Name | Value |
---|---|
callback |
string |
data |
SalesForecast list |
parameters |
SalesForecast
Sales forecast data structure.
Name | Description | Value | Business rules |
---|---|---|---|
companyCode |
string |
2 characters max |
|
establishmentCode |
string |
2 characters max |
|
itemCode |
Item code |
string |
20 characters max |
customerCode |
Customer code |
string |
10 characters max |
groupCode |
Customer group code |
string |
10 characters max |
groupLevel |
Customer group level |
integer |
|
groupValueCode |
Customer group value code |
string |
20 characters max |
startDate |
Start date |
datetime |
YYYY-MM-DDTHH:MM:SSZ |
endDate |
End date |
datetime |
YYYY-MM-DDTHH:MM:SSZ |
baselineQuantity |
Baseline quantity |
double |
|
unitCode |
Unit code |
string |
5 characters max |
comment |
Comment |
string |
1000 characters max |