Update line items of an agreement - 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 line items of an existing purchase order (agreement) in a specified project of Smart Materials. You can update line items of a purchase order using two methods.

  • You can update line items of following agreements only.

    • Manual agreement

    • Agreement by requisition

    • Agreement by inquiry

    • Subcontracts.

  • You can update agreements only if you have ASSIGN BUYER or BUYER privilege in Smart Materials application.

  • You can update line items of only those purchase orders/agreements that are not approved.

  • We support both PUT and PATCH method for this API.

Required Privilege: API_AGREEMENT

Headers

Header Name

Description

Required

Values

Authorization

Access token

Required

Bearer <access_token>

Content-Type

Request type format

Required

application/JSON

Body

URL Format: PATCH/PUT https://{host}/Smat/V1/Projects(‘:project’)/Disciplines(‘:discipline’)/Nls(‘:language’)/PurchaseOrders({key1}/LineItems({key2)

Specify the values for the project, discipline, and language in the URL. The project, discipline, and language together, define the project environment where the purchase order/agreement gets updated. The key1 refers to purchase order ID and key2 refers to the line item ID.

Purchase Order line items elements

Element

Description

Type

Required

Notes

LineItemPosition

Refers to the line item position or number. Position numbers which are new and are part of an unapproved agreement can only be edited.

Integer 32

Required

Allowed value range is 1 to 999999.

LineItemSubPosition

Refers to the line item sub position.

Integer 16

Required

Allowed value range is 0 to 999999.

ItemType

Name (code) for the item type. All the item types, except for those of item rule 'REF' are available.

String

Optional

QtyUnitCode

Name or code of the unit of the quantity. All the units that are defined in the unit groups WEIGHT, VOLUME or QUANTITY are available for this.

String

Optional

WeightUnitCode

Name or code of the unit of the weight. All the units that are defined in unit groups WEIGHT and QUANTITY are available for this.

String

Optional

Currency

Name (code) of the currency.

  • All units of measure defined in all currencies setup pages are valid values.

  • When entering a new line item on an agreement the currency of the agreement header is taken over as default. But this default can be changed.

String

Required

PoliQty

Total quantity for the line item.

Decimal

Optional

PoliUnitWeight

Supplier's suggested unit weight of the line item including packing.

Integer64

Optional

PoliTotalWeight

Refers to the total weight which is calculated as the product of the quantity and the unit weight.

If you update the total weight, the unit weight is recalculated.

Decimal

Optional

PoliVolume

Refers to the packing volume of the line item.

Decimal

Optional

ExtendedPrice

Refers to the extended price of the line item.

  • If the price base is QTY-UNIT,then the extended price is quantity * unit price.

  • If the price base is WEIGHT-UNIT, then it is product of quantity*unit price*unit weight.

  • When calculating the extended price the precision that can be set for currencies. For example, the precision for a currency is set to 1, the price base is 'QTY-UNIT', the quantity is 10.25 and the unit price is 1.2345 the extended price will be 12.70 instead of 12.65.

  • If you update the extended price the unit price is recalculated taking the price base into account.

  • The number of decimal places displayed after the decimal separator is determined by the project default ZP_DECP_EP.

Decimal

Optional

PoliUnitPrice

Refers to the unit price of the line item (for a quantity of 1).

Decimal

Optional

PriceBase

The price base can either be a quantity unit or weight unit. If the price base is weight unit, then the cost is calculated using the unit weight and the quantity, otherwise only using the quantity.

String

Required

DiscountPercent

Discount in percentage granted by the supplier for this line item.

Decimal

Optional

DiscountAmount

Discount amount granted by the supplier.

Decimal

Optional

DiscountBase

Refers to the base used for discount calculation. Allowed values are Discount % and Discount Amount.

String

Required

ExportLicenseRequiredInd

Indicates whether an export license is required for this item or not. Available values are Y and N.

This attribute depends on the setting of the project default ZP_EXPLICR.

String

Optional

AcceptedInd

Indicates whether the user has checked the quantity of the line item and prefers to approve it or not. Available values are Y and N.

String

Optional

SplitPostApprovalInd

Indicates whether a split of the line item is allowed after the order approval or not. Available values are Y and N.

String

Required

This can be updated only if a split item is attached to the agreement.

TechEvaluationPassedInd

Indicates whether the technical evaluation has been done for this line item or not. Available values are Y and N.

String

Optional

DomProdPercent

Percent of the product that was manufactured in the U.S.

Decimal

Optional

LastShip

The number of weeks required at most for shipping the item.

Integer

Optional

AccountCode

Name (code) of the account code.

