Implementing Your Methods

The purpose of developing a ShipEngine Connect application is to provide a communication layer between your backend API or service and our suite of e-commerce solutions where end users can utilize your services. You will provide the integration with your backend API or service when you implement the methods generated by the connect initcommand.

Every ShipEngine Connect application provides methods that correspond to the services offered through the API or service with which you are integrating. During the course of your application development, you will likely need to map data from your data model to match what ShipEngine Connect expects. Your method will receive data from ShipEngine Connect that it will then need to transform into the required format before passing it along to the backend service or API. Likewise, your backend API or service will return data that will then need to be transformed into the format expected by ShipEngine Connect before returning it from the method.

Each method will generally have the following structure and flow:

  1. Validate the incoming information from ShipEngine Connect.
  2. Map the data passed to your method by ShipEngine Connect to the data structure needed by the backend API or service for which your application provides the integration.
  3. Call the the backend API or service for which your application provides the integration.
  4. Map the response from your backend API or service to the data structure expected by ShipEngine Connect and return it from the method.