Using the API Log table

Learn how to best utilize the API Log is a table in Infoplus, which records all API calls that have been received by Infoplus over the API.

The API Log is a table in Infoplus that records all API calls that have been received by Infoplus over the API.  This includes both successful calls, as well as those that generated errors. Use this log to troubleshoot errors and to review activity from external systems into your Infoplus account.

Fields in the API Log table

  • Id - a unique identifier assigned to each log entry
  • Create Date - the timestamp of when the request was received by Infoplus.
  • User - Infoplus user associated with the API Key which was included in the API request.
  • Path - includes multiple pieces of information, including the API Version (e.g., v2.0 or beta), the table being accessed (e.g., order, item, customer), and possibly the id of the record or the search parameters.
  • Method - the HTTP method used to make the request.  Possible values and their meanings are:
    • GET - used when searching for records, or fetching a single record from Infoplus.
    • POST - used when creating a new record in Infoplus.
    • PUT - used when updating an existing record in Infoplus.
    • DELETE  - used to remove (delete) a record from Infoplus.
    • See https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods for additional background information about HTTP methods.
  • Request Body - for POST or PUT requests (i.e., when creating or updating a record), this field contains the JSON document which was received by Infoplus.
  • Response Code - numeric HTTP response status code, indicating the results of the request.  Possible values and their meanings are:
    • Success codes:
      • 200 - (OK) - General indication of a successful GET, PUT, or DELETE request.  Note that a GET search request which finds no records will return a 200 code, and an empty list in its response body.
      • 201 - (Created) - Specific indication of a successful POST request (i.e., a record was successfully created).
    • Client-side error codes:
      • 400- (Bad Request) - Indication that the Request Body could not be read by Infoplus. Indication of a client-side error in the JSON document sent by the client to Infoplus.
        • This error could be with the formatting of the JSON document, or a violation of a business rule.  Consult the Response Message for additional details. 
      • 401 - (Unauthorized) - Indication that the API Key sent with the request is not valid, or the user associated with the API Key does not have permission to access the requested resource.
        • To fix this kind of error, looking at the response body will tell you if it's a problem with your API key (error text:  "Invalid API-Key").  To fix this, you may create a new API Key from the User table, or just ensure that your key is correct for the site you are accessing.  See the Overview of the Infoplus API for information on creating an API Key.  
        • If your API Key is correct, but you are getting an error message of "Not Authorized", then your user (or the roles that it belongs to) do not have permission to do the type of operation (Read, Create, Edit, or Delete) on the table you are accessing.  See Overview of Users and Roles for more details. 
      • 404 - (Not Found) - Specifically for GET requests expected to return a single record as a result, this status code means that the requested record was not found in Infoplus.
        • To fix this kind of error, double-check the URL you are using.  It must contain the following components:
          • https://${CLIENTSUBDOMAIN}.infopluswms.com/infoplus-wms/api/${VERSION}/${TABLE}
            • Where ${CLIENTSUBDOMAIN} would be something like acmewarehouse
            • Where ${VERSION} would be something like v2.0 or beta
            • Where ${TABLE} would be something like order or item
    • Server-side error codes:
      • 500 - (Internal Server Error) - Indication of a server-side error within Infoplus while processing the request.  This could be a result of Infoplus not being able to process some of the data in your request, or it could indicate a potential issue within Infoplus.  
    • See https://developer.mozilla.org/en-US/docs/Web/HTTP/Status for additional background information about HTTP response status codes.
  • Response Message - JSON document describing the response sent by Infoplus for certain request types. Specifically intended to be used for capturing error responses sent (e.g., to describe a 400 or 500 error).  Note that not all response bodies (specifically, successful responses for GET or POST requests) are logged in this table. 

Example Usages

For a developer building an integration to Infoplus

If you are a developer building a new integration to Infoplus or updating your integration, you can take advantage of the API Log table to review the requests sent by your application to Infoplus.  You can confirm the values that you are sending in POST or. PUT requests, and you can review the query parameters you are sending on GET requests.  You can also monitor your integration once it has gone into production (i.e., query for errors with Response Code >= 400) or searching for individual requests to confirm their receipt by Infoplus (i.e., query for Request Body containing a particular piece of data that you believe you've sent).

For customer service or warehouse administrators

The API Log table can also be a useful tool for non-technical users, such as a customer service team, or warehouse admin, when you're trying to review the status of an integration that has been built into your Infoplus account.  For example, if you have an external system that is supposed to be sending orders to Infoplus every day, but it hasn't sent any for a few days, you can go to the API Log table, and search for Method=POST and Path contains "order" (without quotes), and review results.  If you are seeing rows with a Response Code of 400, check the Response Message - it may indicate a problem with data in the requests, such as an unrecognized SKU or missing value.  You can then send this information to the developers who are responsible for your integration, to help resolve the issue and get your orders flowing again.  

Additional Details

Rows in the API Log table are automatically removed 6 months after they are created.