Skip to main content

machineCreate

Create a new spare parts machine.

Registers a new machine in the system with all associated spare parts, hierarchical relationships, and external references. Supports complex nested machine structures and multilingual content.

Slugs: every language with a name gets a slug generated from it, unless one is supplied in slug. A supplied slug always wins and is stored exactly as sent; it must contain only lowercase letters, digits and single hyphens (for example "pump-a"), or be a legacy slug as this service generates it (for example "pump-(a)"), otherwise the request fails validation and nothing is written. Generation follows useStandardSlugs on the top-level input, which nested machines inherit (setting it to true on a nested machine fails the request): legacy by default ("Pump (A)" generates "pump-(a)"), the product algorithm when true ("Pump (A)" generates "pump-a"). Slugs are not unique: a slug another machine already holds is stored again, without a suffix and without an error. Keeping slugs unique is the caller's responsibility.

Possible errors:

  • SPARE_PARTS_EXTERNAL_REFERENCE_KEY_ALREADY_EXISTS_ERROR: External reference already exists in the system
  • SPARE_PARTS_EXTERNAL_REFERENCE_KEY_DUPLICATES_FOUND_ERROR: Duplicate external references found in the payload
  • SPARE_PARTS_EXTERNAL_REFERENCE_CREATE_ERROR: Failed to create external reference
  • SPARE_PARTS_UNKNOWN_ERROR: Unexpected error during machine creation

AUTH: Role=[product.OWNER]

machineCreate(
input: CreateSparePartsMachineInput!
): SparePartsMachine!

Arguments​

machineCreate.input ● CreateSparePartsMachineInput! non-null input​

Machine creation data.

Complete specification for the new machine including external references, localized content, spare parts, and hierarchical relationships.

Type​

SparePartsMachine object​

Represents a machine that contains spare parts and can have hierarchical sub-machines.

Core entity for organizing spare parts catalogs with support for nested machine structures, localized content, and external system integration.