This API retrieves the Forecast details from Smart Materials. You can either retrieve a single Forecast using Forecast Id or all the Forecasts of a project.
Required Privilege: API_READONLY
Headers
Header Name |
Description |
Required |
Values |
---|---|---|---|
Authorization |
Access token |
Required |
Bearer <access_token> |
Content-Type |
Request type format |
Required |
application/JSON |
Body
URL Format: GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/Forecasts({key})
Specify values for the project, discipline, language, and key parameter in the URL. The project, discipline, and language together, define the project environment and the key parameter defines the Forecast Id (FahId).
To retrieve all the Forecasts of a project, use the following URL:
GET https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/Forecasts
Sample Code
GET https://in-smatapi.ingrnet.com/API21/Smat/v1/Projects('M06_1108')/Disciplines('PIPE')/Nls('ENGLISH')/Forecasts(65698)
Success Response
Status: 200 OK
Content:
{
"@odata.context":"https://in-smatapi.ingrnet.com/API21/SMAT/V1/$metadata#Projects('M06_1108')/Disciplines('PIPE')/Nls('ENGLISH')/Forecasts/$entity",
"FahId":65698,
"ProjId":"M06_1108",
"FahCode":"FAHCODE381",
"RunNumber":2,
"LstId":5046,
"Shortage":"2-Pass Optimized(Any)",
"SplitType":"PA",
"AllPositionsInd":"Y",
"SubstInd":"Y",
"BestQuantityInd":"Y",
"UseOnlySiteStatusInd":"Y",
"WeightInd":"Y",
"CostInd":"Y",
"HourInd":"Y",
"SplitResult":null,
"StatId":5626,
"AttrId":5571,
"StartDate":null,
"EndDate":null,
"AllocateLevel":"Shipped Items",
"DtpId":5701,
"Priority":"ISSUED FIRST",
"WeightAttrId":5130,
"SortOrder":"HeaviestFirst",
"TagNoOption":"Not Ignore Tag Number",
"DdId":null,
"OnlyEndnodesInd":"Y",
"PositionsWithFullSiteQty":"Y",
"IgnoreNullDateInd":"Y",
"ExcludeMIRQtyInd":"Y",
"JobStatus":"NEW",
"JobStartDate":null,
"JobEndDate":null,
"ParentFahId":null,
"ListNodes":[
],
"AutoAssignWhInd":"Y",
}
Element |
Description |
Type |
---|---|---|
FahId |
Unique ID of the Forecast |
Integer |
ProjId |
Unique ID of the Project |
String |
FahCode |
Name of the Forecast and specifies what the Forecast does and is attached to a run number. |
String |
RunNumber |
Unique number attached to a FahCode |
Decimal |
LstId |
Unique ID of the list status |
Decimal |
Shortage |
Specifies acceptable short quantities used in Bill of Materials allocation.
|
String |
SplitType |
Defines Forecast Run split type. Available values are:
|
String |
AllPositionsInd |
Available values are Y and N.
|
String |
SubstInd |
Indicates when the substitution/ transformation must be done automatically by the Forecast Run. Available values are Y, N, and A.
|
String |
BestQuantityInd |
Available values are Y and N.
|
String |
UseOnlySiteStatusInd |
Available values are Y and N.
|
String |
WeightInd |
Available values are Y and N.
|
String |
CostInd |
Available values are Y and N.
|
String |
HourInd |
Available values are Y and N.
|
String |
SplitResult |
Value of the split type |
String |
StatId |
Unique ID of the issue status |
Decimal |
AttrId |
Unique ID of the used attribute, when the split type is NA or PA |
Decimal |
StartDate |
Item shipments whose Promised on Site date is greater than this given start date are retrieved. |
Date Time Offset |
EndDate |
Item shipments whose Promised on Site date is smaller than the given end date are retrieved. |
Date Time Offset |
AllocateLevel |
Defines the pre-receiving level of a material that a Forecast Run should check. Available values are:
|
String |
DtpId |
Unique ID of the delivery type |
Decimal |
Priority |
Type of the priority specified for the assigned nodes in the work packages of the Forecast Run. Available values are:
|
String |
WeightAttrId |
Unique ID of the weight attribute.Weight attribute determines the node attribute.
|
Decimal |
SortOrder |
Allows you to calculate the weight of nodes assigned to a work package. Available values are:
|
String |
TagNoOption |
Tag number option. Available values are:
|
String |
DdId |
Unique ID of the delivery designation |
Decimal |
OnlyEndnodesInd |
Available values are Y and N.
|
String |
PositionsWithFullSiteQty |
Available values are Y and N.
|
String |
IgnoreNullDateInd |
Available values are Y and N.
|
String |
ExcludeMIRQtyInd |
Indicates whether the issued quantities on Available values are Y and N.
|
String |
JobStatus |
Status of the job and the job here is to run the Forecast header. |
String |
JobStartDate |
Start date of the Forecast job |
Date Time Offset |
JobEndDate |
End date of the Forecast job |
Date Time Offset |
ParentFahId |
Unique ID of the parent Forecast header |
Integer |
AutoAssignWhInd |
Auto assign warehouse to the Forecast header. Available values are Y and N.
|
String |
Forecast has multiple collections which are as follows:
Element |
Description |
Type |
---|---|---|
ListNodes |
Collection of list node names |
String |
AssignedWarehouses |
Collection of Forecast warehouses |
Collection |
AssignedWorkpacks |
Collection of Forecast work packages |
Collection |
-
AssignedWarehouses Entity Type
Element
Description
Type
OrderSeq
Sequence of the warehouses considered while forecasting.
Decimal
WhCode
Name or code of the warehouse
String
WhId
Unique ID of the warehouse
Decimal
BnlCode
Name or code of the bin location
String
-
AssignedWorkpacks Entity Type
Element |
Description |
Type |
---|---|---|
OrderSeq |
Sequence of the work packages considered while forecasting. |
Decimal |
AttrSort |
If the priority for a work package is Attribute, AttrSort controls the sort order. |
String |
PriorityType |
Priority type specified for work package in the current Forecast Run. Available values are:
|
String |
ApiAttributes |
List of attributes attached to the Forecast Run. This attribute list is used to create where condition for list positions. |
Collection |
ApiCommodityCodes |
List of attached commodity codes. These commodity codes and sizes are used to create where condition for ident. |
Collection |
WpId |
Unique ID of the workpackage |
Integer |
AttrCode |
Name or code of the attribute |
String |
ROSDate |
Date and time when the work package is Required on Site |
Date Time Offset |
WptfId |
Workpack to Forecast ID |
Integer |
BOMDetails |
List of attributes attached to a Bill of Material |
Collection |
-
BOMDetails
Element
Description
Type
BOMPath
BOM path of the list node
String
LnId
Unique ID of the list node
Integer
-
Api Attrributes Entity type
Element
Description
Type
AttrCode
Name or code of the attribute
String
AttrValue
Value of the attribute
String
ApaId
Unique ID of the ApiAttributes
Decimal
-
ApiCommodityCodes Entity Type
Element
Description
Type
CommodityCode
Name or code of the commodity
String
Size (1-5)
Value of inputs of the geometric details
Five values are allowed
String
ApccId
Unique ID of the ApiCommodityCodes
Decimal