Bulk update of line items - Intergraph Smart Materials - Help - Hexagon

Intergraph Smart Materials Web API Help (10.6)

ft:locale
en-US
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Smart Materials/Smart Reference Data Version
10.6

This API updates the existing fields (one to many) of the line items of the given requisition in Smart Materials. It updates multiple fields of different line items of a requisition in one go.

  • You cannot perform bulk update of line items, if the given requisition is already Approved or Released to Procurement.

  • You cannot update fields like Position, SubPosition, ProcSequence, Ident, TagNumber, ItyId, RliId, and RId of a requisition line item.

Required Privilege: API_REQ

Headers

Header Name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/JSON

Body

URL Format: POST https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)

/Requisitions({key})/BulkUpdateLineItems

Specify the values for project, discipline, language, and key parameter in the URL. The project, discipline, and language together, define the project environment. The key parameter defines the requisition ID (RId).

Element

Description

Type

Required

Notes

FilterQuery

Refers to OData filter query.

  • If a user provides a valid query, then only selective line items are updated based on the query.

  • If a user doesn’t provide a valid query, then all the line items of the given requisition are updated.

String

Optional

KeepManInd

Indicates whether a line item is marked for Keep as manual requisition line item or not.

Allowed values are Y and N.

String

Mandatory

ReleasedQty

The total quantity of the line item that the user wants to order through procurement.

Decimal

Optional

Allowed range is 15 digits with 3 digits in decimal values.

ReleaseQtyUnitId

Unique quantity unit ID for the released quantity.

Integer

Mandatory/Optional

WeightUnitId

Unique ID of the weight unit.

Integer

Optional

ROSDate

Required on site date.

Date Time Offset

Optional

ActivityId

Unique ID of the activity code.

Integer

Optional

ProcureChannel

Indicates whether the material on this position is processed or not by the standard procurement department. Allowed values are Y and N.

String

Optional

Maximum allowed length is 20.

TechEvalRequiredInd

Indicates whether the given position requires the technical evaluation or not.

Allowed values are Y and N.

String

Optional

Default value is N.

AllowRTPInd

Indicates whether the given position can be released to the procurement or not.

Allowed values are Y and N.

String

Optional

Default value is N.

ForceRTPInd

Indicates whether the given position can be released to procurement regardless of quantity or not.

Allowed values are Y and N.

String

Optional

Default value is N.

UnitWeight

The unit of the requisition position weight.

Decimal

Optional

Budget

Budget value of the given line item.

Decimal

Optional

Allowed range is 15 digits with 4 digits in decimal values

CurrencyId

Unique ID of the currency code.

If a value is assigned to the project default ZX-CURCY for the logged in user or project, this field is optional.

Integer

Mandatory/Optional

DdId

Unique ID of the delivery designation.

If a value is assigned to the project default ZP_DLV_DSG for the logged in user or project, this field is optional.

Integer

Mandatory/Optional

AccountCodeID

Unique ID of the account code.

Integer

Optional

Comment

Comment given by the user for the respective line item.

String

Optional

Maximum allowed length is 255.

RentalStartDate

Start date of the rental order line item.

Date Time Offset

Optional

Allowed format is YYYY-MM-DD.

RentalEndDate

End date of the rental order line item.

Date Time Offset

Optional

Allowed format is YYYY-MM-DD.

ValidPeriod

Valid period for the price per quantity.

Integer

Optional

Interval

The interval used for calculating the valid period for the unit price of the line item.

Allowed values are:

  • Minutes

  • Days

  • Years

  • Hours

  • Months

  • Weeks

String

Optional

Sample Body

Post

http://localhost:57576/smat/v1/Projects('RS')/Disciplines('PIPING')/Nls('English')/Requisitions(10000137822)/BulkUpdateLineItems

{

"FilterQuery" : "ROSDate eq null and Interval eq 'Days'",

"ROSDate" : "2022-09-23",

"ReleasedQty" : 40,

"CurrencyId" : 502642,

"DdId" :5342,

"ActivityId":5265,

"TechEvalRequiredInd": "Y",

"Interval":"Hours",

"Comment" : "Update few line items at once"

}

This API updates only those line items in which existing ROSDate is set to Null and Interval field is set to Days. This information should be passed in the form of query as shown in the sample body. If it is not passed through the filter query, then the API updates all the line items of the given requisition.

