Single-Pick Multi-Drop
Clients call this API to add trips with Single pick - Multi drop:
API Endpoint:
https://integration-api.freighttiger.com/integration/trips/v1/trip/add-multi-shipment-trips - Integration/Sandbox Environment
https://api.freighttiger.com/api/trips/v1/trip/add-multi-shipment-trips - Production Environment
Request Parameters:
Name | Location | Description | Example |
---|---|---|---|
Authorization | headers | JWT token required to authenticate API call. | token: eyJhbGciOiJIUzI1Ni** |
Only Auth supported is: Headers -> token: <<jwt_token>>
Even though
initial_pickup_point
andfinal_drop_point
are sent, loading and unloading points information is mandatorySPMD → all shipments should have the same loading points
We highly recommend sending unique feed_unique_ids for each shipment
Request Body:
{
"initial_pickup_point": {
"lat": 25.5941,
"lng": 85.1376
},
"final_drop_point": {
"lat": 23.3441,
"lng": 85.3096
},
"expected_vehicle_reporting_time": "2021-12-10 13:10:00",
"total_pickups_count": 1,
"is_round_trip": true,
"trip_scheduled_at": "2023-10-11 07:48:00",
"shipments": [
{
"delivery_sequence": 1,
"lrnumber": "LR123",
"loading": {
"lat": 19.0759837,
"lng": 72.87765590000004,
"address": "Mumbai, Maharashtra, India",
"area": "Mumbai, Maharashtra, India",
"uniqueId": "place124"
},
"unloading": {
"lat": 17.9307285,
"lng": 73.64773420000006,
"address": "Mahabaleshwar, Maharashtra 412806, India",
"area": "Mahabaleshwar, Maharashtra, India",
"uniqueId": "place124"
},
"waypoints": [
{
"uniqueId": "place125",
"address": "Pune Maharashtra",
"number": "AP071H07",
"area": "500001",
"lat": 18.5204,
"lng": 73.8567
}
],
"vehicleNumber": "MH05AS1212",
"locationSource": "sim",
"driverName": "Raju",
"driverNumbers": [
"1234567890"
],
"consignee": {
"uniqueId": "CODE1",
"name": "Consignee 1",
"number": [
"1111111111",
"1111111111"
]
},
"share_trip": 1,
"customValues": {
"property1": "val1",
"property2": "val2"
},
"primary_attributes": {
"gate_in": "2021-02-02 12:34",
"gate_out": "2021-02-02 12:34",
"feed_unique_id": "TH001",
"shipment_numbers": [
"SHP1",
"SHP2"
],
"container_number": "CN1",
"tare_weight": 100,
"net_weight": 100,
"gross_weight": 100,
"movement_subtype": "M",
"movement_channel": "In",
"billing_type": "To Pay",
"yard_entry_number": "Y12",
"expected_transit_time": 200,
"erp_transit_distance": 80,
"vehicle_type_ref_code": "4Wheeler",
"freight_value": 25.5,
"freight_value_currency": "INR",
"freight_rate": 10.25,
"freight_rate_unit": "PER_TON"
},
"invoice": {
"currency": "INR",
"invoice_details": [
{
"from": {
"name": "XYX Pvt Ltd",
"gstin": "SADSDFG132435DV",
"shipping_address": "HSR",
"billing_address": "HSR",
"contact_phone": [
"9123404017",
"98121231234"
],
"contact_email": [
"abc@gmail.com"
]
},
"to": {
"name": "ABC Pvt Ltd",
"gstin": "ASDSFD1234FDS",
"shipping_address": "Agra",
"billing_address": "Agra",
"contact_phone": [
"9123404017",
"98121231234"
],
"contact_email": [
"def@gmail.com"
]
},
"so_number": "SO-343424",
"so_quantity": 12,
"so_date": "2020-01-01 13:40:00",
"so_release_date": "2020-01-01 13:40:00",
"po_number": "PO-45642",
"do_number": "DO-9675752",
"do_quantity": 12,
"do_date": "2020-01-01 13:40:00",
"do_publish_date": "2020-01-01 13:40:00",
"invoice_number": "INV2345",
"invoice_date": "2020-01-01 13:40:00",
"eway_bill_no": "151685963815",
"eway_bill_expiry_date": "2020-12-11 12:00:00",
"description": "Invoice For Cement Bags",
"total_invoice_value": 2222,
"price": {
"net_price": 10000,
"total_price": 12000,
"total_tax": 2000
},
"tax": {
"cgst_rate": 10,
"cgst": 1000,
"sgst": 10,
"sgst_rate": 100,
"igst": 10,
"igst_rate": 100,
"other_tax": 0,
"other_tax_rate": 0
},
"custom_fields": {
"doStoNo": "DO-232",
"gstvalue": "477531.32"
},
"item_details": [
{
"sku_code": "DA-123",
"material_code": "MA-21324",
"hsn_code": "HS-803",
"quantity": 11,
"quantity_unit": "BAG",
"gross_weight": 22.34,
"net_weight": 21.34,
"weight_unit": "TON",
"product_name": "Concrete Cement Bag",
"description": "Concrete Cement Bag",
"custom_fields": {
"cement_type": "Concrete cement",
"cement_grade": "A Grade"
},
"price": {
"net_price": 10000,
"total_price": 12000,
"total_tax": 2000
},
"tax": {
"cgst_rate": 10,
"cgst": 10,
"sgst": 10,
"sgst_rate": 100,
"igst": 10,
"igst_rate": 100,
"other_tax": 0,
"other_tax_rate": 0
}
}
]
}
]
}
},
{
"delivery_sequence": 2,
"lrnumber": "LR123",
"loading": {
"lat": 19.0759837,
"lng": 72.87765590000004,
"address": "Mumbai, Maharashtra, India",
"area": "Mumbai, Maharashtra, India",
"uniqueId": "place124"
},
"unloading": {
"lat": 17.9307285,
"lng": 73.64773420000006,
"address": "Mahabaleshwar, Maharashtra 412806, India",
"area": "Mahabaleshwar, Maharashtra, India",
"uniqueId": "place124"
},
"waypoints": [
{
"uniqueId": "place125",
"address": "Pune Maharashtra",
"number": "AP071H07",
"area": "500001",
"lat": 18.5204,
"lng": 73.8567
}
],
"vehicleNumber": "MH05AS1212",
"locationSource": "sim",
"driverName": "Raju",
"driverNumbers": [
"1234567890"
],
"consignee": {
"uniqueId": "CODE1",
"name": "Consignee 1",
"number": [
"1111111111",
"1111111111"
]
},
"share_trip": 1,
"customValues": {
"property1": "val1",
"property2": "val2"
},
"primary_attributes": {
"gate_in": "2021-02-02 12:34",
"gate_out": "2021-02-02 12:34",
"feed_unique_id": "TH002",
"shipment_numbers": [
"SHP1",
"SHP2"
],
"container_number": "CN1",
"tare_weight": 100,
"net_weight": 100,
"gross_weight": 100,
"movement_subtype": "M",
"movement_channel": "In",
"billing_type": "To Pay",
"yard_entry_number": "Y12",
"expected_transit_time": 200,
"erp_transit_distance": 80,
"vehicle_type_ref_code": "4Wheeler",
"freight_value": 25.5,
"freight_value_currency": "INR",
"freight_rate": 10.25,
"freight_rate_unit": "PER_TON"
},
"invoice": {
"currency": "INR",
"invoice_details": [
{
"from": {
"name": "XYX Pvt Ltd",
"gstin": "SADSDFG132435DV",
"shipping_address": "HSR",
"billing_address": "HSR",
"contact_phone": [
"9123404017",
"98121231234"
],
"contact_email": [
"abc@gmail.com"
]
},
"to": {
"name": "ABC Pvt Ltd",
"gstin": "ASDSFD1234FDS",
"shipping_address": "Agra",
"billing_address": "Agra",
"contact_phone": [
"9123404017",
"98121231234"
],
"contact_email": [
"def@gmail.com"
]
},
"so_number": "SO-343424",
"so_quantity": 12,
"so_date": "2020-01-01 13:40:00",
"so_release_date": "2020-01-01 13:40:00",
"po_number": "PO-45642",
"do_number": "DO-9675752",
"do_quantity": 12,
"do_date": "2020-01-01 13:40:00",
"do_publish_date": "2020-01-01 13:40:00",
"invoice_number": "INV2345",
"invoice_date": "2020-01-01 13:40:00",
"eway_bill_no": "151685963815",
"eway_bill_expiry_date": "2020-12-11 12:00:00",
"description": "Invoice For Cement Bags",
"total_invoice_value": 2222,
"price": {
"net_price": 10000,
"total_price": 12000,
"total_tax": 2000
},
"tax": {
"cgst_rate": 10,
"cgst": 1000,
"sgst": 10,
"sgst_rate": 100,
"igst": 10,
"igst_rate": 100,
"other_tax": 0,
"other_tax_rate": 0
},
"custom_fields": {
"doStoNo": "DO-232",
"gstvalue": "477531.32"
},
"item_details": [
{
"sku_code": "DA-123",
"material_code": "MA-21324",
"hsn_code": "HS-803",
"quantity": 11,
"quantity_unit": "BAG",
"gross_weight": 22.34,
"net_weight": 21.34,
"weight_unit": "TON",
"product_name": "Concrete Cement Bag",
"description": "Concrete Cement Bag",
"custom_fields": {
"cement_type": "Concrete cement",
"cement_grade": "A Grade"
},
"price": {
"net_price": 10000,
"total_price": 12000,
"total_tax": 2000
},
"tax": {
"cgst_rate": 10,
"cgst": 10,
"sgst": 10,
"sgst_rate": 100,
"igst": 10,
"igst_rate": 100,
"other_tax": 0,
"other_tax_rate": 0
}
}
]
}
]
}
}
]
}
Schema:
{
"type": "object",
"required": [
"vehicleNumber",
"locationSource",
"loading",
"unloading"
],
"properties": {
"initial_pickup_point": {
"type": "object",
"description": "either object {uniqueId, area, address} where uniqueId field is mandatory OR object {lat, lng, area, address} where lat, lng fields are mandatory fields.",
"properties": {
"lat": {
"type": "number",
"format": "double"
},
"lng": {
"type": "number",
"format": "double"
},
"address": {
"type": "string"
},
"area": {
"type": "string"
},
"uniqueId": {
"type": "string"
}
},
"required": [
"lat",
"lng",
"uniqueId"
]
},
"final_drop_point": {
"type": "object",
"description": "either object {uniqueId, area, address} where uniqueId field is mandatory OR object {lat, lng, area, address} where lat, lng fields are mandatory fields.",
"properties": {
"lat": {
"type": "number",
"format": "double"
},
"lng": {
"type": "number",
"format": "double"
},
"address": {
"type": "string"
},
"area": {
"type": "string"
},
"uniqueId": {
"type": "string"
}
},
"required": [
"lat",
"lng",
"uniqueId"
]
},
"expected_vehicle_reporting_time": {
"type": "string",
"description": "Expected Vehicle Reporting time at pickup location in string"
},
"total_pickups_count": {
"type": "number",
"description": "For SPMD trips, the value should be 1"
},
"is_round_trip": {
"type": "boolean",
"description": "IF set to true, it will create a return trip from final drop point to initial pickup point"
},
"trip_scheduled_at": {
"description": "To schedule a trip for a future date. trip_scheduled_at will be in 'YYYY-MM-DD hh:mm:ss' in 24hrs format in UTC or epoch in milliseconds",
"datatype": "string",
"example": "2023-10-11 07:48:00",
},
"shipments": {
"type": "array",
"description": "Shipments is an array of object where we define trips with different drop points and other details related to that particular shipment",
"items": {
"type": "object",
"required": [
"vehicleNumber",
"locationSource",
"loading",
"unloading"
],
"properties": {
"vehicleNumber": {
"type": "string"
},
"driverName": {
"type": "string",
"default": "Unknown Driver"
},
"driverNumbers": {
"type": "array",
"items": {
"type": "number"
},
"example": [
9090909090,
9090909091
],
"default": [
1234567890
]
},
"locationSource": {
"type": "string",
"description": "Type of Device to track the location.",
"default": "sim",
"enum": [
"sim",
"gps",
"portable",
"smartPhone"
]
},
"portableTrackerId": {
"type": "integer",
"description": "For locationSource = portable , device Id is to be passed in portableTrackerId."
},
"plantCode": {
"type": "string",
"description": "plantCode of a Branch assigning branch to a trip."
},
"loading": {
"type": "object",
"description": "either object {uniqueId, area, address} where uniqueId field is mandatory OR object {lat, lng, area, address} where lat, lng fields are mandatory fields.",
"properties": {
"lat": {
"type": "number",
"format": "double"
},
"lng": {
"type": "number",
"format": "double"
},
"address": {
"type": "string"
},
"area": {
"type": "string"
},
"uniqueId": {
"type": "string"
}
},
"required": [
"lat",
"lng",
"uniqueId"
]
},
"unloading": {
"type": "object",
"description": "either object {uniqueId, area, address} where uniqueId field is mandatory OR object {lat, lng, area, address} where lat, lng fields are mandatory fields.",
"properties": {
"lat": {
"type": "number",
"format": "double"
},
"lng": {
"type": "number",
"format": "double"
},
"address": {
"type": "string"
},
"area": {
"type": "string"
},
"uniqueId": {
"type": "string"
}
},
"required": [
"lat",
"lng",
"uniqueId"
]
},
"waypoints": {
"example": [],
"description": "{uniqueId,lat,lng} combination or {uniqueId, address} combination, or just {uniqueId} (Incase pre-onboarded waypoints) can be passed in the object.",
"type": "array",
"items": {
"type": "object",
"properties": {
"lat": {
"type": "number",
"format": "double"
},
"lng": {
"type": "number",
"format": "double"
},
"address": {
"type": "string"
},
"area": {
"type": "string"
},
"uniqueId": {
"type": "string"
}
},
"required": [
"lat",
"lng",
"uniqueId"
]
}
},
"route": {
"type": "object",
"description": "code is required to resolve places from onboarded routes",
"properties": {
"code": {
"type": "string"
}
}
},
"consignee": {
"type": "object",
"description": "{uniqueId, name, ...} uniqueId is mandatory",
"properties": {
"uniqueId": {
"type": "string"
},
"name": {
"type": "string"
},
"email": {
"type": "array",
"items": {
"type": "string"
}
},
"number": {
"type": "array",
"items": {
"type": "number"
}
}
},
"required": [
"uniqueId"
]
},
"transporter": {
"type": "object",
"description": "{uniqueId, name, ...} uniqueId is mandatory.",
"properties": {
"uniqueId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"uniqueId"
]
},
"consignor": {
"type": "object",
"description": "{uniqueId, name, ...} uniqueId is mandatory.",
"properties": {
"uniqueId": {
"type": "string"
},
"name": {
"type": "string"
}
},
"required": [
"uniqueId"
]
},
"share_trip": {
"type": "boolean",
"description": "Trip details will be shared with consignee contacts if set to true"
},
"lrnumber": {
"type": "string"
},
"feedUniqueId": {
"type": "string",
"description": "Unique Id to be given to a Trip in order to Track it. default is auto set by system at the time of trip creation."
},
"originSTD": {
"type": "string",
"default": null,
"description": "Define Trip Standard Time of Departure in string format",
"example": "2020-01-01 12:30:00"
},
"destinationSTA": {
"type": "string",
"default": null,
"description": "Define Trip Standard Time of Arrival in string format",
"example": "2020-01-01 12:30:00"
},
"customValues": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"properties": {
"invoiceNumber": {
"type": "string",
"description": "Any Custom property to be associated to a Trip."
}
},
"example": {
"property1": "val1",
"property2": "val2"
}
},
"primary_attributes": {
"type": "object",
"properties": {
"shipment_numbers": {
"type": "array",
"items": {
"type": "string"
},
"example": [
"SHP34567",
"SH45578"
]
},
"container_number": {
"type": "string"
},
"feed_unique_id": {
"type": "string"
},
"movement_subtype": {
"type": "string"
},
"movement_channel": {
"type": "string"
},
"billing_type": {
"type": "string",
"example": "To Pay/To Bill"
},
"yard_entry_number": {
"type": "string"
},
"expected_transit_time": {
"type": "number",
"description": "Expected Transit Time in minutes"
},
"erp_transit_distance": {
"type": "number",
"description": "Transit Distance in KM"
},
"gross_weight": {
"type": "number",
"description": "Gross Weight in Tons"
},
"tare_weight": {
"type": "number",
"description": "Tare Weight in Tons"
},
"net_weight": {
"type": "number",
"description": "Net Weight in Tons"
},
"vehicle_type_ref_code": {
"type": "string"
},
"gate_in": {
"type": "string",
"description": "Gate In Time. Should be a valid date time stamp format",
"example": "2021-03-16 10:22:22"
},
"gate_out": {
"type": "string",
"description": "Gate Out Time. Should be a valid date time stamp format",
"example": "2021-03-16 10:22:22"
},
"sales_rep_id": {
"type": "string"
},
"freight_value": {
"type": "number"
},
"freight_value_currency": {
"type": "string"
},
"freight_rate_unit": {
"description": "Allowed values - (PER_TON, PER_KM, PER_TON_PER_KM, PER_DAY_PER_TRIP, PER_TRIP, FIXED_RATE)",
"type": "string"
},
"freight_rate": {
"type": "number"
},
"indent_fteid": {
"type": "string"
}
}
},
"invoice": {
"type": "object",
"description": "Invoice Details",
"properties": {
"currency": {
"type": "string"
},
"invoice_details": {
"type": "array",
"description": "Invoice details are used for creating invoices for a trip",
"items": {
"type": "object",
"required": [
"invoice_number"
],
"properties": {
"from": {
"type": "object",
"required": [
"name",
"gstin",
"shipping_address"
],
"properties": {
"name": {
"type": "string",
"description": "Sender name"
},
"gstin": {
"type": "string",
"description": "Sender GSTIN"
},
"shipping_address": {
"type": "string"
},
"billing_address": {
"type": "string"
},
"contact_phone": {
"type": "array",
"items": {
"type": "string"
},
"description": "Phone numbers in an array"
},
"contact_email": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email-Ids in an array"
}
}
},
"to": {
"type": "object",
"required": [
"name",
"gstin",
"shipping_address",
"contact_phone"
],
"properties": {
"name": {
"type": "string",
"description": "Receiver name"
},
"gstin": {
"type": "string",
"description": "Sender GSTIN"
},
"shipping_address": {
"type": "string"
},
"billing_address": {
"type": "string"
},
"contact_phone": {
"type": "array",
"items": {
"type": "string"
},
"description": "Phone numbers in an array"
},
"contact_email": {
"type": "array",
"items": {
"type": "string"
},
"description": "Email-Ids in an array"
}
}
},
"so_number": {
"type": "string"
},
"so_quantity": {
"type": "number"
},
"so_date": {
"type": "string",
"description": "so_date will be in 'YYYY-MM-DD hh:mm:ss' format or epoch in milliseconds"
},
"so_release_date": {
"type": "string",
"description": "so_release_date will be in 'YYYY-MM-DD hh:mm:ss' format or epoch in milliseconds"
},
"po_number": {
"type": "string"
},
"do_number": {
"type": "string"
},
"do_quantity": {
"type": "number"
},
"do_date": {
"type": "string",
"description": "do_date will be in 'YYYY-MM-DD hh:mm:ss' format or epoch in milliseconds"
},
"do_publish_date": {
"type": "string",
"description": "do_publish_date will be in 'YYYY-MM-DD hh:mm:ss' format or epoch in milliseconds"
},
"invoice_number": {
"type": "string"
},
"invoice_date": {
"type": "string",
"description": "invoice_date will be in 'YYYY-MM-DD hh:mm:ss' format or epoch in milliseconds"
},
"eway_bill_no": {
"type": "string"
},
"eway_bill_expiry_date": {
"type": "string",
"description": "eway_bill_expiry_date will be in 'YYYY-MM-DD hh:mm:ss' format or epoch in milliseconds"
},
"total_invoice_value": {
"type": "number"
},
"description": {
"type": "string",
"description": "Invoice Description"
},
"price": {
"type": "object",
"description": "Price object",
"properties": {
"net_price": {
"type": "number"
},
"total_price": {
"type": "number"
},
"total_tax": {
"type": "number"
}
}
},
"tax": {
"type": "object",
"description": "Tax object",
"properties": {
"cgst_rate": {
"type": "number",
"description": "% rate for CGST"
},
"sgst_rate": {
"type": "number",
"description": "% rate for SGST"
},
"igst_rate": {
"type": "number",
"description": "% rate for IGST"
},
"other_tax_rate": {
"type": "number",
"description": "% other tax rate"
},
"cgst": {
"type": "number",
"description": "CGST Amount"
},
"sgst": {
"type": "number",
"description": "SGST Amount"
},
"igst": {
"type": "number",
"description": "IGST Amount"
},
"other_tax": {
"type": "number",
"description": "Other tax Amount"
}
}
},
"custom_fields": {
"type": "object",
"description": "Any additional params for invoice"
},
"item_details": {
"type": "array",
"items": {
"type": "object",
"required": [
"product_name"
],
"properties": {
"sku_code": {
"type": "string"
},
"material_code": {
"type": "string"
},
"hsn_code": {
"type": "string"
},
"quantity": {
"type": "number"
},
"quantity_unit": {
"type": "string"
},
"gross_weight": {
"type": "number"
},
"net_weight": {
"type": "number"
},
"weight_unit": {
"type": "string"
},
"product_name": {
"type": "string"
},
"description": {
"type": "string"
},
"custom_fields": {
"type": "object",
"description": "Any additional params for invoice item details"
},
"price": {
"type": "object",
"description": "Price object",
"properties": {
"net_price": {
"type": "number"
},
"total_price": {
"type": "number"
},
"total_tax": {
"type": "number"
}
}
},
"tax": {
"type": "object",
"description": "Tax object",
"properties": {
"cgst_rate": {
"type": "number",
"description": "% rate for CGST"
},
"sgst_rate": {
"type": "number",
"description": "% rate for SGST"
},
"igst_rate": {
"type": "number",
"description": "% rate for IGST"
},
"other_tax_rate": {
"type": "number",
"description": "% other tax rate"
},
"cgst": {
"type": "number",
"description": "CGST Amount"
},
"sgst": {
"type": "number",
"description": "SGST Amount"
},
"igst": {
"type": "number",
"description": "IGST Amount"
},
"other_tax": {
"type": "number",
"description": "Other tax Amount"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
Responses
Status code 200 (SPMD Trips created successfully)
{
"success": true,
"data": {
"master_trip_id": 114,
"shipments": [
{
"id": 3772746,
"shareUrl": "http://share_url",
"lr_number": "LR123",
"feed_unique_id": null
},
{
"id": 3772747,
"shareUrl": "http://share_url",
"lr_number": "LR124",
"feed_unique_id": null
}
]
}
}
Post your questions in the comment box to get answers from the experts who watch this page.
For engineering support: visit FT Support