Azure API Management: Instead 202 Accepted how to return 200 Ok HTTP status for a POST request from azure api management

Vivek Komarla Bhaskar 20 Reputation points


My client wants the response to be 200 Accepted instead of 202 Accepted for a POST API call I have created on Azure API Management calling a logic app. How can I achieve this?

Here are few screenshots of my API on Azure API Management & Logic App -




Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,930 questions
A cloud computing platform and infrastructure for building, deploying and managing applications and services through a worldwide network of Microsoft-managed datacenters.
1,063 questions
{count} votes

Accepted answer
  1. Aki Nishikawa 1,305 Reputation points Microsoft Employee

    Hello @Vivek Komarla Bhaskar ,I'm not sure why your client does not return 200 with Response action in Logic Apps, but if they need to change HTTP status returned by Logic Apps, they need to use policies to modify HTTP status returned from the backend Logic Apps.

    Here is a sample code. This code changes HTTP status to 200 if response status code is equal to 202.

        <base />
            <when condition="@(context.Response.StatusCode==202)">
                <set-status code="200" />
            <otherwise />

    User's image

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful