Each B1WebAPI web service response from SAP Business One is contained within a common XML response envelope, as shown in the XML sample below.
<b1Reply:response requestType="schema" xmlns:b1Reply="http://www.zeditsolutions.com/2006/b1Reply">
    <b1Reply:uri>/query/[query].aspx?param1=[value]&format=dataset</b1Reply:uri>
    <b1Reply:status>OK</b1Reply:status>
    <b1Reply:payload></b1Reply:payload>
    <b1Reply:error />
</b1Reply:response>

There are four major sections:

  • Uri - This contains the original URI call from the application that executed the original B1WebAPI web service request. In the example above we triggered this response via the query API.
  • Status - The status field has 3 possible values that can be returned by the B1WebAPI web service:
    • OK - indicates the data is fine as-is.
    • ERROR - indicates the data has an error, as described by the error details below.
    • NOT LICENSED - indicates that the request was terminated due to the application not being licensed. See Requesting and Installing a License for Portals for details on how to apply a license.
  • Payload - The Payload element will contain the core XML of the query or object that was requested via the B1WebAPI web service.
  • Error - If the status is ERROR, then this XML element will contain the details of the error messages returned from SAP Business One or the B1WebAPI web service.