Create a Material Issue Report header & description - 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 Issue Report (MIR) header and it's description in Smart Materials.

  • You can create MIR header of only two types of MIR; MIR by Direct Issue (D) and MIR by BOM Commodity (B) using this API.

  • You can create MIR header along with description of only one type of MIR; MIR by BOM Commodity (B).

Required Privilege: API_MIR

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')/IssueReports

Specify the values for the project, discipline, and language parameter in the URL. The project, discipline, and language together, defines the project environment where the MIR header & it's description is created.

Element

Description

Type

Required

Notes

MirNumber

Name (code) of the MIR.

SHARED Tip If MirNumber is not given by the user, system provide a number based on the MIR number rule.

String

Optional

Maximum allowed length is 50.

MirCreateDate

Date and time of the MIR creation

Date Time Offset

Optional

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

IssueDate

Date and time of the material issue

Date Time Offset

Required

In the absence of IsuueDate, application takes
the
current date in the format YYYY-MM-DD.

Issueby

Name of the user who has issued the MIR

String

Optional

Maximum allowed length is 80.

OverissueWhId

Unique ID of the warehouse used for overissue.

  • If OverIssue quantity is given, then the OverIssueWhId is a mandatory field.

  • All the warehouses that are mapped to the given company are allowed. However,

    • When project default ZC_BINLOC is set to WHTU, then this warehouse should be assigned to the logged in user.

    • When project default ZC_BINLOC is set to BLOC, then this warehouse should belong to the given BnlId (Sitecode).

Integer64

Optional

To view existing warehouses, use:

GET

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

To view existing warehouses for user, use:

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

To view existing bin loc warehouses, use:

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

CompanyId

Unique ID of the company.

It is a required field, if the given MIR type is MIR by BOM Commodity.

Integer64

Required /Optional

To view existing companies, use:

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

LocId

Unique ID of the location.

If OverIssue quantity is given, then LocId is a mandatory field.

Integer64

Optional

To view existing locations, use:

GET

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

BnlId

Unique ID of the bin location.

When project default ZC_BINLOC is set to BLOC, and over issue quantity is given, then BnlId is a mandatory field.

Integer64

Optional

To view existing bin locations, use:

GET

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

/Nls(‘:language’)
/BinLocations

MirType

Type of the MIR. Allowed options are:

  • MIR by BOM Commodity (B)

  • MIR by Direct Issue (D).

String

Optional

Based on the MIR type,
related parameters
vary.

IssueType

Issue type of a MIR.

Allowed issue type options depends on the type of MIR given.

  • If a given MIR type is MIR by Direct Issue (D), then allowed options are :

    • REGULAR

    • OTHERS

  • If a given MIR type is MIR by BOM Commodity (B), then allowed option is:

    • REGULAR.

String

Required

ScrapWhId

Unique ID of the warehouse used for scrap

Integer64

Optional

WorkOrder

Work Order / Agreement

String

Optional

Maximum allowed length is 50.

ShortDesc

Short description of the MIR header given by the user

String

Optional

Maximum allowed length is 20.

Description

Long description of the MIR header given by the user

String

Optional

Maximum allowed length is 60.

Sample Code

POST https://{host}/Smat/V1/Projects Projects('RS')/Disciplines('PIPING')/Nls('English')/IssueReports

   {  

    "MirNumber": "US0037", 

    "IssueBy": "sandeep",       

    "MirCreateDate" : "2006-05-17",   

    "IssueDate": "2006-05-17T00:00:00+05:30",

    "OverIssueWhId": 8461,

    "LocId": 10000000051,    

    "MirType": "B",

    "BnlId": 8751,

    "IssueType": "REGULAR",

    "CompanyId":79568,

    "ScrapWhId":7641,

    "WorkOrder":"WorkOrderTest",

"ShortDesc": "testshort",

"Description": "testlong"

}

Success Response
Status: 201 Created

{

    "@odata.context": "http://localhost:53427/SMAT/V1/$metadata#Projects('RS')/Disciplines('PIPING')/Nls('English')/IssueReports/$entity",

    "MirId": 10000054471,

    "ProjId": "RS",

    "DpId": 5020,

    "MirNumber": "US0037",

    "RevisionId": 4,

    "MirCreateDate": "2020-11-08T21:04:08+05:30",

    "PostedDate": null,

    "IssueDate": "2012-10-08T00:00:00+05:30",

    "IssueBy": null,

    "CompanyId": 5909,

    "OverIssueWhId": 8401,

    "LocId": 6842,

    "MirType": "B",

    "IssueType": "REGULAR",

    "DirectIssueType": null,

    "CommodityId": null,

    "Ident": null,

    "BnlId": null,

    "TagNumber": null,

    "ScrapWhId": null,

    "WorkOrder": null,

"ShortDesc": "testshort",

"Description": "testlong"

}

]}

Element

Description

Type

MirId

Unique ID of the created MIR

Integer64

ProjId

Unique ID of the project where the MIR gets created

String

DpId

Unique ID of the discipline where the MIR gets created

Integer64

RevisionId

Unique revision ID of the MIR.

Default value is 0.

Integer 16

PostedDate

Date and time when the MIR is posted by the user

Date Time Offset

DirectIssueType

Refers to the issue type, when the MIR type is MIR by Direct Issue (D).

String

WhId

Unique ID of the warehouse

Integer64

CommodityId

Unique ID of the commodity

Integer64

Ident

Ident

Integer64

TagNumber

Tag number

String