TAG LINE
TAG LINE
SMALL TITLE

API Logging

Last Updated: Wed Mar 24 2021

LogiSense logs all API requests as well as the responses.

JSON API Log

The JSON API log within the application contains the header and body for all requests and responses. This log can aid you while developing by providing details of both good and bad requests.

Request

The request tab allows you to view the request body and header. The request body and header details of a good request made from the UI can be used as a guide for developing your own integrations. For example, an order entry integration would need to make use of the same APIs for creating an account, adding a contact, and products to the account. By first completing each operation the UI, a developer can then view the associated log entries for a well-formed request.

Response

The response tab allows your to view the request body and header. As a developer you will strive for successful requests. However, error responses can guide you in this process. Here is an example of a successful patch response:

{
    "trackingId": "956ecc28-c423-40ab-b7c9-dd975204601c",
    "type": "patch",
    "results": {
      "totalCount": 1,
      "items": [
        {
          "action": "retrieved",
          "dtoTypeKey": "processRegister",
          "instance": {
            "Affected": 1,
            "Successful": true,
            "ErrorsFound": false,
            "Errors": []
          }
        }
      ]
    }
  }

Bad Request Error Messages

LogiSense's response to bad requests includes all errors not just the first error found. The form of the error object is below:

Error Property

code

"code": 10400000
Type: Number
An internal error code

message

"message": "'Name' validation requires the additional constraint property value 'StateId' to be included in the payload and greater than zero."
Type: String
The human-readable form of the error.

A sample of errors in the response:

{
    "trackingId": "92b7c602-6a15-4edf-aec5-eb29c0cdeff3",
    "type": "create",
    "errors": [
      {
        "code": 11900000,
        "message": "'SortOrder' MUST be greater than '0' when adding or updating a 'City'."
      },
      {
        "code": 13100000,
        "message": "'StateId' (264) does not exist in 'State' for 'City'."
      },
      {
        "code": 2000,
        "message": "Errors found.  Transaction aborted."
      }
    ]
  }