Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagejson
{
    "datatype": "object",
    "required": [
        "vehicleNumber",
        "locationSource",
        "loading",
        "unloading"
    ],
    "properties": {
        "is_round_trip": {
            "datatype": "boolean",
            "description": "If set to true, auto-creation of return trip when forward leg is closed"
        },
        "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",
        },
        "vehicleNumber": {
            "description": "vehicle number",
            "validation": "no special characters",
            "datatype": "string",
            "example": "AP26BC1234"
        },
        "portableTrackerUniqueId": {
            "datatype": "string",
            "example": "AP26BC1234"
        },
        "driverName": {
            "description": "driver name",
            "datatype": "string",
            "example": "Raju",
            "default": "Unknown driver"
        },
        "driverNumbers": {
            "description": "driver mobile numbers",
            "validation": "10-digit valid phone number",
            "datatype": "array",
            "example": [
                "9090909090",
                "9090912090"
            ],
            "default": [
                1234567890
            ]
        },
        "locationSource": {
            "description": "Type of Device to track the location.",
            "datatype": "string",
            "example": "sim",
            "default": "sim",
            "options": [
                "sim",
                "gps",
                "smartPhone"
            ]
        },
        "plantCode": {
            "description": "reference code of a Branch for access/visibility, Master data onboarding required.",
            "datatype": "string",
            "example": "BK01",
            "validation": "Trip Creation will fail if incorrect data provided"
        },
        "loading": {
            "description": "either object {uniqueId, area, address} where uniqueId field is mandatory OR object {lat, lng, area, address} where lat, lng fields are mandatory fields.",
            "datatype": "object",
            "properties": {
                "lat": {
                    "datatype": "number",
                    "format": "double",
                    "example": 21.65478381
                },
                "lng": {
                    "datatype": "number",
                    "format": "double",
                    "example": 75.67845632
                },
                "address": {
                    "datatype": "string",
                    "example": "Mumbai, Maharashtra, India"
                },
                "area": {
                    "datatype": "string",
                    "example": "Mumbai, Maharashtra, India"
                },
                "pincode": {
                    "datatype": "string",
                    "example": "524002"
                },
                "uniqueId": {
                    "datatype": "string",
                    "example": "MH01"
                }
            },
            "required": [
                "lat",
                "lng",
                "uniqueId"
            ]
        },
        "unloading": {
            "description": "either object {uniqueId, area, address} where uniqueId field is mandatory OR object {lat, lng, area, address} where lat, lng fields are mandatory fields.",
            "datatype": "object",
            "properties": {
                "lat": {
                    "datatype": "number",
                    "format": "double",
                    "example": 21.65478381
                },
                "lng": {
                    "datatype": "number",
                    "format": "double",
                    "example": 75.67845632
                },
                "address": {
                    "datatype": "string",
                    "example": "Mumbai, Maharashtra, India"
                },
                "area": {
                    "datatype": "string",
                    "example": "Mumbai, Maharashtra, India"
                },
                "pincode": {
                    "datatype": "string",
                    "example": "524002"
                },
                "uniqueId": {
                    "datatype": "string",
                    "example": "MH01"
                }
            },
            "required": [
                "lat",
                "lng",
                "uniqueId"
            ]
        },
        "waypoints": {
            "description": "{uniqueId,lat,lng} combination or {uniqueId, address} combination, or just {uniqueId} (Incase pre-onboarded waypoints) can be passed in the object.",
            "datatype": "array",
            "items": {
                "datatype": "object",
                "properties": {
                    "lat": {
                        "datatype": "number",
                        "format": "double",
                        "example": 21.65478381
                    },
                    "lng": {
                        "datatype": "number",
                        "format": "double",
                        "example": 75.67845632
                    },
                    "address": {
                        "datatype": "string",
                        "example": "Mumbai, Maharashtra, India"
                    },
                    "area": {
                        "datatype": "string",
                        "example": "Mumbai, Maharashtra, India"
                    },
                    "pincode": {
                        "datatype": "string",
                        "example": "524002"
                    },
                    "uniqueId": {
                        "datatype": "string",
                        "example": "MH01"
                    }
                },
                "required": [
                    "lat",
                    "lng",
                    "uniqueId"
                ]
            }
        },
        "route": {
            "description": "code is required to resolve places from onboarded routes",
            "datatype": "object",
            "properties": {
                "code": {
                    "description": "short of the onboarded route",
                    "datatype": "string",
                    "example": "Mum-Delhi"
                }
            }
        },
        "consignee": {
            "description": "{uniqueId, name, ...} uniqueId is mandatory",
            "datatype": "object",
            "properties": {
                "uniqueId": {
                    "datatype": "string"
                },
                "name": {
                    "datatype": "string"
                },
                "email": {
                    "datatype": "array",
                    "items": {
                        "datatype": "string"
                    }
                },
                "number": {
                    "datatype": "array",
                    "items": {
                        "datatype": "number"
                    }
                }
            },
            "required": [
                "uniqueId"
            ]
        },
        "transporter": {
            "description": "{uniqueId, name, ...} uniqueId is mandatory",
            "datatype": "object",
            "properties": {
                "uniqueId": {
                    "datatype": "string"
                },
                "name": {
                    "datatype": "string"
                },
                "required": [
                    "uniqueId"
                ]
            }
        },
        "consignor": {
            "description": "{uniqueId, name, ...} uniqueId is mandatory.",
            "datatype": "object",
            "properties": {
                "uniqueId": {
                    "datatype": "string"
                },
                "name": {
                    "datatype": "string"
                }
            },
            "required": [
                "uniqueId"
            ]
        },
        "share_trip": {
            "description": "can trip be shared with consignee contacts",
            "datatype": "boolean",
            "example": true
        },
        "is_round_trip": {
            "description": "If set to true, auto-creation of return trip when forward leg is closed",
            "datatype": "boolean",
            "example": true
        },
        "lrnumber": {
            "description": "lr number",
            "datatype": "string",
            "example": "AF1153421"
        },
        "feedUniqueId": {
            "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.",
            "datatype": "string",
            "example": "101123452"
        },
        "originSTD": {
            "description": "Defined Trip Standard Time of Departure in 24hrs format in UTC",
            "datatype": "string",
            "default": null,
            "example": "2020-01-01 12:30:00"
        },
        "destinationSTA": {
            "description": "Defined Trip Standard Time of Arrival in 24hrs format in UTC",
            "datatype": "string",
            "default": null,
            "example": "2020-01-01 12:30:00"
        },
        "customValues": {
            "datatype": "object",
            "additionalProperties": {
                "datatype": "string"
            },
            "properties": {
                "invoiceNumber": {
                    "datatype": "string",
                    "description": "Any Custom property to be associated to a Trip. Can be Invoice Number, Shipment Number, etc"
                }
            },
            "example": {
                "invoiceNumber": "INV123",
                "ewayBillExpiryDate": "2020-01-01",
                "shipmentNumber": "SHI123",
                "property1": "value"
            }
        },
        "primary_attributes": {
            "description": "These are some important attributes identified and are used for analytics",
            "datatype": "object",
            "properties": {
                "shipment_numbers": {
                    "datatype": "array",
                    "items": {
                        "datatype": "string"
                    },
                    "example": [
                        "SHP34567",
                        "SH45578"
                    ]
                },
                "container_number": {
                    "datatype": "string"
                },
                "movement_subtype": {
                    "datatype": "string"
                },
                "movement_channel": {
                    "datatype": "string"
                },
                "billing_type": {
                    "datatype": "string",
                    "example": "To Pay/To Bill"
                },
                "yard_entry_number": {
                    "datatype": "string"
                },
                "expected_transit_time": {
                    "description": "Expected Transit Time in minutes",
                    "datatype": "number"
                },
                "erp_transit_distance": {
                    "description": "Transit Distance in KM",
                    "datatype": "number"
                },
                "gross_weight": {
                    "description": "Gross Weight in Tons",
                    "datatype": "number"
                },
                "tare_weight": {
                    "description": "Tare Weight in Tons",
                    "datatype": "number"
                },
                "net_weight": {
                    "description": "Net Weight in Tons",
                    "datatype": "number"
                },
                "vehicle_type_ref_code": {
                    "datatype": "string"
                },
                "gate_in": {
                    "description": "Gate In Time. Should be a valid date time stamp in 24hrs format in UTC",
                    "datatype": "string",
                    "example": "2021-03-16 10:22:22"
                },
                "gate_out": {
                    "description": "Gate Out Time. Should be a valid date time stamp in 24hrs format in UTC",
                    "datatype": "string",
                    "example": "2021-03-16 10:22:22"
                },
                "sales_rep_id": {
                    "datatype": "string"
                },
                "freight_value": {
                    "datatype": "number"
                },
                "freight_value_currency": {
                    "datatype": "string"
                },
                "freight_rate_unit": {
                    "description": "Allowed values - (PER_TON, PER_KM, PER_TON_PER_KM, PER_DAY_PER_TRIP, PER_TRIP, FIXED_RATE)",
                    "datatype": "string"
                },
                "freight_rate": {
                    "datatype": "number"
                },
                "indent_fteid": {
                    "datatype": "string"
                },
                 "master_trip_grouping_parameter": {
                    "type": "string"
                },
                "unloading_gate_in": {
                    "type": "string",
                    "description": "Gate In Time. Should be a valid date time stamp format",
                    "example": "2021-03-16 10:22:22"
                },
                "unloading_gate_out": {
                    "type": "string",
                    "description": "Gate Out Time. Should be a valid date time stamp format",
                    "example": "2021-03-16 10:22:22"
                }
            }
        },
        "invoice": {
            "description": "Invoice Details. MANDATORY for generating Digital LR",
            "datatype": "object",
            "properties": {
                "currency": {
                    "datatype": "string"
                },
                "invoice_details": {
                    "description": "Invoice details are used for creating invoices and digital LR. MANDATORY for Digital ELR",
                    "datatype": "array",
                    "items": {
                        "datatype": "object",
                        "required": [
                            "invoice_number"
                        ],
                        "properties": {
                            "from": {
                                "description": "MANDATORY for Digital ELR",
                                "datatype": "object",
                                "required": [
                                    "name",
                                    "gstin",
                                    "shipping_address"
                                ],
                                "properties": {
                                    "name": {
                                        "datatype": "string",
                                        "description": "Sender name"
                                    },
                                    "gstin": {
                                        "datatype": "string",
                                        "description": "Sender GSTIN"
                                    },
                                    "shipping_address": {
                                        "datatype": "string"
                                    },
                                    "billing_address": {
                                        "datatype": "string"
                                    },
                                    "contact_phone": {
                                        "description": "Phone numbers in an array",
                                        "datatype": "array",
                                        "items": {
                                            "datatype": "string"
                                        }
                                    },
                                    "contact_email": {
                                        "description": "Email-Ids in an array",
                                        "datatype": "array",
                                        "items": {
                                            "datatype": "string"
                                        }
                                    }
                                }
                            },
                            "to": {
                                "datatype": "object",
                                "description": "MANDATORY for Digital ELR",
                                "required": [
                                    "name",
                                    "gstin",
                                    "shipping_address",
                                    "contact_phone"
                                ],
                                "properties": {
                                    "name": {
                                        "datatype": "string",
                                        "description": "Receiver name"
                                    },
                                    "gstin": {
                                        "datatype": "string",
                                        "description": "Sender GSTIN"
                                    },
                                    "shipping_address": {
                                        "datatype": "string"
                                    },
                                    "billing_address": {
                                        "datatype": "string"
                                    },
                                    "contact_phone": {
                                        "description": "Phone numbers in an array",
                                        "datatype": "array",
                                        "items": {
                                            "datatype": "string"
                                        }
                                    },
                                    "contact_email": {
                                        "description": "Email-Ids in an array",
                                        "datatype": "array",
                                        "items": {
                                            "datatype": "string"
                                        }
                                    }
                                }
                            },
                            "so_number": {
                                "datatype": "string"
                            },
                            "so_quantity": {
                                "datatype": "number"
                            },
                            "so_date": {
                                "description": "so_date will be in 'YYYY-MM-DD hh:mm:ss' in 24hrs format in UTC or epoch in milliseconds",
                                "datatype": "string"
                            },
                            "so_release_date": {
                                "description": "so_release_date will be in 'YYYY-MM-DD hh:mm:ss' in 24hrs format in UTC or epoch in milliseconds",
                                "datatype": "string"
                            },
                            "po_number": {
                                "datatype": "string"
                            },
                            "do_number": {
                                "datatype": "string"
                            },
                            "do_quantity": {
                                "datatype": "number"
                            },
                            "do_date": {
                                "description": "do_date will be in 'YYYY-MM-DD hh:mm:ss' in 24hrs format in UTC or epoch in milliseconds",
                                "datatype": "string"
                            },
                            "do_publish_date": {
                                "description": "do_publish_date will be in 'YYYY-MM-DD hh:mm:ss' in 24hrs format in UTC or epoch in milliseconds",
                                "datatype": "string"
                            },
                            "invoice_number": {
                                "datatype": "string"
                            },
                            "invoice_date": {
                                "description": "invoice_date will be in 'YYYY-MM-DD hh:mm:ss' in 24hrs format in UTC or epoch in milliseconds",
                                "datatype": "string"
                            },
                            "eway_bill_no": {
                                "datatype": "string"
                            },
                            "eway_bill_expiry_date": {
                                "description": "eway_bill_expiry_date will be in 'YYYY-MM-DD hh:mm:ss' in 24hrs format in UTC or epoch in milliseconds or yyyy-MM-dd'T'HH:mm:ssZ (ISO offset date time format)",
                                "datatype": "string"
                            },
                            "total_invoice_value": {
                                "datatype": "number"
                            },
                            "description": {
                                "description": "Invoice Description",
                                "datatype": "string"
                            },
                            "price": {
                                "description": "Price object",
                                "datatype": "object",
                                "properties": {
                                    "net_price": {
                                        "datatype": "number"
                                    },
                                    "total_price": {
                                        "datatype": "number"
                                    },
                                    "total_tax": {
                                        "datatype": "number"
                                    }
                                }
                            },
                            "tax": {
                                "description": "Tax object",
                                "datatype": "object",
                                "properties": {
                                    "cgst_rate": {
                                        "datatype": "number",
                                        "description": "% rate for CGST"
                                    },
                                    "sgst_rate": {
                                        "datatype": "number",
                                        "description": "% rate for SGST"
                                    },
                                    "igst_rate": {
                                        "datatype": "number",
                                        "description": "% rate for IGST"
                                    },
                                    "other_tax_rate": {
                                        "datatype": "number",
                                        "description": "% other tax rate"
                                    },
                                    "cgst": {
                                        "datatype": "number",
                                        "description": "CGST Amount"
                                    },
                                    "sgst": {
                                        "datatype": "number",
                                        "description": "SGST Amount"
                                    },
                                    "igst": {
                                        "datatype": "number",
                                        "description": "IGST Amount"
                                    },
                                    "other_tax": {
                                        "datatype": "number",
                                        "description": "Other tax Amount"
                                    }
                                }
                            },
                            "custom_fields": {
                                "description": "Any additional params for invoice",
                                "datatype": "object"
                            },
                            "item_details": {
                                "datatype": "array",
                                "items": {
                                    "datatype": "object",
                                    "required": [
                                        "product_name"
                                    ],
                                    "properties": {
                                        "sku_code": {
                                            "datatype": "string"
                                        },
                                        "material_code": {
                                            "datatype": "string"
                                        },
                                        "hsn_code": {
                                            "datatype": "string"
                                        },
                                        "quantity": {
                                            "datatype": "number"
                                        },
                                        "quantity_unit": {
                                            "datatype": "string"
                                        },
                                        "gross_weight": {
                                            "datatype": "number"
                                        },
                                        "net_weight": {
                                            "datatype": "number"
                                        },
                                        "weight_unit": {
                                            "datatype": "string"
                                        },
                                        "product_name": {
                                            "datatype": "string"
                                        },
                                        "description": {
                                            "datatype": "string"
                                        },
                                        "custom_fields": {
                                            "datatype": "object",
                                            "description": "Any additional params for invoice item details"
                                        },
                                        "price": {
                                            "datatype": "object",
                                            "description": "Price object",
                                            "properties": {
                                                "net_price": {
                                                    "datatype": "number"
                                                },
                                                "total_price": {
                                                    "datatype": "number"
                                                },
                                                "total_tax": {
                                                    "datatype": "number"
                                                }
                                            }
                                        },
                                        "tax": {
                                            "datatype": "object",
                                            "description": "Tax object",
                                            "properties": {
                                                "cgst_rate": {
                                                    "datatype": "number",
                                                    "description": "% rate for CGST"
                                                },
                                                "sgst_rate": {
                                                    "datatype": "number",
                                                    "description": "% rate for SGST"
                                                },
                                                "igst_rate": {
                                                    "datatype": "number",
                                                    "description": "% rate for IGST"
                                                },
                                                "other_tax_rate": {
                                                    "datatype": "number",
                                                    "description": "% other tax rate"
                                                },
                                                "cgst": {
                                                    "datatype": "number",
                                                    "description": "CGST Amount"
                                                },
                                                "sgst": {
                                                    "datatype": "number",
                                                    "description": "SGST Amount"
                                                },
                                                "igst": {
                                                    "datatype": "number",
                                                    "description": "IGST Amount"
                                                },
                                                "other_tax": {
                                                    "datatype": "number",
                                                    "description": "Other tax Amount"
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}

...