- Previous: JAS OAuth2.0 API Documentation
- Up:
- Next: Booking API Documentation
Shipment API Documentation
Guide to Shipment API
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/jsonorapplication/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 Requestor401 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.
- Method:
POST - Endpoint:
https://<<URL_PROVIDED_IN_THE_PORTAL>>/oauth2/token - Headers:
Content-Type: application/x-www-form-urlencoded -
Body parameters Values grant_type client_credentials client_id <YOUR_CLIENT_ID> client_secret <YOUR_CLIENT_SECRET>
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.
-
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/shipment/CreateShipmentjson - XML:
/v1/shipment/CreateShipmentxml
- JSON:
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 (
Authorizationandx-api-key) are valid. - Your Content-Type header matches the endpoint (e.g.,
application/jsonfor theCreateShipmentjsonendpoint). - 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
PickupRequiredBydate/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) orClient 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)GoodsDescriptionPackQty(Package Quantity)PackTypeCode(e.g.,PKG,CTN,PLT)WeightWeightUnitCode(e.g.,KG)- Dimensions (
Length,Width,Height) andLengthUnitCodeare optional but highly recommended. - Details for dangerous goods or temperature-controlled items can also be specified here.
- Previous: JAS OAuth2.0 API Documentation
- Up:
- Next: Booking API Documentation
0 Comments
Please sign in to post a comment.