SDKs overview

BIC-Boxtech offers Software Development Kits (SDKs) and libraries designed to facilitate interaction with its core APIs: the BOXTECH API, BIC Facility Code API, and BIC Container Prefix Registry. These APIs provide access to validated container characteristics, facility codes, and container prefix data, which are essential for intermodal logistics operations (BIC-Boxtech technical documentation). The SDKs abstract away the complexities of direct HTTP requests, authentication, and error handling, allowing developers to focus on integrating data into their applications more efficiently. While official SDKs are provided for major programming languages, a growing community also contributes to additional libraries and tools.

The primary goal of these SDKs is to simplify the programmatic retrieval and validation of container information. For instance, the BOXTECH API, accessible via the SDKs, provides precise container dimensions, type, and age, crucial for optimizing cargo placement and ensuring compliance with shipping regulations. Similarly, the BIC Facility Code API allows for consistent identification of intermodal facilities, essential for automated gate processes and accurate tracking of equipment movements. The BIC Container Prefix Registry ensures that container identifiers conform to international standards, preventing misidentification and improving data quality across the supply chain.

Developers using these SDKs can automate tasks such as:

  • Container Verification: Programmatically check a container's validity and retrieve its specifications.
  • Facility Identification: Standardize facility codes for seamless data exchange between different systems.
  • Data Integration: Incorporate validated container and facility data directly into Transport Management Systems (TMS) or Enterprise Resource Planning (ERP) platforms.
  • Process Automation: Automate equipment interchange, pre-gate processes, and yard management through real-time data access.

The API documentation for BIC-Boxtech provides comprehensive guides and examples for common use cases, detailing available endpoints, request/response structures, and authentication methods (BIC-Boxtech API reference). Authentication typically involves API keys, which are managed through the developer portal.

Official SDKs by language

BIC-Boxtech provides official SDKs for several popular programming languages, ensuring broad compatibility and ease of integration for developers. These SDKs are maintained by BIC-Boxtech and are designed to offer stable and officially supported access to their API functionalities. Each SDK is tailored to the conventions and best practices of its respective language, providing an idiomatic development experience.

The following table outlines the currently supported official SDKs, their typical package names, installation commands, and maturity levels. Developers are encouraged to consult the specific language documentation for detailed usage instructions and version compatibility (official SDK documentation).

Language Package Name (Typical) Installation Command Maturity
Python boxtech-python-sdk pip install boxtech-python-sdk Stable
Java com.boxtech:java-sdk Maven: add dependency; Gradle: add implementation Stable
C# Boxtech.CSharp.Sdk dotnet add package Boxtech.CSharp.Sdk Stable

These official SDKs are regularly updated to reflect new API features and ensure security best practices. For instance, the Python SDK typically follows PEP 8 style guidelines, while the Java SDK adheres to standard Java conventions, making them familiar to developers experienced in those ecosystems. Regular updates also include performance optimizations and bug fixes based on developer feedback and internal testing.

Installation

Installing BIC-Boxtech SDKs typically involves using the standard package manager for your chosen programming language. This ensures that dependencies are correctly managed and that the SDK can be easily integrated into existing projects. Always refer to the specific setup instructions within the official BIC-Boxtech technical documentation for the most accurate and up-to-date installation guidance (BIC-Boxtech installation guides).

Python SDK Installation

For Python, the SDK is distributed via PyPI. You can install it using pip:

pip install boxtech-python-sdk

It is recommended to use a virtual environment to manage project dependencies. For example, to create and activate a virtual environment:

python3 -m venv .venv
source .venv/bin/activate
pip install boxtech-python-sdk

Java SDK Installation (Maven/Gradle)

For Java projects, the SDK is typically available through Maven Central. You'll need to add a dependency to your project's pom.xml (for Maven) or build.gradle (for Gradle).

Maven Example:

<dependency>
    <groupId>com.boxtech</groupId>
    <artifactId>java-sdk</artifactId>
    <version>1.0.0</version> <!-- Replace with actual version -->
</dependency>

Gradle Example:

dependencies {
    implementation 'com.boxtech:java-sdk:1.0.0' <!-- Replace with actual version -->
}

Ensure you replace 1.0.0 with the latest stable version number, which can be found in the Java SDK versioning documentation.

C# SDK Installation

For C# projects, the SDK is available as a NuGet package. You can install it using the .NET CLI or the NuGet Package Manager in Visual Studio.

.NET CLI Example:

dotnet add package Boxtech.CSharp.Sdk

NuGet Package Manager Console Example:

Install-Package Boxtech.CSharp.Sdk

After installation, you can include the SDK in your C# code by adding a using directive for the relevant namespaces, such as Boxtech.CSharp.Sdk.

Quickstart example

This quickstart example demonstrates how to use the BIC-Boxtech Python SDK to retrieve information for a specific container. Before running this code, ensure you have installed the Python SDK and obtained an API key from your BIC-Boxtech developer account.