You cannot edit this element if you are using account module. Whether you are working with this module or not, is defined by the project default ZJ_USE_AC.

String

Optional

VolumeUnitCode

Name or code of the unit of the volume.

String

Optional

CountryOfOrigin

Name of the country of origin.

String

Optional

Incoterm

Name (code) of the incoterm.

  • If you modify an incoterm, then the associated item shipments routing method will be reset or not depends on the setting of project default ZP_NULL_RM. If set to Y, the routing method is removed from the item shipments.

  • If project default ZP_ISH_QTY is set to KEEP or KWO0, it depends on the quantity change to which item shipments changes of incoterm, delivery place, and promised contract date are taken over. If the quantity has changed, modifications of contractual data are only taken over to the newly created item shipment.

    • If the quantity has not changed the modifications are taken over to all item shipments without release note. (The newly created one will be deleted anyway when approving the agreement.)

  • If ZP_ISH_QTY is set to NEW changes of contractual data are taken over to ALL item shipments.

String

Optional

ExportLicenseNumber

Refers to the export license number.

String

Optional

TagNumber

Tag number of the ident.

If the tag number is updated, then the commodity code also gets updated with same value that is given to tag number.

String

Optional

RevisedPromiseDate

Refers to the revised original promise date given by the supplier.

DateTimeOffset

Optional

PoliDimensions

X, y, and z dimensions of the purchase order line item

String

Optional

ExportLicenseReceivedDate

Refers to the date when the export license was received.

DateTimeOffset

Optional

PoLiCloseDate

Date when the line item is available for closing.

DateTimeOffset

Optional

FirstShip

Refers to the number of weeks required for shipping the item.

Integer32

Optional

CatalogNumber

Manufacturer's catalog number for the item being supplied.

String

Optional

Manufacturer

Refers to the name of the supplier's manufacturer.

String

Optional

FrieghtValue

Refers to the new delivery place.

String

Optional

CancelRequiredInd

Indicates whether the purchase of the associated requisition line items is to be regarded as cancelled or not. Available values are Y and N.

String

Optional

SupplyPrice

Refers to the price to be paid for the supply for a quantity of 1.

Integer

Optional

ProcOrderSeq

Order sequence number that is used for tracking of related agreement line items through several requisition supplements, if the project default ZR_PROCEQ is activated. Else, element is not required.

Integer

Optional

Can be updated only for agreement by Requisition.

InstallPrice

Refers to the price to be paid for installation, for a quantity of 1.

Decimal

Optional

PromContractDiffInd

Indicates whether more than one distinct promised contract date for this shipment exists or not. Available values are Y and N.

String

Optional

Can be updated only for agreement by Requisition.

ExpeditingInd

Indicates whether the line item should be passed on to expediting, traffic and site or not. Available values are Y and N. Applicable only for orders of type PO and NOC and their COs.

Once this value is set to N and saved, it's related item shipments will get deleted and you cannot update it again even if you set value to Y.

String

Optional

ApprovedPtyCode

Name of the approved payment type.

String

Optional

FinalApprovedScheduleChange

Days of the final approved schedule change.

Integer

Optional

NoticeToProceedDate

Refers to the date showing when to proceed.

DateTimeOffset

Optional

PoliComment

Comments associated with the purchase order line item.

String

Optional

InvCheckInd

Indicates whether an inventory check is required or not. Available values are Y and N.

String

Optional

FinalApprovalAmount

The final approved amount.

Decimal

Optional.

Sample Body

PUT

http://localhost:63871/smat/v1/Projects('RS')/Disciplines('PIPING')/Nls('English')/PurchaseOrders(10499)/LineItems(9403)

{

"LineItemPosition": 1,

"LineItemSubPosition": 1,

"ItemType": "TAG W MS",

"TagNumber": "16THFEB_TAG_002",

"QtyUnitCode": "KG",

"WeightUnitCode": "kg",

"Currency": "EUR",

"PriceBase": "QTY-UNIT",

"PoliQty": 5,

"PoliUnitWeight": 5,

"PoliTotalWeight": 0,

"PoliVolume": 2,

"PoliUnitPrice": 5,

"ExtendedPrice": 0,

"DiscountPercent": 0,

"DiscountAmount": 0,

"DiscountBase": "Discount %",

"DomProdPercent": 100,

"LastShip": 10,

"FinalApprovalAmount": 100,

"SplitPostApprovalInd": "N",

"AccountCode": "new",

"VolumeUnitCode": "new1",

"CountryOfOrigin": "abc",

"ExportLicenseNumber": null,

"FirstShip": 5,

"ExportLicenseRequiredInd": "N",

"AcceptedInd": "N",

"TechEvaluationPassedInd": "N",

"ExpeditingInd": "Y",

"Incoterm": "NEW1",

"RevisedPromiseDate": "2022-10-26T00:00:00+05:30",

"PoliDimensions": "NEW-DIMENSION",

"ExportLicenseReceivedDate": "2022-06-26T00:00:00+05:30",

"PoLiCloseDate": "2022-08-26T00:00:00+05:30",

"CatalogNumber": "new",

"Manufacturer": "NEW1",

"FrieghtValue": "ABD",

"CancelRequiredInd": "N",

"SupplyPrice": 0,

"InstallPrice": 0,

"ApprovedPtyCode": "PTY-CODE",

"FinalApprovedScheduleChange": 0,

"NoticeToProceedDate": "2022-06-26T00:00:00+05:30",

"PoliComment": "comment",

"InvCheckInd":"2 Way Check"

}

