This method allows adding/editing a supply by means of a REST web service.
Service URL
|
http://<domain>/apigateway/se/generic/gn_webservice/gn_webservice_execute.php
|
Input parameters
|
ID #
|
Constant value
|
Parameter
|
Type
|
Description
|
cdprod
|
149
|
QUERY
|
NUMERIC
|
Product code
|
classname
|
supply_insert_interface
|
QUERY
|
STRING
|
Class name used in WADL
|
classpath
|
sp_import
|
QUERY
|
STRING
|
Path to the class used in WADL
|
Request body
|
{
"idobject": "string",
"nmobject": "string",
"idobjecttype": "string",
"idteam": "string",
"vlcost": "string",
"idmeasunity": "string",
"dtrevision": "string",
"idcolor": "string",
"idodor": "string",
"idonucode": "string",
"idabntcode": "string",
"iddangerousness": "string",
"idclassification": "string",
"fgcontrol": "string",
"fgphysicalstate": "string",
"iduser": "string",
"attributes": "string",
"dsobservation": "string",
"dsconstituents": "string"
}
|
Output parameter
|
{
"success": true,
"total": 1,
"results": [
{
"Result": true,
"Code": 1
}
]
}
|
To insert each of these requirement items, the standard documented below must be followed.
Request
|
ID #
|
Required
|
Description
|
idobject
|
X
|
Supply ID #.
|
nmobject
|
X
|
Supply name
|
idobjecttype
|
X
|
Supply type ID #
|
idteam
|
X
|
Responsible team ID #.
|
idmeasunity
|
X
|
Measurement unit ID #
|
dtrevision
|
|
Revision date
|
idcolor
|
|
Color ID #
|
idodor
|
|
Odor ID #
|
idonucode
|
|
ONU code
|
idabntcode
|
|
ABNT code
|
iddangerousness
|
|
Hazard ID #
|
idclassification
|
|
Classification ID #
|
fgcontrol
|
|
Lot and series control [1 - Lot, 2 - Series]
|
fgphysicalstate
|
|
Physical state [1 - Solid, 2 - Liquid, 3 - Gas, 4 - Sludge]
|
vlcost
|
|
Hourly cost
|
iduser
|
X1
|
User ID
|
attributes
|
|
Asset attributes.
Example:
Attribute_ID_#=value1_of_attribute,value2_of_attribute,value3_of_attribute.
Note:
▪ For attributes with numeric value, the decimal place separator must be ‘.’ (point).
▪ For date fields, the value must have the "Y-M-D (Year-Month-Day)" format.
|
dsobservation
|
|
Comments
|
dsconstituents
|
|
General description of composition
|
|