Success Response

Status: 200 OK

In the success response, you can view only those line items of the requisition that are updated by the given API.

{

"@odata.context": "http://localhost:57101/SMAT/V1/$metadata#bindingParamter",

"value": [

{

"RliId": 10000818436,

"ProjId": "RS",

"DpId": 5020,

"RId": 10000138554,

"Position": 1,

"SubPosition": 1,

"ProcSequence": null,

"MarkingForDeleteInd": "N",

"KeepManInd": "N",

"NotesInd": "N",

"Ident": 10000372535,

"TagNumber": "---",

"CommodityId": 10000135850,

"ItyId": 10000018771,

"ItemRule": "SOT",

"NewListQty": 0,

"ReleasedQty": 40,

"QuantityUnitId": 502322,

"ReleaseQtyUnitId": 502322,

"WeightUnitId": 500140,

"IncreasedQty": 40,

"RecommendQty": 0,

"AssemblyQty": 0,

"LastListQty": 0,

"LastReleasedQty": 0,

"CorporateWarehouseQty": 0,

"FIMQty": 0,

"POQuantity": 0,

"TotalPOQty": 0,

"NotApprovedPOQty": 0,

"ReceivedQtyPosted": 0,

"DirectReceivedQty": 0,

"ROSDate": "2022-09-23T00:00:00+05:30",

"ActivityId": 5265,

"ProcureChannel": null,

"InqId": null,

"InquiryCode": null,

"InquirySupplement":0,

"InquirySequence": null,

"InquiryQty": 0,

"TechEvalRequiredInd": "Y",

"AllowRTPInd": "Y",

"ForceRTPInd": "Y",

"MSLinkInd": "N",

"UnitWeight": 0,

"TotalWeight": 0,

"Budget": 0,

"CurrencyId": 502642,

"DdId": 5342,

"AccountCodeId": null,

"Comment": "Update few line items at once",

"GroupedBy": null,

"NonIdentCollapseCrit": null,

"CumulatedWeight": 0,

"CumulatedWeightUnit": null,

"ApproverName": null,

"RentalStartDate": "2022-08-28T00:00:00+05:30",

"RentalEndDate": null,

"ValidPeriod": null,

"Interval": "Hours"

},

{

"RliId": 10000818437,

"ProjId": "RS",

"DpId": 5020,

"RId": 10000138554,

"Position": 1,

"SubPosition": 2,

"ProcSequence": null,

"MarkingForDeleteInd": "N",

"KeepManInd": "N",

"NotesInd": "N",

"Ident": 10000567777,

"TagNumber": "TEST_TAG_UP",

"CommodityId": 10000303427,

"ItyId": 501146,

"ItemRule": "TFM",

"NewListQty": 0,

"ReleasedQty": 40,

"QuantityUnitId": 502322,

"ReleaseQtyUnitId": 502322,

"WeightUnitId": 500140,

"IncreasedQty": 40,

"RecommendQty": 0,

"AssemblyQty": 0,

"LastListQty": 0,

"LastReleasedQty": 0,

"CorporateWarehouseQty": 0,

"FIMQty": 0,

"POQuantity": 0,

"TotalPOQty": 0,

"NotApprovedPOQty": 0,

"ReceivedQtyPosted": 0,

"DirectReceivedQty": 0,

"ROSDate": "2022-09-23T00:00:00+05:30",

"ActivityId": 5265,

"ProcureChannel": null,

"InqId": null,

"InquiryCode": null,

"InquirySupplement":0,

"InquirySequence": null,

"InquiryQty": 0,

"TechEvalRequiredInd": "Y",

"AllowRTPInd": "Y",

"ForceRTPInd": "Y",

"MSLinkInd": "N",

"UnitWeight": 0,

"TotalWeight": 0,

"Budget": 0,

"CurrencyId": 502642,

"DdId": 5342,

"AccountCodeId": null,

"Comment": "Update few line items at once",

"GroupedBy": null,

"NonIdentCollapseCrit": null,

"CumulatedWeight": 0,

"CumulatedWeightUnit": null,

"ApproverName": null,

"RentalStartDate": "2022-08-28T00:00:00+05:30",

"RentalEndDate": null,

"ValidPeriod": null,

"Interval": "Hours"

}

]

}