• Register

Forwarding Order API Documentation

Guide to Forwarding Order API

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

By integrating with this API, you can automate your entire order 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 Forwarding Order API services to create your orders.

Key Capabilities & Features

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

  • Create Forwarding Orders: The API's primary function is to create new forwarding Orders in the JAS system. Orders are easily generated by providing basic information about the supplier party, buyer party, and order details.
  • Flexible Data Formats: We support both major data formats for your convenience. You can submit your order requests in either application/json or application/xml
  • 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 Forwarding Orders, you must request a bearer token using the OAuth 2.0 client_credentials grant type.

Step 2: Call the Forwarding Order API

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

  • Required Headers:
    Authorization Bearer <<ACCESS_TOKEN>>
    x-api-key <<Key value sent by JAS Connect Team>>
    Content-Type application/json or application/xml
  • API Endpoints:
  • Resources (Method: POST ):
    • JSON: /v1/ForwardingOrder/CreateForwardingOrderjson
    • XML: /v1/ForwardingOrder/CreateForwardingOrderxml

Understanding the API Flow

The process of creating an order is straightforward.

1. Request Validation

When JAS receives your CreateForwardingOrder 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 CreateForwardingOrderjson 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 Forwarding Order & Receive Confirmation

After a successful validation, JAS creates the Forwarding Order 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": "PO124567~1~UNMATCHED" (This is your new JAS Order 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 order request is built from these primary data collections.

  • Message MetaData: This section consists of unique order ID and environment details (eg. TEST and PROD).
  • Party Collection: The main information about the supplier and the buyer party
  • PurchaseOrder Header: This section consists of the information about the purchase order.
  • ReferenceNumberCollection: Allows you to add other key identifiers, such as a Purchase Order Number (Code: PO) or Client Reference (Code: CRF).
  • NoteCollection: This section allows you to add any notes that you want to attach with your order.
  • LineItemCollection: A detailed, item-level list of the goods being ordered. You can have unlimited packing lines. Each line must include:
    • ItemIdentifier (To identify an item uniquely)
    • ItemIdentifierDescription 
    • Quantity (Package Quantity)
    • PackTypeCode (e.g., PKG, CTN, PLT)
    • Weight
    • WeightUnitCode (e.g., KG)
    • UnitPrice (Price of item per unit)
    • TotalPrice (Total price of items)
    • Dimensions (Length, Width, Height) and LengthUnitCode are optional but highly recommended.
  • DateCollection: Critical dates for the order, including the mandatory PickupRequiredBy date/time.