Read a board type

Prev Next

Purpose: Find a board type by its board code, for example to compare the material code and thickness before an optimization.

Prerequisites: materialManager with the Connect interface, MaterialManagerClient configured, and a board code from the material master.

Code

var board = await client.Material.Boards.GetBoardTypeByBoardCode("P2_White_19_2800x2070");

if (board is null)
{
    Console.WriteLine("Kein Plattentyp mit diesem Plattencode gefunden.");
}
else
{
    Console.WriteLine($"{board.BoardCode}: {board.MaterialCode}, {board.Thickness} mm");
}
GET https://connect.homag.cloud/api/materialManager/materials/boards?boardCode=P2_White_19_2800x2070
Authorization: Basic <base64(SubscriptionId:Berechtigungsschlüssel)>
Accept: application/json

200 OK (excerpt):

[
  {
    "boardCode": "P2_White_19_2800x2070",
    "materialCode": "P2_White_19",
    "thickness": 19,
    "length": 2800,
    "width": 2070
  }
]

REST returns a list even if only one board code is specified. The SDK call shown returns the first match as a single object.

Contracts used

Contract Usage
BoardType Output: master data for a board type, not the inventory of individual boards.

Common errors

Result What to check
No match ([] in REST, null in the SDK call) Do not confuse boardCode with materialCode, and check the subscription.

Next: Board management and offcuts · View and test endpoint