Returning values from Assets when created using the API

Not sure if this is the best fit here but will ask. I have some powershell scripts that I run that can create a schema in Assets, then one for objecttypes then one for attributes. I have to run each one then port the created values back into the next script to create the next items in the correct spots.

Is it possible to pass the values back from Assets when they are created via the API that can then be the variable for the next part of the script.

So schema is created, ID is passed back as a variable that is then used in the script to create the objecttypes?

Is this at all possible?