Python Quickstart: Retrieving Container Details

This example initializes the SDK client with your API key and then calls the get_container_details method to fetch data for a sample container. The response will include various attributes like container type, dimensions, and operational status.

import os
from boxtech_python_sdk import BoxtechClient
from boxtech_python_sdk.exceptions import BoxtechAPIException

# --- Configuration ---
# It's best practice to load your API key from environment variables
# or a secure configuration management system.
api_key = os.environ.get("BOXTECH_API_KEY")

if not api_key:
    raise ValueError("BOXTECH_API_KEY environment variable not set.")

# --- Initialize the client ---
try:
    client = BoxtechClient(api_key=api_key)
    print("Boxtech client initialized successfully.")
except Exception as e:
    print(f"Error initializing Boxtech client: {e}")
    exit(1)

# --- Example: Get details for a specific container ---
container_number = "TRLU2345678" # Replace with a valid container number

print(f"\nAttempting to retrieve details for container: {container_number}")

try:
    container_details = client.get_container_details(container_number=container_number)
    print("\n--- Container Details ---")
    print(f"Container Number: {container_details.container_number}")
    print(f"Container Type: {container_details.container_type}")
    print(f"Length (ft): {container_details.length_feet}")
    print(f"Height (ft): {container_details.height_feet}")
    print(f"Width (ft): {container_details.width_feet}")
    print(f"Tare Weight (kg): {container_details.tare_weight_kg}")
    print(f"Max Gross Weight (kg): {container_details.max_gross_weight_kg}")
    print(f"Manufacturing Date: {container_details.manufacturing_date}")
    # Access other attributes as needed, e.g., location, status, owner

except BoxtechAPIException as e:
    print(f"Error retrieving container details: {e.status_code} - {e.message}")
except Exception as e:
    print(f"An unexpected error occurred: {e}")

print("\nQuickstart example completed.")

This snippet demonstrates basic API interaction. For more advanced use cases, such as querying the BIC Facility Code API or handling pagination and filtering, refer to the advanced Python SDK usage documentation. This documentation covers topics like error handling strategies, rate limit management, and best practices for integrating the SDK into larger applications. It's important to implement robust error handling and retry mechanisms in production environments, especially when dealing with external API calls, as recommended by general API integration guidelines such as those provided by Google Developers on handling API exceptions.

Community libraries

In addition to the official SDKs, the BIC-Boxtech ecosystem benefits from community-contributed libraries and tools. These resources are developed and maintained by third-party developers and organizations, often extending functionality, providing alternative language support, or offering specialized integrations. While not officially supported by BIC-Boxtech, these community efforts can offer valuable solutions for specific use cases or preferred tech stacks.

One notable community contribution is the unofficial Go client for the BOXTECH API, often found in public repositories like GitHub. Such clients are typically developed to provide Go developers with an idiomatic way to interact with the API, leveraging Go's concurrency features and strong typing. They often mirror the functionality of official SDKs but may introduce different API patterns or error handling approaches.

Example: Go Client (Community)

While an official Go SDK is not listed, community members have often developed clients. Such a client would typically be installed via go get:

go get github.com/community-developer/boxtech-go-client

A basic usage pattern for a community Go client might look like this:

package main

import (
	"context"
	"fmt"
	"log"
	"os"

	"github.com/community-developer/boxtech-go-client"
)

func main() {
	// Load API key from environment variable
	apiKey := os.Getenv("BOXTECH_API_KEY")
	if apiKey == "" {
		log.Fatal("BOXTECH_API_KEY environment variable not set")
	}

	// Create a new client instance
	client := boxtech.NewClient(apiKey)

	// Define the container number to query
	containerNumber := "TRLU2345678"

	// Fetch container details
	details, err := client.GetContainerDetails(context.Background(), containerNumber)
	if err != nil {
		log.Fatalf("Error fetching container details: %v", err)
	}

	// Print details
	fmt.Printf("Container Number: %s\n", details.ContainerNumber)
	fmt.Printf("Container Type: %s\n", details.ContainerType)
	fmt.Printf("Length (ft): %.1f\n", details.LengthFeet)
	fmt.Printf("Tare Weight (kg): %d\n", details.TareWeightKg)
	// ... other fields
}

When considering community-developed libraries, it is important to evaluate their maintenance status, community support, and adherence to security best practices. Developers should review the source code, check for recent updates, and assess the level of activity in the project's repository. These libraries can be excellent resources, but users assume a higher degree of responsibility for their stability and security compared to official SDKs.

The BIC-Boxtech developer community also engages in forums and discussion groups where developers share insights, patterns, and custom scripts for integrating with the APIs. These community platforms can be valuable for finding solutions to specific integration challenges or discovering new ways to leverage BIC-Boxtech data. While not formal libraries, these shared code snippets and examples contribute to a richer developer experience around the platform.