Overview
Catalog mutations enable creating, updating, and deleting catalog types and catalog items. These operations are authenticated and include audit trail tracking.All mutations require authentication via the
[Authorize] attribute. User information is automatically captured for audit purposes.Catalog Type Mutations
CreateCatalogoTipo
Create a new catalog type. MutationCatalog type data to create
Catalog type name
Catalog type code (unique identifier)
Parent catalog type ID (for hierarchical catalogs)
Generated catalog type ID
Catalog type name
Catalog type code
Active status (defaults to true)
Parent catalog type ID
Parent catalog type details
Child catalog items
UpdateCatalogoTipo
Update an existing catalog type. MutationCatalog type data to update
Catalog type ID to update
New catalog type name (optional)
New catalog type code (optional)
New parent catalog type ID (optional)
New active status (optional)
Catalog type ID
Updated catalog type name
Updated catalog type code
Updated active status
Associated catalog items
- Catalog type must exist (404 error if not found)
- At least one field must be provided for update (400 error if nothing to update)
DeleteCatalogoTipo
Delete a catalog type. MutationCatalog type ID to delete
Deleted catalog type ID
Deleted catalog type name
Deleted catalog type code
- Catalog type must exist (404 error if not found)
Catalog Item Mutations
CreateCatalogoItem
Create a new catalog item within a catalog type. MutationCatalog item data to create
Catalog item name
Catalog item code
SAP code for integration
Display order
Catalog type ID this item belongs to
Parent catalog item ID (for hierarchical items)
Generated catalog item ID
Catalog item name
Catalog item code
SAP code
Display order
Active status (defaults to true)
Associated catalog type ID
Associated catalog type details
Parent catalog item
Child catalog items
UpdateCatalogoItem
Update an existing catalog item. MutationCatalog item data to update
Catalog item ID to update
New catalog item name (optional)
New catalog item code (optional)
New SAP code (optional)
New display order (optional)
New active status (optional)
New catalog type ID (optional)
New parent catalog item ID (optional)
Catalog item ID
Updated catalog item name
Updated catalog item code
Updated SAP code
Updated display order
Updated active status
Associated child items
- Catalog item must exist (404 error if not found)
- At least one field must be provided for update (400 error if nothing to update)
DeleteCatalogoItem
Delete a catalog item. MutationCatalog item ID to delete
Deleted catalog item ID
Deleted catalog item name
Deleted catalog item code
- Catalog item must exist (404 error if not found)
Error Handling
All mutations implement consistent error handling:Not Found (404)
Returned when attempting to update or delete a catalog that doesn’t exist:Bad Request (400)
Returned when no fields are provided for update:Server Error (500)
Returned for unexpected errors during processing:Audit Trail
All mutations automatically capture audit information: On Create:usuarioCreacion: Email of the creating user (from JWT token)fechaCreacion: Current timestamp
usuarioModificacion: Email of the modifying user (from JWT token)fechaModificacion: Current timestamp
Authorization
All mutations require a valid JWT token with the[Authorize] attribute. The user’s email is extracted from the HTTP context for audit purposes.
Example Headers: