<h2>JSON response status</h2><br/><div style="overflow-x:auto"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta content="text/html; charset=UTF-8" /><meta name="copyright" content="(C) Copyright 2025" /><meta name="DC.rights.owner" content="(C) Copyright 2025" /><meta name="generator" content="DITA-OT" /><meta name="DC.type" content="concept" /><meta name="DC.title" content="JSON response status" /><meta name="abstract" content="JSONv2 requests may return one of several response statuses." /><meta name="description" content="JSONv2 requests may return one of several response statuses." /><meta name="DC.subject" content="Web Service, JSON v2" /><meta name="keywords" content="Web Service, JSON v2" /><meta name="DC.relation" scheme="URI" content="../../../integrate/inbound-other-web-services/concept/c_JSONv2WebService.html" /><meta name="DC.relation" scheme="URI" content="../../../build/applications/concept/api-implementation-reference.html" /><meta name="DC.relation" scheme="URI" content="../../../build/applications/concept/api-implementation.html" /><meta name="DC.relation" scheme="URI" content="../../../integrate/web-services/reference/r_AvailableWebServices.html" /><meta name="DC.relation" scheme="URI" content="../../../integrate/web-services/concept/inbound-web-services.html" /><meta name="DC.creator" content="ServiceNow" /><meta name="DC.date.created" content="2023-08-03" /><meta name="DC.date.modified" content="2023-08-03" /><meta name="DC.format" content="XHTML" /><meta name="DC.identifier" content="c_ResponseStatus" /><link rel="stylesheet" type="text/css" href="../../../CSS/commonltr.css" /><title>JSON response status</title></head><body id="c_ResponseStatus"> <div class="breadcrumb"><a class="link" href="../../../build/applications/concept/api-implementation-reference.html" title="Get started using ServiceNow APIs with guides, resources, and reference documentation.">API implementation and reference</a> > <a class="link" href="../../../build/applications/concept/api-implementation.html" title="You can use JavaScript APIs to extend application server and client functionality. Use web services to connect ServiceNow applications to other software applications.">API implementation</a> > <a class="link" href="../../../integrate/web-services/reference/r_AvailableWebServices.html" title="HTTP-based web services allow diverse applications to talk to each other. ServiceNow supports both inbound (provider) and outbound (consumer) web services.">Web services</a> > <a class="link" href="../../../integrate/web-services/concept/inbound-web-services.html" title="You can use any of several web services to integrate with ServiceNow applications, including REST, SOAP, JSONv2, and RSS.">Inbound web services</a> > </div> <h1 class="title topictitle1" id="ariaid-title1">JSON response status</h1> <div class="body conbody"><p class="shortdesc">JSONv2 requests may return one of several response statuses.</p> <div class="section"><h2 class="title sectiontitle">JSON Success Response</h2> <p class="p">Each JSON success response includes a record array containing the records retrieved by the given action. Each JSON object contains one or more metadata elements, prefixed with __, regarding the status for the action on each record, as illustrated in the previous examples. The JSON success responses use the following syntax:</p> <p class="p">__status</p> <pre class="pre codeblock"><code>"__status": "<value>"</code></pre> <p class="p">where <value> is success or failure.</p> </div> <div class="section"><h2 class="title sectiontitle">JSON Failure Response</h2> <div class="p">When the <code class="ph codeph">_status</code> element returns failure, the <code class="ph codeph">_error</code> element is added to identify the error and reason.<pre class="pre codeblock"><code>"__error": { "message": "<error value>", "reason": "<reason value> "} </code></pre></div> <p class="p">where <code class="ph codeph"><error value></code> is the error message text and <code class="ph codeph"><reason value></code> is the reason the error was triggered.</p> <p class="p">The JSON error response contains only the error and reason elements. Generally, this indicates that the whole JSON operation failed and no records can be processed.</p> <div class="p">For example:<pre class="pre codeblock"><code>{"_error":"Cannot update with empty sysparm_query","reason":null}</code></pre></div> </div> </div> <div class="related-links"> <div class="familylinks"> <div class="parentlink"><strong>Parent Topic:</strong> <a class="link" href="../../../integrate/inbound-other-web-services/concept/c_JSONv2WebService.html" title="The ability to describe sets of data in JSON format is a natural extension to the JavaScript language.">JSONv2 web service</a></div> </div> </div></body></html></div>