Product (Update)
Updates an existing Product.
Authentication
Every request needs both of the following:
- An authorized UserID, passed in to the request body — this is the user's cieTrade.net email.
- A Bearer Token in the Authorization header of your tool or code call. The token is found under Settings → Integration → Api Token.
The user must have Can Access cieTrade API checked under Settings → Users & Roles, and must have an email address on their user record — the create and update endpoints record that user against every change they make.
Request Example
{
"UserID": "example@email.net",
"GradeID": "OCC11",
"ProductName": "Old Corrugated Containers #11",
"ProductReference": "OCC-11",
"SKU": "SKU-10045",
"ProductCategory": "Fiber",
"ProductGroup": "OCC",
"SalesAcct": "Sales - Fiber",
"PurchAcct": "Purchases - Fiber",
"CommodityDesc": "Baled old corrugated containers",
"UseAsWasteGrade": false,
"ShowCommDescOnDocs": true,
"WhProductType": "INPUT",
"ReportProductType": "PAPER",
"UDF1": "",
"UDF2": "",
"UDF3": "",
"ScrapAutomobileGrade": false,
"GSMFactor": 0
}
Body Parameters
| Parameter | Description | Required |
|---|---|---|
UserID |
cieTrade.NET User Email. Used for Authentication and Logging. | REQUIRED |
GradeID |
ID of the product to update. Must match an existing Product in cieTrade. The ID itself cannot be changed. | REQUIRED |
ProductName |
Product name. | REQUIRED |
ProductReference |
Product reference code. | OPTIONAL |
SKU |
Stock keeping unit. | OPTIONAL |
ProductCategory |
Product category. Must match a Product Category in cieTrade. | OPTIONAL |
ProductGroup |
Product group. Must match a Product Group in cieTrade. | OPTIONAL |
SalesAcct |
Sales GL account. Must match a GL Account in cieTrade. | REQUIRED |
PurchAcct |
Purchase GL account. Must match a GL Account in cieTrade. | REQUIRED |
CommodityDesc |
Commodity description. | OPTIONAL |
UseAsWasteGrade |
Marks the product as a waste grade. Accepts true or false. Defaults to false. |
OPTIONAL |
ShowCommDescOnDocs |
Shows the commodity description on documents. Accepts true or false. Defaults to false. |
OPTIONAL |
WhProductType |
Warehouse product type. Accepts INPUT or OUTPUT (or I / O). |
OPTIONAL |
ReportProductType |
Report product type. Accepts WASTE, RECYCLE, LANDFILL, PLASTICS, PAPER, METALS, WOOD, ORGANICS, ELECTRONIC SCRAP, NON LANDFILL. |
OPTIONAL |
UDF1 – UDF3 |
User-defined fields 1 through 3. | OPTIONAL |
ScrapAutomobileGrade |
Marks the product as a scrap automobile grade. Accepts true or false. Defaults to false. |
OPTIONAL |
GSMFactor |
GSM factor. Defaults to 0. | OPTIONAL |
Updating Fields
Every field is replaced with the value sent in the request. Any optional field that is omitted or sent empty is cleared on the product, and omitted true/false fields are set to false.
To change a single field, send the product's current values for all other fields along with the new value.
Fields That Cannot Be Updated
GradeID, UOMType and InventoryType cannot be changed through the API. UOMType and InventoryType are ignored if sent.
Response Example
On Success [HTTP 200]:
{
"Msg": "Successfully Updated Product Old Corrugated Containers #11"
}
On Error [HTTP 500/HTTP 401/HTTP 400]:
{
"ErrMsg": "Error: Unable to find Product 10483in cieTrade."
}