Data Access Sales forecasts
Endpoints
Get list of sales forecasts from VIF Forecast
| /forecast/companies/{companycode}/establishments/{establishmentcode}/plans/{planCode}/versions/{versionCode}/periods/{period}/data-access/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 | versionCode | Forecast version | string | 10 characters max | 
| Path | period | Period size | string | within (DAY, WEEK, WEEK_OF_MONTH, MONTH) | 
| Query | referenceDate | Reference date | string | within (VERSION_START_DATE = export forecasts from the version start date, TODAY_DATE = export forecasts from the today date). If TODAY_DATE and "period" is WEEK or WEEK_OF_MONTH, then start at the first day of the current week. If TODAY_DATE and "period" is MONTH, then start at the first day of the current 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 | 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 | 
| 403 | Not allowed without Data Access offer | No Content | 
| 500 | Internal server error | No Content | 
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 |