Instructions to the API Within EasyCargo (part 3)
The concluding article in our EasyCargo API trilogy gives an exhaustive, sequential guide to load planning through the API. The whole process will be explained from setting it up to retrieving the loading plan reports. We will illustrate the API interactions and their matching representations within the EasyCargo software. This series of articles continues from fundamental concepts while debuting the latest functions to perfect cargo shipment planning.
Prior to delving into the integration of specifics, establish a robust foundation by utilizing the following two indispensable resources. Our API Theory Guide reviews the foundational concepts essential for API comprehension. Conversely, our Practical Guide to API Requests and Testing with ReqBin guides you through the process of setting up an API client and conducting endpoint testing. These articles serve as the foundational preliminaries and give pertinent context for the information discussed in this article.
A Comprehensive All-Steps Explained Load Planning Process
To utilize the provided API requests, it is imperative to include an authentication token within the request header. For comprehensive authentication procedures, please refer to our preceding article. To acquire an authentication token, an API key corresponding to your user account is required. Kindly contact our support team to initiate the request for an API key. It is important to acknowledge that authentication tokens are valid for a duration of 1.5 hours only, and they will subsequently expire for security considerations.
Creating Access for Users
The initial and extremely important step in our load planning process is establishing an account for administrators and or warehouse personnel. To create new user accounts with specific permissions, utilize the /api/v1/users endpoint. Provide the required user details, as illustrated in the provided API request. The EasyCargo panel promptly reflects this addition, establishing the user’s access to the company account. This smooth process allows for both access management and security controls for your load planning operations while keeping functional capabilities.
In the provided code snippet, we will make a request to the /api/v1/users endpoint. The request body will contain information about a user we intend to create an account. We will specify a first name, last name, email address for authentication, and a user role. User roles are either an administrator (demonstrated by a 1 in the request body) or a regular user (demonstrated by a 2).
Access the entire template for the API request: https://reqbin.com/duacb1ye
Explaining Cargo Spaces
Prior to beginning any load planning operations, assigning a definition to a cargo space is paramount. The /api/v1/cargospaces endpoint facilitates the specification of the dimensions of containers where items will be positioned. Each cargo space definition necessitates essential specifications, including length, width, height, and maximum load capacity. Presently, the API supports exclusively container-type cargo spaces for user creation; however, it possesses the potential to accommodate other types of cargo spaces in future updates. The system meticulously validates all specifications to ensure compliance with operational requirements and safety standards. Once defined, the cargo space is prominently displayed in the EasyCargo interface, thereby confirming successful creation and facilitating immediate utilization for load planning purposes.
In the provided code snippet, we initiate a request to the /api/v1/cargospaces endpoint. This request is accompanied by a body that contains detailed information about the container. The purpose of this request is to create a new cargo space. The body specifies the container’s name, width, height, length, and maximum loading capacity. Furthermore, we indicate the measurement system used to define these values (1 for the metric system and 2 for the imperial system) and the type of cargo space, which is designated as 1, indicating a container. As previously mentioned, only this type of cargo space is supported.
See the full template of the API request: https://reqbin.com/8ieqp8ey
Management of Unloaded Cargo
Once the cargo spaces are defined, the next thing to do is to make a new shipment using the /api/v1/shipment-inputs endpoint. This entails defining the shipment information as well as the singular items that are going to be loaded. All items necessitate comprehensive attributes, entailing specific dimensions, weight details, handling details, and stacking limitations. EasyCargo confirms shipment creation with a specific visual showing every item and its specific details. This specific information guarantees functionally correct load planning and efficient usage of the truck or container in the following stages while adhering to safety laws and handling arrangements.
In the provided code snippet, we will construct a new shipment comprising 82 units of a singular item type using the /api/v1/shipment-inputs endpoint. The request body will encompass the shipment designation, measurement system, and a comprehensive list of stored items. For each item, we can specify its attributes, including measurements and packing limitations. In this instance, we will prioritize the shipment for delivery to Berlin, as we intend to transport refrigerators to that location. We will ensure that the refrigerators can be rotated and stacked during packing within the cargo space. It is important to note that the current API does not permit us to select the color or control whether the item label is displayed.
See the full template of the API request: https://reqbin.com/ozixloob
The Process for Optimizing the Load Plan
When the shipment details are finalized, EasyCargo’s optimization engine assumes responsibility for generating streamlined loading plans. Although direct API access for this functionality is currently in development, users can still use it through the EasyCargo interface by selecting the Load button. EasyCargo meticulously evaluates various factors, such as weight distribution, the order in which items are loaded, and delivery requirements, to make ideal arrangements. Following the first optimization, users still have the option to make adjustments manually or change chosen cargo spaces. This makes sure that efficiency is maximized and that the final plan conforms to designation restrictions and functional demands.
Creating Reports for the Loading Plan
Upon completion of the loading plan, detailed loading documents are accessible via the /api/v1/shipment-reports/{id} endpoint. These well-defined load plan reports contain information such as where items are placed, 3D visuals, and information on how to load with precision. Every document furnishes important measurements such as how much space is used, how the weight is distributed, and handling instructions for the personnel who will be loading the items. EasyCargo not only makes modifiable 3D models and PDF instructions available for download, but it also ensures accessibility for warehouse employees and customers. The generated documentation can serve as necessary information available to reference when the actual loading process takes place. This also facilitates the maintenance of consistency of planned and actual loading arrangements. For comprehensive details, please refer to the shipment report.
The entire template of the API request can be found here.
In the provided code, we will collect all shipment report information utilizing the /api/v1/shipment-report/{id} endpoint. To begin, we must obtain the shipment report ID by initiating a GET request to /api/v1/shipments. Once we have the ID, we can incorporate it into the URL path of our subsequent request (/api/v1/shipment-report/{id}). The reply will have all of the information depicted in the accompanying image, which is a PDF report that can be printed.
Exchanging Information and Working Together
The last part entails disseminating the loading plan details to pertinent stakeholders via the /api/v1/shipments endpoint. This endpoint grants access to detailed shipment information and related reports, which has an modular 3D depiction of the loading plan. Stakeholders can access the plan via a publicly accessible URL, allowing them to visualize and verify the loading arrangement in real time. This method guarantees that all parties involved in the loading stages have access to the requisite information, thereby allowing proper communication and the correct integration of the loading plan. The public URL of the loading plan in EasyCargo is accessible to inspect the placement of products.
In the provided code snippet, we will collect all of the information for our recently generated shipment utilizing the /api/v1/shipments/{id} endpoint. To obtain the ID for the load, initially send a GET request to /api/v1/shipments. Upon finding the ID for the load, generated an additional GET request to /api/v1/shipments/{id} to retrieve encompassing shipment information, containing the public link, the link to the shipment report, and aditional details as detailed beneath.
The entire template of the API request can be found here.
Ultimately, the effect that APIs have in the industry of information technology is profound. They are now becoming indispensable components of contemporary software structure and how businesses function. As further demonstrated by the EasyCargo API, well-crafted interfaces can optimize intricate logistics processes without compromising accuracy or efficiency. This fully-encompassed trilogy aims to give indepsenable information in regards to harnessing the potential of the EasyCargo API for your logistics requirements. No matter if you are a novice to APIs or a veteran developer, the integration possibilities are lengthy. When it comes to integrating EasyCargo into your company proccesses, please contact us. EasyCargo’s dedicated team is available to assist you in exploring our load planning software to align seamlessly with your detailed requirements.