When working with Azure cloud services like Azure Logic Apps or Azure Automation (Runbooks), you often come across that service endpoints return 202 Accepted instead of 200 OK on success. But why do they do that, and what is the difference between the two?
200 OK means that the request has succeeded and the processing of our request is done. The response is the final payload and the service will not take further actions.
202 Accepted on the other hand means that the request have been accepted for processing, and the service will now start. This does not mean that the processing itself is a success, nor that the process have ended.
The 202 accepted is therefor the equivalent of a fire-and-forget, and all you know is that the fire was a success. With 200 OK you should expect the processing not only to be done but also be successful.
MORE TO READ: