Docs

Add Component

POST /resourceTypes/{resourceTypeId}/components

POST/resourceTypes/{resourceTypeId}/components

Required Tokens

FieldTypeRequiredDescription
BearerAuthorization: Bearer <api-key>OptionalYour API key. Pass it as the Bearer token on every request.
Organization tokenx-Organization-TokenOptionalRun **Authorize Organization** in the Authorization folder.

Adds a component to a composite type. Applies to future procurements only.

Requires ResourceTypeDatabase.Edit permission.

Request Body

FieldTypeRequiredDescription
labelstringRequiredThe slot's name, e.g. "Driver".
targetResourceTypeIdGuidRequiredA non-composite type (no nesting).
targetResourceVariantIdGuidOptionalA live variant of the target to pin. Null means any.
quantityintRequiredPer composite unit, at least 1.
indexintOptionalPosition. Null appends on add and keeps the position on edit.

Response

201 Created with { "id": "<componentId>" }.

Error Codes

HTTP StatusDescription
400The type isn't composite, the target is composite, or the variant isn't the target's.
404Type, target or variant not found.
403Missing permission.