Success Response

Status: 200OK

{

"@odata.context": "http://localhost:57101/SMAT/V1/$metadata#Collection(Com.Ingr.Smat.V1.LineItem)",

"PoliId": 9403,

"ProjId": "DEMO",

"PohId": 10499,

"LineItemPosition": 1,

"LineItemSubPosition": 1,

"Size1": "0",

"Size2": "0",

"DpId": 5020,

"Ident": 12307782,

"CommodityId": 95873,

"ItemType": "TAG W MS",

"LastQuantity": 0,

"ChangedQuantity": 0,

"ReleasedQuantity": 0,

"QtyUnitCode": "KG",

"WeightUnitCode": "kg",

"Currency": "EUR",

"PoliQty": 5,

"PoliUnitWeight": 5,

"PoliTotalWeight": 25,

"PoliVolume": 2,

"ExtendedPrice": 25,

"PoliUnitPrice": 5,

"DeltaExtendedPrice": 25,

"AoCosts": 0,

"DiscountPrice": 25,

"DeltaDiscountPrice": 25,

"PriceBase": "QTY-UNIT",

"DiscountPercent": 0,

"DiscountAmount": 0,

"DiscountBase": "Discount %",

"ExportLicenseRequiredInd": "N",

"UpdateInd": "N",

"Budget": 0,

"AcceptedInd": "N",

"SplitPostApprovalInd": "N",

"TechEvalutaionRequiredInd": "N",

"TechEvaluationPassedInd": "N",

"DomProdPercent": 100,

"LastShip": 10,

"RliId": null,

"AccountCode": "NEW",

"ParentPoliId": null,

"MasterPoliId": null,

"IdsId": null,

"LpId": null,

"QdId": null,

"VolumeUnitCode": "new1",

"CountryOfOrigin": "abc",

"Incoterm": "NEW1",

"ExportLicenseNumber": null,

"TagNumber": "16THFEB_TAG_002",

"RevisedPromiseDate": "2022-10-25T00:00:00-07:00",

"PoliDimensions": "NEW-DIMENSION",

"ExportLicenseReceivedDate": "2022-06-25T00:00:00-07:00",

"PoLiCloseDate": "2022-08-25T00:00:00-07:00",

"FirstShip": 5,

"CatalogNumber": "new",

"Manufacturer": "NEW1",

"FrieghtValue": "ABD",

"TaskNumber": null,

"AttributeChar1": null,

"AttributeChar2": null,

"AttributeChar3": null,

"AttributeChar4": null,

"AttributeChar5": null,

"AttributeNum1": null,

"AttributeNum2": null,

"AttributeNum3": null,

"AttributeNum4": null,

"AttributeNum5": null,

"ForceCompleteInd": "N",

"CshRequiredInd": "N",

"CertSheetQty": 0,

"CancelRequiredInd": "N",

"SupplyPrice": 0,

"ProcOrderSeq": null,

"InstallPrice": 0,

"GrossOtherCosts": 0,

"NetOtherCosts": 0,

"NetPrice": 25,

"OtherCostDiscount": 0,

"PromContractDate": null,

"PromContractDiffInd": "N",

"ExpeditingInd": "Y",

"FinalApprovalAmount": 100,

"ApprovedPtyCode": "PTY-CODE",

"FinalApprovedScheduleChange": 0,

"NoticeToProceedDate": "2022-06-25T00:00:00-07:00",

"CnrId": null,

"PoliComment": "comment",

"InvCheckInd": "2 Way Check",

"RentalStartDate": "2022-04-25T00:00:00-07:00",

"RentalEndDate": "2022-05-25T00:00:00-07:00",

"Interval": "D",

"ValidPeriod": 1,

"PppsId": null,

"MtrNumber": null

}

Element

Description

Type

Size1

Size one (Input 1) of the ident on this line item.

