Using Post Api Response as a way to trigger an edit of locally stored records

I’m attempting to save records on my back end and locally and have been able to do so successfully. What I cannot seem to figure out is how to use my API response as a way to have the identical local record update a true/false data variable that would tell the user whether or not that record has been uploaded to the backend successfully.