Purpose: Create a new edgeband type in materialManager from the ERP material master.
Prerequisites: materialManager license with the Connect interface, client configured.
Code
using HomagConnect.MaterialManager.Contracts.Material.Edgebands.Enumerations;
using HomagConnect.MaterialManager.Contracts.Request;
var request = new MaterialManagerRequestEdgebandType
{
EdgebandCode = "ABS_White_1mm",
Height = 20,
Thickness = 1.0,
DefaultLength = 23.0,
MaterialCategory = EdgebandMaterialCategory.ABS,
Process = EdgebandingProcess.Other
};
var edgebandType = await client.Material.Edgebands.CreateEdgebandType(request);
The request is multipart/form-data. The edgebandTypeRequest field contains the JSON body, optionally followed by files (e.g. images).
curl -u "<SubscriptionId>:<Berechtigungsschlüssel>" \
-X POST "https://connect.homag.cloud/api/materialManager/materials/edgebands" \
-F 'edgebandTypeRequest={
"edgebandCode": "ABS_White_1mm",
"height": 20,
"thickness": 1.0,
"defaultLength": 23.0,
"materialCategory": "ABS",
"process": "Other"
};type=application/json'
Contracts used
| Field | Required | Constraint | Typical value |
|---|---|---|---|
EdgebandCode |
yes | max. 50 characters | ABS_White_1mm |
Height |
yes | 0.1–999.9 mm | 20 |
Thickness |
yes | 0.01–99.99 mm | 1.0 |
MaterialCategory |
yes | EdgebandMaterialCategory |
ABS |
Process |
yes | EdgebandingProcess |
Other |
DefaultLength |
no | 0–2000 | 23.0 |
ProductName |
no | max. 200 characters | |
Comments |
no | max. 300 characters |
Contract: MaterialManagerRequestEdgebandType → response EdgebandType. See the Data model for all fields.
Common errors
| Error | Cause | Solution |
|---|---|---|
ValidationException (C#) / 400 |
Required field is missing or value is out of range | Check the constraints above |
| 409 / 400 | EdgebandCode already exists |
Update the edgeband type |
To verify: Serialization of enums in the REST body (name vs. number) and status code for a duplicate.
Used in: Edgeband management (#2)