String

Size2

Size two (Input 2) of the ident on this line item.

String

Ident

Ident code for the ident placed on this line item.

Integer

CommodityCode

Name of the commodity to which this item belongs to.

String

ItemType

Name (code) for the item type. All the item types, except for those of item rule 'REF' are available.

String

LastQuantity

Old or previous quantity of the line item, i.e. the quantity of the item before a change order was created.

If the agreement is not a change order, the the value 0 displays.

Integer

ChangedQuantity

Difference between the (actual) quantity and the last quantity of the line item.

If the agreement is not a change order, then the value 0 displays.

Integer

ReleasedQuantity

Difference between the (actual) quantity and the last quantity of the line item.

If the agreement is not a change order, then the value 0 displays.

Integer

DeltaExtendedPrice

Refrs to the extended price for the changed quantity. This element is considered only if the project default ZP_CODELTA is set to Y.

Except for the elements Delta Extended Price and Delta Discounted Price, all the other cost related elements always show the values taking into account the complete quantity (and not only the changed quantity) and all previous supplements with respect to other costs. The number of decimal places displayed after the decimal separator is determined by the project default ZP_DECP_EP.

Decimal

AoCosts

Refer to the costs that are included in the extended price caused by alternates and options.Only alternates and options, for which the indicator IncludeInd is set to Y are taken into account.

Decimal

DiscountPrice

Decimal

DeltaDiscountPrice

Decimal

Budget

Sum of the budgets that are assigned to the requisition line items that are associated with this agreement line item. The budget is shown for the currency of the agreement line item.

Complete values are taken into account for this calculation even if the quantities have only been assigned partly.

Decimal

TechEvalutaionRequiredInd

Indicates whether a technical evaluation is required for this line item or not. Available values are Y and N.

String

GrossOtherCosts

Refers to the sum of all other costs that are attached to the agreement line item without discounts.

  • If the currency of an other cost differs from the currency of the agreement line item, then the cost value is converted to the currency of the agreement line item using the factor that is stored in Exchange Rates (provided that the agreement bases on a quote summary).

  • If no factor is provided by the inquiry cycle, then the conversion factors of Unit to Unit are applied.

Decimal

NetOtherCosts

Refers to the sum of all other costs that are attached to the agreement line item including discounts. Discounts are only applied to other costs that are marked as discountable.

  • If the currency of an other cost differs from the currency of the agreement line item, then the cost value is converted to the currency of the agreement line item using the factor that is stored in Exchange Rates (provided that the agreement bases on a quote summary).

  • If no factor is provided by the inquiry cycle, then the conversion factors of Unit to Unit are applied.

Decimal

NetPrice

Decimal

OtherCostDiscount

Amount of the discount defined on other cost level and applied to the extended price of the agreement line item.

Decimal

PromContractDiffInd

Indicates whether more than one distinct promised contract date for this shipment exists or not. Available values are Y and N.

String

MtrNumber

Refers to a MTR number, and is applicable if this agreement line item exists on a material transfer report.

String

UpdateInd

Indicates whether a line item can be updated even after the approval of the order or not. Available values are Y and N.

String

RiId

Unique ID of the requisition.

Integer

MasterPoliId

Unique ID of the master Purchase Order line item.

Integer

ParentPoliId

Unique ID of the parent Purchase Order line item.

Integer

IdsId

Unique ID of the ident structure.

Integer

LpId

Unique ID of the list position associated with the line item

Integer

QdId

Unique ID of the quote details.

Integer

ForceCompleteInd

Indicates whether all the activities for the given line item are regarded as being completed (especially the input of the release note quantity) or not. Available values are Y and N.

String

CshRequiredInd

Indicates whether the cash is required for this item or not. Available values are Y and N.

String

TaskNumber

Name/number of the task.

String

AttributeChar (1-5)

Represents a column which a user can customize based on the requirement. Five values are available, Attributechar1-Attributechar5

String

AttributNum (1-5)

Represents a column which a user can customize based

on the requirement. Five values are available, Attributenum1-Attributenum5.

Integer

CertSheetQty

Refers to the pending certification sheet quantity.

Decimal

PromContractDate

Date when the supplier promises to deliver the items.

DateTimeOffset

CnrId

Unique ID of the change order.

Integer

RentalStartDate

Start date of the rental order line item.

DateTimeOffset

RentalEndDate

End date of the rental order line item.

DateTimeOffset

Interval

The interval used for calculating the valid period for the unit price of the line item. Available values are:

  • Minutes

  • Day

  • Years

  • Hours

  • Months

  • Weeks.

String

ValidPeriod

Valid period for the price per quantity.

Decimal