Cargotrack

API Documentation


    Base URL : https://cargotrackapi.cyenosure.co.in
    

Login API

 POST /api/v1/login
 Content-Type: application/json
 Accept: application/json

 {
     "username":"KL.01.CH.6016",
     "password":"7510685178"
 }

  Sample Response:
  {
     "success": "true",
     "status": "200",
     "data": {
        "id": 1,
        "name": "Rasheed",
        "username": "KL.01.CH.6016",
        "mobile": "7510685178",
        "status": 1,
        "api_token": "11|otW2DgPHjgd0JBrooBpdU5ty7ljryppRpIFJF3mi627a289b",
        "created_at": "2022-05-06T08:20:55.000000Z",
        "updated_at": "2022-05-06T08:20:55.000000Z"
     }
  }

Get All Tripsheet

GET /api/v1/trip_sheet
Accept: application/json
Authorization: Bearer 11|otW2DgPHjgd0JBrooBpdU5ty7ljryppRpIFJF3mi627a289b

Sample Response:
{
    "success": "true",
    "status": "200",
    "data": [
        {
            "trip_number": 1,
            "vehicle_drivername": "ASHRAF",
            "trip_date": "2022-07-17",
            "vehicle_number": "KL10AR3598"
        }
    ]
}

Get Goods By Invoice Number

    GET /api/v1/goods_details/12430
    Accept: application/json
    Authorization: Bearer 11|otW2DgPHjgd0JBrooBpdU5ty7ljryppRpIFJF3mi627a289b

Sample Response:

    {
        "success": "true",
        "status": "200",
        "data": {
            "id": 5,
            "invoiceno": "12430",
            "date": "",
            "district": "Malappuram",
            "company": "ABC Company5",
            "address": "",
            "phone": null,
            "weight": "25",
            "pcs": "2",
            "shipmentname": "Test Shipment5",
            "sendingdate": "30-06-2022",
            "recievingdate": "29-07-2023",
            "status": 0,
            "sender_address": null,
            "reciever_address": "Test address15",
            "rewight": 15,
            "goods_desc": "Test description",
            "goods_status": "Just addded",
            "created_at": "2022-07-28T00:00:00.000000Z",
            "updated_at": "-000001-11-30T00:00:00.000000Z"
        }
    }

List All goods (Invoice Numbers)

    GET /api/v1/invoices
    Accept: application/json
    Authorization: Bearer 11|otW2DgPHjgd0JBrooBpdU5ty7ljryppRpIFJF3mi627a289b

Sample Response:
    {
        "success": "true",
        "status": "200",
        "data": [
            {
                "id": 1,
                "invoiceno": "12345"
            },
            {
                "id": 2,
                "invoiceno": "12424"
            }
        ]
    }

Get Tripsheet Cargos By Tripsheet Id

 GET /api/v1/trip_sheet/cargo/1
 Authorization: Bearer 11|otW2DgPHjgd0JBrooBpdU5ty7ljryppRpIFJF3mi627a289b
 Accept: application/json

Sample Response:
{
    "success": "true",
    "status": "200",
    "data": [
        {
            "id": 1,
            "trip_sheet_id": 1,
            "goods_id": 1,
            "invoice_number": "12345",
            "cargo_id": "ABC Company",
            "cargo_name": "ABC Company",
            "place": "Malappuram",
            "mobilenumber": "9645151515",
            "quantity": 1,
            "weight": "25",
            "status": 0,
            "message": null,
            "image": null,
            "created_at": "2022-07-17T11:53:26.000000Z",
            "updated_at": "2022-07-17T11:53:26.000000Z"
        },
        {
            "id": 2,
            "trip_sheet_id": 1,
            "goods_id": 13,
            "invoice_number": "12445",
            "cargo_id": "ABC Company12",
            "cargo_name": "ABC Company12",
            "place": "Ernakulam",
            "mobilenumber": "9544177608",
            "quantity": 4,
            "weight": "21",
            "status": 0,
            "message": null,
            "image": null,
            "created_at": "2023-10-01T00:52:44.000000Z",
            "updated_at": "2023-10-01T00:52:44.000000Z"
        }
    ]
}

Create Tripsheet Cargo

 POST /api/v1/trip_sheet/cargo
 Content-Type: application/json
 Accept: application/json
 Authorization: Bearer 11|otW2DgPHjgd0JBrooBpdU5ty7ljryppRpIFJF3mi627a289b

 {
    "invoiceno":"12445",
    "goods_id":"13",
    "trip_sheet_id":"1",
    "district": "Ernakulam",
    "company": "ABC Company12",
    "address": "",
    "phone": 9544177608,
    "weight": "21",
    "pcs":"4",
    "status":"Tripsheet Created"
 }

Sample Response:
{
    "success": "true",
    "status": "200",
    "data": {
        "invoice_number": "12445",
        "goods_id": "13",
        "trip_sheet_id": "1",
        "cargo_id": "ABC Company12",
        "mobilenumber": 9544177608,
        "cargo_name": "ABC Company12",
        "place": "Ernakulam",
        "quantity": "4",
        "weight": "21",
        "status": 0,
        "updated_at": "2023-10-01T00:52:44.000000Z",
        "created_at": "2023-10-01T00:52:44.000000Z",
        "id": 2
    }
}

Update Rewight

 POST /api/v1/update/reweight
 Content-Type: application/json
 Authorization: Bearer 11|otW2DgPHjgd0JBrooBpdU5ty7ljryppRpIFJF3mi627a289b
 Accept: application/json

 {
     "goods_id":"12",
     "rewight":260
 }

Sample Response:
{
    "success": "true",
    "status": "200",
    "message": "Rewight updated successfully",
    "data": {
        "id": 12,
        "invoiceno": "12444",
        "date": "",
        "district": "Palakkad",
        "company": "ABC Company12",
        "address": "",
        "phone": null,
        "weight": "21",
        "pcs": "4",
        "shipmentname": "Test Shipment12",
        "sendingdate": "324-06-2022",
        "recievingdate": "29-07-2030",
        "status": 0,
        "sender_address": null,
        "reciever_address": "Dssss",
        "rewight": 260,
        "goods_desc": "Test description",
        "goods_status": "Just addded",
        "created_at": "2022-08-19T07:28:53.000000Z",
        "updated_at": "2023-10-01T00:56:47.000000Z"
    }
}