Create Material Receiving Report header - 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 creates a Material Receiving Report (MRR) header in Smart Materials.

Required Privilege: API_CREATE_MRRHEADER

You can create only two types of MRR, using this API.

  • MRR by Purchase Order (PO)

  • MRR by Direct Receive

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

Specify values for project, discipline, and language in the URL. The project, discipline, and language together, define the project environment where the MRR header is created.

Element

Description

Type

Required

Notes

MrrNumber

Name of the MRR

String

Optional

Maximum allowed length is 50.

If no value is passed, then
the MRR number is generated
based on the MRR rule.

RevisionId

Unique ID of the current MRR revision

Decimal

Optional

Allowed range is 0-99999 and
default value is 0.

MrrCreateDate

Date and time of the MRR creation

Date Time Offset

Optional

Application takes the current
date automatically
as MrrCreateDate. Even if user provides the date,
the value is ignored.

RecyType

Type of receiving. Allowed types are:

  • C: Client Supply

  • P: Other Project Supply

  • F: Field PO

  • O: Others

  • S: Other Site

  • V: MTR/ Voucher

  • W: Corporate Warehouse.

String

Optional

BnIId

Unique ID of the bin location.
To view available
bin locations,
use:

GET

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

Decimal

Optional

  • If project default ZC_BIN_LOC have value WHTU,
    then Bnlld is ignored.

  • If project default ZC_BIN_LOC have value BLOC,
    then Bnlld is required.

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

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

SmstId

Unique ID of the site material status.

  • When a record is
    inserted, site material
    status is set based on the project default
    ZC_STATUS.
    This project default can be overwritten.

  • If revisionId is 0, then SmstId is a required field.

Decimal

Optional

To view available
site material status,
use:

GET

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

SgId

Unique ID of the shipment group.

By providing shipment group, you can restrict the
number of item shipments of an order to the material placed in a
shipment group.

When you click Populate Groups,
only item shipments of the related shipment group
are considered.

Decimal

Optional

To view available shipment groups,
use:

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

PohId

Unique ID of the purchase order header

Decimal

Optional

To view existing purchase order headers,
use:

GET

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

MatRecvDate

Date and time, when the material is received

Date Time Offset

Optional

Acceptable format is YYYY-MM-DD.

RecvBy

Name of the user, who has received the material

String

Optional

Maximum allowed length is 80.

Shipper

Company which has shipped the material

String

Optional

Maximum allowed length is 40.

ShipperRefNo

Reference number of the shipper

String

Optional

Maximum allowed length is 20.

PopllshByProc

Allowed values are Y and N.

  • If value Y is passed,
    item shipments from the procurement
    populates automatically.

String

Optional

MtrId

Unique ID of the Material Transfer Report.

MtrId is required only when RecvType is V( MTR/Voucher).

Integer

Optional

To view existing MtrId use:

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

Sample Code

POST https://localhost:53965/SMAT/V1//Projects('AB')/Disciplines('PIPING')/Nls('English')/ReceivingHeaders

{

"WhId":6661,

"LocId":6783,

"SmstId":5681,

"RecvType":"C",

"MatlRecvDate":"2016-05-23",

"RecvBy":"Krishna 25th May",

"Shipper":"Krishna Shippers",

"ShipperRefNo":"Krishna-123-456"

}

Success Response

Status: 200 OK

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

"value": 10000039946

}

After creating MRR header, NLS description can be added using NlsDescription.