The profile object
The JSON body accepted by POST /api/v1/profiles. A profile is a name plus
an ordered list of features that describe the cross-section, walking from one edge of the blank to
the other.
Profile fields
| Field | Type | Required | Notes |
|---|---|---|---|
profileName | string | yes | Must not be empty. Not required to be unique. |
features | array | yes | See Features. Must not be empty. |
description | string | no | Free text. This travels to the machine and is visible to whoever pulls the profile up — the usual place for an operator note. |
owningCatalogId | integer | no | Must be one of your tenant's catalogs (see List Catalogs) or you get a 400. Defaults to your tenant's default catalog. Determines which machines can receive the profile — see Machine sync. |
category | string | no | Free text, one level of grouping. Also used by the library's browse filters. |
subCategory | string | no | Free text, nested under category. |
paintedSide | string | no | "Positive", "Negative", or omitted for none. |
Fields you may not set: blankWidth (computed by the server as the sum of feature lengths),
profileId, revision, and the create/edit stamps. All are assigned server-side and echoed in the
response.
Features
features is an alternating, odd-length list:
- index 0, 2, 4, … must be
Straight - index 1, 3, 5, … must be anything but
Straight - therefore it always starts and ends with a
Straight, and always has an odd count
Violating this returns:
[ "Features must be a list of feature objects, that alternates between Straight and non-Straight types, and always starts and ends with a Straight." ]
A flat strip with no bends is legal — a single Straight is a valid profile.
Feature types and their fields
Each feature needs type; which other fields matter depends on it. Fields not listed for a type are
ignored, and a hemHeight sent on anything other than an OpenHem is discarded.
type | Required fields | Meaning |
|---|---|---|
Straight | length > 0 | A flat segment. |
Angle | angle, where |angle| < 180 | A sharp bend of angle degrees. |
Radius | radius > 0, radiusQuality, angle | A rounded bend. |
OpenHem | hemHeight > 0, hemDirection | A folded edge with a gap. |
ClosedHem | hemDirection | A fully flattened folded edge. |
TearDropHem | hemDirection, hemClampOffset ≥ 0 | A teardrop-shaped folded edge. |
Field reference
| Field | Type | Notes |
|---|---|---|
type | string | One of the six above. |
length | decimal | Length of a Straight, in your tenant's units. Must be > 0. |
angle | decimal | Bend angle in degrees, not an included angle: 90 is a 90° bend. Must be strictly between -180 and 180. The sign sets the bend direction — 90 and -90 bend opposite ways. |
radius | decimal | Radius of a Radius bend. Must be > 0. |
radiusQuality | string | "Coarse", "Medium", or "Fine" — how finely the radius is approximated. Required on a Radius; there is no default. |
hemDirection | string | "Positive" or "Negative". Required on all three hem types — omitting it is an error, not a default. |
hemHeight | decimal | Gap height of an OpenHem, > 0. Ignored (stored as 0) on every other type. |
hemClampOffset | decimal | Clamp offset for a TearDropHem, ≥ 0. |
name | string | Optional label for this feature, for your own external references (e.g. matching a punch pattern). Trimmed; must be unique within the profile, compared case-insensitively. Omit it and nothing changes. Library-side only — feature names are not sent to the machine. |
blankWidth is the sum of every feature's length. Angles and hems contribute nothing; a Radius
contributes its radius.
Example
A hemmed channel: open hem, up 90°, across, up 90°, teardrop hem.
{
"profileName": "A Sample Profile",
"description": "Rush — check the 3rd bend",
"owningCatalogId": 20115,
"category": "Quirky Parts",
"subCategory": "Awkward",
"features": [
{"type":"Straight", "length":0.5},
{"type":"OpenHem", "hemHeight": 0.25, "hemDirection":"Negative"},
{"type":"Straight", "length":10},
{"type":"Angle", "angle": 90.0},
{"type":"Straight", "length":10},
{"type":"TearDropHem", "hemDirection":"Positive"},
{"type":"Straight", "length":0.5}
]
}
blankWidth comes back as 21 — 0.5 + 10 + 10 + 0.5.
Validation errors
A 400 returns a JSON array of messages. The full set:
"ProfileName must not be empty."
"OwningCatalogId must refer to a valid catalog."
"Features list cannot be empty."
"Features must be a list of feature objects, that alternates between Straight and non-Straight types, and always starts and ends with a Straight."
"Feature names must be unique within a profile."
"Valid angle values are -180° - 180°."
"Hems must have a hemDirection of 'Positive' or 'Negative'."
"Open hems require a non-negative hemHeight."
"Teardrop hems require a non-negative hemClampOffset"
"Radius bends require a non-negative radius."
"Radius bends must have a radiusQuality of 'Coarse', 'Medium', or 'Fine'."
"Straight features require a non-negative, non-zero length."
Malformed JSON, or an unrecognized value in an enum field like type or hemDirection, currently
returns a 500 rather than a 400. If you get a 500 from a POST, check those first.