• Register

Shipment API Documentation

Welcome to the My JAS Connect Shipment API. This service allows your business applications (like an ERP, TMS, or e-commerce platform) to communicate directly with our core shipping systems.

By integrating with this API, you can automate your entire shipment creation process, enabling your systems to directly book and manage freight with JAS in an easy and automated way. This guide provides a complete overview of how to use the Shipping API services to create your shipments.

Key Capabilities & Features

Our Shipping API is a powerful, REST-based service designed for simplicity, security, and accuracy.

  • Create Shipments: The API's primary function is to create new shipments in the JAS system. Shipments are easily generated by providing basic information about the shipper, consignee, and shipment details.
  • Flexible Data Formats: We support both major data formats for your convenience. You can submit your shipment requests in either application/json or application/xml.
  • Broad Transport Mode Support: The API can be used to book shipments across our global network, including:
    • Air Freight
    • Sea Freight
    • Road Freight
    • Rail Freight
    • Courier
  • Secure & Encrypted: All API communication is secured. We use the OAuth 2.0 protocol for authentication and all web calls are made over HTTPS to ensure data is encrypted.
  • Robust Error Handling: The API provides clear and accurate error handling. You will receive standard HTTP response codes (like 400 Bad Request or 401 Unauthorized ) to help you debug any issues with your integration.

Getting Started: Authentication & Endpoints

All API requests must be securely authenticated. Accessing the API is a two-step process.

Step 1: Generate an Access Token

Before you can create a shipment, you must request a bearer token using the OAuth 2.0 client_credentials grant type.

Step 2: Call the Shipping API

Once you have your access token, you can call the CreateShipment endpoint. You must include the token and your unique API key in the headers of every request.

Understanding the API Flow

The process of creating a shipment is straightforward.

1. Request Validation

When JAS receives your CreateShipment request, our system first validates it. This check ensures:

  • Your Authentication headers (Authorization and x-api-key) are valid.
  • Your Content-Type header matches the endpoint (e.g., application/json for the CreateShipmentjson endpoint).
  • Your payload structure is correct and all mandatory fields are included. A "Bad Request" error (400) will be returned if there are mismatches.

2. Create Shipment & Receive Confirmation

After a successful validation, JAS creates the shipment in our system. The API will return a synchronous response indicating the result:

  • On Success (Code 200 ): You will receive a simple JSON or XML response with:
    • "Success": true
    • "JobNumber": "S508480248" (This is your new JAS Shipment ID)
  • On Failure: You will receive a response with:
    • "Success": false
    • "Error": "Detailed error message..."
    • This can be due to business logic errors or unexpected server issues (e.g., 500 Internal Server Error ).

Core Data Structure

While the full specification is available, a shipment request is built from these primary data collections.

  • Details: The main information about the shipment, including TransportModeCode , ServiceLevelCode , GoodsDescription , and total weight/volume .
  • ClientAddress: Information about your organization that is booking the shipment.
  • ShippersAddress: The full address and contact details for the party sending the goods.
  • ConsigneeAddress: The full address and contact details for the final recipient of the goods.
  • DateCollection: Critical dates for the shipment, including the mandatory PickupRequiredBy date/time.
  • OrderNumberCollection: A list of your internal order references.
  • AdditionalReferenceCollection: Allows you to add other key identifiers, such as a Purchase Order Number (Code: PO) or Client Reference (Code: CRF).
  • PackingLineCollection: A detailed, item-level list of the goods being shipped. You can have unlimited packing lines. Each line must include:
    • ItemNo (Line Number)
    • GoodsDescription
    • PackQty (Package Quantity)
    • PackTypeCode (e.g., PKG, CTN, PLT)
    • Weight
    • WeightUnitCode (e.g., KG)
    • Dimensions (Length, Width, Height) and LengthUnitCode are optional but highly recommended.
    • Details for dangerous goods or temperature-controlled items can also be specified here.