Working POST thing which creates collections and does related error checking. Doesn't save the materialItems yet. Almost there though.