Add Inventory Receipt details - Intergraph Smart Materials - Version 2017 R2 (2.2) - Help - Hexagon

Intergraph Smart Materials Web API Help 2017 R2 (2.2)

Language
English
Product
Intergraph Smart Materials
Subproduct
Web API
Search by Category
Help
Version Smart Materials Web API
2017 R2 (2.2)

This API adds inventory items to the specified Material Receiving Report (MRR).

Required Privilege: API_CREATE_INV_RECEIPTS

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')/ ReceivingHeaders({key})/Com.Ingr.Smat.V1.InvReceipts/

Specify values for 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 Receiving header Id.

Element

Description

Type

Required

Notes

LocId

Unique ID of the location

Decimal

Optional

To view available locations,
use:

GET https://{host}/Smat/V1/Projects
(‘:project’)
/Disciplines(‘:discipline’)/
Nls(‘:language’)
/Locations

WhId

Unique ID of the warehouse

Decimal

Optional

To view available warehouses,
use:

GET https://{host}/Smat/V1/Projects
(‘:project’)
/Disciplines(‘:discipline’)/
Nls(‘:language’)
/Warehouses

BnlId

Unique ID of the bin location

Decimal

Optional

To view available bin
locations, use:

GET https://{host}/Smat/V1/Projects
(‘:project’)
/Disciplines(‘:discipline’)/
Nls(‘:language’
)/BinLocations

SmstId

Unique ID of the site material status.
When a new record is inserted,
site material status is set, based on
the project default ZC_STATUS.
You can overwrite the project default.

Decimal

Required

To view available site
material status, use:

GET

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

ItemShipId

Unique ID of the Item Shipments and
is required only for MRR by PO.

Decimal

Optional

To view available item shipments, use:

GET

https://{host}/Smat/V1/Projects
(':project')
/Disciplines(':discipline')/
Nls('language')
/ItemShipments

Ident

Ident number and is required only
for MRR by Direct receive.

Decimal

Optional

To view available idents,
use:

GET

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

RecvQty

Quantity received for this item shipment

Decimal

Optional

  • If the revision of the MRR
    is greater than 0,
    you can only revise the
    quantity that is not
    reserved or issued.

  • You cannot post
    MRR without a
    heat number or the
    correct heat quantity
    (received in a lower revision).

  • Allowed values for
    RecvQty is 0-99999999.

RecvDate

Date and time when the material is received

Date Time Offset

Optional

Acceptable format is YYYY-MM-DD.

UnitId

Unique ID of the unit

Decimal

Optional

To view available units,
use:

GET https://{host}/Smat/V1/Projects(
‘:project’)
/Disciplines(‘:discipline’)/
Nls(‘:language’)
/Units

TagNumber

Tag number of the item shipment

String

Optional

Maximum allowed length is 60.

HeatNumber

Name of the heat number

String

Optional

To view available heats,
use:

GET

https://{host}/Smat/V1/Projects
(':project')
/Disciplines(':discipline')/
Nls(':language')
/Heats

CertificateNumber

Certificate Number

String

Optional

You can update a
certificate number
only when a new
heat number is
defined.

Maximum allowed length is 30.

Manufacturer

Name of the manufacturer

String

Optional

You can update a
manufacturer name
only when a new heat
number
is defined.

Maximum allowed length is 30.

FileLocation

File Location

String

Optional

You can update a
file location only
when a new heat
number
is defined.

Maximum allowed length of URL is 30.

EsTagShortDesc

Specifies short description of the TAG

String

Optional

Maximum allowed length is 2000.

EsTagDescription

Specifies the TAG description

String

Optional

Maximum allowed length is 2000.

ItyCode

Name of the item type

String

Optional

Maximum allowed length is 10.

ItrId

Unique ID of the inventory transfer

ItrId is required to add Inventory Receipts Details
to
Material Receiving Report of type MTR/Voucher.
In this scenario, Ident/TagNumber/ItyCode will be ignored.

Integer

Optional

To view existing ItrId use:

GET https://{host}/Smat/V1/Projects(‘:project’)
/Disciplines(‘:discipline’)/Nls(‘:language’)
/InvTransfers

Sample Code

Example 1, Use following for the MRR by Direct Receive:

POST https://host/smat/v1/Projects('AB')/Disciplines('PIPING')/Nls('English')/ReceivingHeaders(5689)/Com.Ingr.Smat.V1.InvReceipts/

{

"invReceipt":{

"LocId":6783,

"WhId":5921,

"SmstId":5681,

"Ident":73354280,

"RecvQty":500,

"RecvDate":"2016-05-24",

"UnitId":502543,

"TagNumber":"---",

"HeatNumber":"330PLT11 S123 $ H1",

"CertificateNumber":"CERTIFICATE 1",

"Manufacturer":"hcci",

"FileLocation":"",

"EsTagShortDesc":"tag short description",

"EsTagDescription":"tag description",

"ItyCode":"SPOOL"

}

}

Example 2, Use following for the MRR by PO:

POST https://host/smat/v1/Projects Projects('AB')/Disciplines('PIPING')/Nls('English')ReceivingHeaders(5689)/Com.Ingr.Smat.V1.InvReceipts/

{

"invReceipt":{

"LocId":6783,

"WhId":5921,

"RecvQty":500,

"RecvDate":"2016-05-24",

"HeatNumber":"330PLT11 S123 $ H1",

"CertificateNumber":"CERTIFICATE 1",

"Manufacturer":"hcci",

"FileLocation":"",

"EsTagShortDesc":"tag short description",

"EsTagDescription":"tag description",

"ItyCode":"SPOOL",

"SmstId":5681,

"ItemShipId":10000391352

}

}

Success Response
Status: 200 OK

{

"@odata.context": " https://{host}/Smat/V1/$metadata#Edm.Int64",

"value": 10000114458

}

Where value is the Unique ID of the Inventory Receipt (IrpId).