Material API
Welcome to the Material API documentation. This API provides a comprehensive set of functions for managing and interacting with materials within the system. Below is a list of available functions, each with a brief description and a link to its detailed documentation.
Function List
newMaterialClass
Generates an empty non-persisted Material Classes object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveMaterialClass method in order to persist the record. Returns a JSON representation of the newly created material class object.
saveMaterialClass
Creates or updates a Material Classes record in the system based on the provided parameters. Returns a JSON representation of the saved material class.
createMaterialClassesForPath
Creates Material Classes objects for each name in the specified path if they do not already exist, setting their respective parents. No response is returned.
doesMaterialClassExist
Checks if a Material Classes object with the given ID or path exists. Returns a boolean indicating whether the material class exists.
findMaterialClasses
Retrieves Material Classes records based on the specified pagination, sort, and column constraint parameters. Returns a Query Result object.
getMaterialClass
Retrieves a Material Classes record by its ID or path. Returns a JSON representation of the material class. Returns nothing if no material class is found.
getAllMaterialClasses
Retrieves a list of all Material Classes records in the system. Returns a list of JSON objects representing all material classes.
getMaterialClassReferences
Retrieves a list of references to a Material Classes record by its ID or path. Returns a list of JSON objects.
validateMaterialClass
Validates the specified parameters for a Material Classes record and returns any validation errors. This only checks if the material class object can be saved based on the attributes given. Returns a JSON object where keys are field names and values are lists of validation violation messages.
deleteMaterialClass
Deletes a Material Classes record by its ID or path. This cannot delete a material class with references to it. If successful, an ApiResponse Object is returned with the success bool set True.
deleteMaterialClasses
Deletes all Material Classes records by the given IDs or paths. This cannot delete any material classes with references to it. If successful, an ApiResponse Object is returned with the success bool set True.
newMaterial
Generates an empty non-persisted Materials object to provide the structure required by the API to save a new record into the database. This method must be combined with the saveMaterial method in order to persist the record. Returns a JSON representation of the newly created material object.
saveMaterial
Creates or updates a Materials record in the system based on the provided parameters. Returns a JSON representation of the saved material.
doesMaterialExist
Checks if a Materials object with the given ID or path exists. Returns a boolean indicating whether the material exists.