Link

Response

This method allows users to retrieve the data of a NetSuite Customer/Vendor/Item/SalesOrder/PurchaseOrder.

Response

As mentioned earlier, the Response will be returned in the form of Map<String, Object>.

Below are the list of Keys or Parameters returned in the Response Map:

Key (String)Value (Object)Additional Detail
version‘1.0’Returns the same version sent in the Request
actionSee the list of available actions.Returns the same action sent in the Request.
timestampTimestamp in milliseconds (Unix).The time at which the Response was returned, can be used to troubleshoot.
validRequestEither true or false.If the Request satisfies the Breadwinner validations, it will be returned as true.
apiErrorsThis will be a list of Errors returned as JSON.Errors which Breadwinner gets while validating the request and before making the request to NetSuite.
responseJSONReturns the response of the record(s) as a JSON string.This includes the records data as well as the NetSuite Errors.

Errors

There can be some exceptions within Breadwinner and NetSuite may throw some errors as part of our API actions and those errors are returned in separate layers in the form of JSON.

Before requesting NetSuite

Errors occurred while validating the request, or while making a request to NetSuite are returned as ‘apiErrors’, when these exceptions are there validRequest key will be sent as false.

These errors are returned as ‘apiErrors’ as a key of the Response map, and apiErrors is a list of Error objects.

After requesting NetSuite

Errors occurred within NetSuite while processing the request, or while processing the data in Breadwinner are sent as ‘errors’ in the responseJSON key of the Response map.

These errors are returned as ‘errors’ in the responseJSON which is a key of the Response map, and errors is a list of Error objects.

Error Object

Error object contains two String parameters

Field NameData TypeDescription
messageStringA detailed explanation of the Error occurred. Example: Breadwinner was unable to process the request as the action parameter was invalid.
codeStringFor some errors that could be handled programmatically, a short string indicating the error code reported.