Logic for saving signature-api data to the database.