Difference between HttpStatus.OK and HttpStatus.ACCEPTED
As per the Spring documentation given at this link
200 Ok means the request was successful. The information returned with the response depends on the method used in the request
202 Accepted. means that the request has been accepted for processing, but processing has not yet been completed. The request may or may not be subsequently applied as it may be prohibited when processing actually takes place.
for more information on HTTP response code definitions please visit the link
source to share