UpdateTrip API

API to update a trip

Clients call this API to update a previously created trip based on tripId or uniqueId (feedUniqueId).

loading / unloading objects

These objects expect to carry the information of source and destination place and intend to resolve the required information of the place i.e., lat, lng and address of the place for the Trip. The required information is either passed directly or indirectly with a unique place reference of the company. Hence, any combination from the following is allowed in these objects.

  • {lat, lng, area, address} Direct Information of a place with lat, lng, area and address

  • {uniqueId, area, address}Case when the known places of the company are already onboarded on the Freight Tiger system with required data for a place that helps in resolving the lat, lng and address using a uniqueId representing the unique code reference for that place.

In case the known place is not onboarded for the company, passing this combination will also auto onboard the place for that company by resolving the fields address and area. Passing only uniqueId without area and address will only refer to the onboarded place and can not auto onboard the place. If the provided information does not resolve the lat, lng for a place, It will result in the error: 422 - Missing Required Input.

Digital LR - If Digital LR (eLR) feature is enabled for the customer, the invoice related parameters also need to be passed.

API Endpoint:

Request Parameters:

Name

Type

Location

Description

Example

Name

Type

Location

Description

Example

Authorization

string

headers

JWT token required to authenticate API call.

Authorization: Bearer eyJhbGciOiJIUzI1Ni

Request Body:

Example value:

{ "lrid": 9089444, "lrnumber": "LR123", "feedUniqueId": "F1212121-dd-98375", "loading": { "uniqueId": "1234567", "lat": 19.0759837, "lng": 72.87765590000004, "address": "Mumbai, Maharashtra, India", "area": "Mumbai, Maharashtra, India" }, "unloading": { "uniqueId": "1234568", "lat": 17.9307285, "lng": 73.64773420000006, "address": "Mahabaleshwar, Maharashtra 412806, India", "area": "Mahabaleshwar, Maharashtra, India" }, "waypoints": [ { "uniqueId": "123456", "address": "Pune Maharashtra", "number": "AP071H07", "area": "500001", "lat": 18.5204, "lng": 73.8567 } ], "vehicleNumber": "MH05AS1212", "portableTrackerUniqueId":"PRT123" "locationSource": "sim", "driverName": "Raju", "driverNumbers": [ "1234567890" ], "consignee": { "uniqueId": "CODE1", "name": "Consignee 1", "number": [ "1111111111", "1111111111" ] }, "share_trip": 1, "customValues": { "ewayBillNo": "EWB1234", "invoiceNumber": "INV123" }, "vehicle_details": { "tare_weight": 100, "net_weight": 100, "gross_weight": 100, "type": "8 wheels" }, "lr_reference_number": "INV-4453", "primary_attributes": { "gate_in": "2021-02-02 12:34", "gate_out": "2021-02-02 12:34", "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", "master_trip_grouping_parameter":"MST123", "unloading_gate_in": "2024-02-02 11:34", "unloading_gate_out": "2024-02-03 12:34" }, "invoice": { "total_invoice_value": 1000000, "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": "343424", "so_quantity": 12, "so_date": "2020-01-01 13:40:00", "so_release_date": "2020-01-01 13:40:00", "po_number": "45642", "do_number": "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": "1516859638", "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": "21324", "hsn_code": "8803", "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

Either lrid or feedUniqueId is mandatory to update a trip.

  • The updateTrip API schema is the same as the addTrip API schema.

  • Only lrid field is added additionally to the addTrip schema. Rest all of the fields and their schema/validations are exactly the same as addTrip API

"lrid": { "description": "trip id of already created trip", "datatype": "integer", "example": "9012224", "mandatory": true }

 

Responses:

{ "status": true, "result": { "id": 9012224 }, "message": "Trip Updated Successfully" }

 

Post your questions in the comment box to get answers from the experts who watch this page.

For engineering support: visit FT Support