Logistome

Logistome API documentation

Authorization

Authorization

Required for all requests

POST

Permission: api

Parameter

Field Type Description Required
device String api Yes
Authorization String Bearer API KEY Yes
HTTP/1.1 401 Unauthorized
{
    "success": false,
    "errMsg": "UNAuthorization"
}

Drivers

List

Required for all requests

POST Authorized
https://api.logistome.com/api/v1/api/drivers/list
                                        

Permission: api

HTTP/1.1 200 OK 
{
    "success": true,
    "rowCount": 2,
    "data": [
        {
            "idUserDriver": 2,
            "fullName": "Armm",
            "phoneCode": "+374",
            "phoneNumber": "94775306",
            "transportTypeName": "Car",
            "transportNumber": "CC701II",
            "transportDescription": "hghb"
        },
        {
            "idUserDriver": 13,
            "fullName": "Driver 177",
            "phoneCode": "+374",
            "phoneNumber": "55663322",
            "transportTypeName": "Car",
            "transportNumber": "1100177",
            "transportDescription": "Nissan"
        }
    ]
}

HTTP/1.1 {errorCode}
{
    "success": false,
    "errMsg": "errorMessage"
}

Services

List

Required for all requests

POST Authorized
https://api.logistome.com/api/v1/api/services/list
                                        

Permission: api

HTTP/1.1 200 OK 
{
    "success": true,
    "rowCount": 2,
    "data": [
        {
            "idService": 2,
            "name": "Service 1",
            "description": "Service 1",
            "itemsPrice": [
                {
                    "idTransportType": 1,
                    "priceMethod": 2,
                    "minKm": 5,
                    "minPriceKm": 600,
                    "oneKmPrice": 100,
                    "transportName": "Car",
                    "priceMethodName": "By distance"
                },
                {
                    "idTransportType": 3,
                    "priceMethod": 1,
                    "price": 500,
                    "transportName": "Bicycle",
                    "priceMethodName": "Fixed price"
                }
            ]
        },
        {
            "idService": 4,
            "name": "test ccc",
            "description": "",
            "itemsPrice": [
                {
                    "idTransportType": 1,
                    "priceMethod": 1,
                    "price": 1000,
                    "transportName": "Car",
                    "priceMethodName": "Fixed price"
                }
            ]
        }
    ]
}

HTTP/1.1 {errorCode}
{
    "success": false,
    "errMsg": "errorMessage"
}

Orders

Calculate Delivery Price

Required for all requests

POST Authorized
https://api.logistome.com/api/v1/api/order/calculateDeliveryPrice
                                        

Permission: api

Parameter

Field Type Description Required
saveData Object Yes
saveData.idService Integer Service id Yes
saveData.idTransportType Integer Service itemsPrice idTransportType Yes
saveData.origins Object Origins Yes
saveData.origins.latitude String Origins Latitude Yes
saveData.origins.longitude String Origins Longitude Yes
saveData.destinations Object Destinations Yes
saveData.destinations.latitude String Destinations Latitude Yes
saveData.destinations.longitude String Destinations Longitude Yes
HTTP/1.1 200 OK 
{
    "success": true,
    "data": {
        "deliveryPrice": 3500
    }
}

HTTP/1.1 {errorCode}
{
    "success": false,
    "errMsg": "errorMessage"
}

Save

Required for all requests

POST Authorized
https://api.logistome.com/api/v1/api/order/save
                                        

Permission: api

Parameter

Field Type Description Required
saveData Object Yes
saveData.idService Integer Service id Yes
saveData.idTransportType Integer Service itemsPrice idTransportType Yes
saveData.idUserDriver Integer Drivers idUserDriver No
saveData.customerName String Customer Name Yes
saveData.documentNumber String Document Number No
saveData.amountOrder Numeric Order Amount Yes
saveData.amountDelivery Numeric Amount Delivery (Calculate Delivery Price) Yes
saveData.orderNumber Numeric Order Number No
saveData.description String Description No
saveData.phoneCode String Phone Code ( ext. +374) Yes
saveData.phoneNumber Numeric Phone Number Yes
saveData.deliveryDate Date Delivery Date No
saveData.sizeWidth Numeric Width (cm) No
saveData.sizeHeight Numeric Height (cm) No
saveData.sizeLength Numeric Length (cm) No
saveData.sizeWeight Numeric Weight (kg) No
saveData.steps Array Steps List (min 2 object in array) Yes
saveData.steps[i] Object Step Yes
saveData.steps[i].address String Step Address Yes
saveData.steps[i].mapLat String Step Latitude Yes
saveData.steps[i].mapLng String Step Longitude Yes
saveData.steps[i].checkPoint Bool Step Check Point Yes
saveData.steps[i].phoneCode String Step Phone Code (ext. +374) No
saveData.steps[i].phoneNumber Numeric Step Phone Number No
saveData.steps[i].note String Step Note No
saveData.items Array Order items (Product) Yes
saveData.items[i] Object Order One Product No
saveData.items[i].itemName String Order Product Name Yes
saveData.items[i].itemPrice Numeric Order Product Price No
saveData.items[i].itemNumber Numeric Order Product Number No
HTTP/1.1 200 OK 
{
    "success": true,
    "rowCount": 1,
    "data": {
        "idOrder": 39,
        "idKey": "c22d08855eeb815fa16c5e9bac64d715",
        "orderNumber": "1622620945844",
        "documentNumber": "ASD123"
    }
}

HTTP/1.1 {errorCode}
{
    "success": false,
    "errMsg": "errorMessage"
}

Get One

Required for all requests

POST Authorized
https://api.logistome.com/api/v1/api/order/get_one/idKey
                                        

Permission: api

HTTP/1.1 200 OK 
{
    "success": true,
    "rowCount": 1,
    "data": {
        "idOrder": 39,
        "idKey": "c22d08855eeb815fa16c5e9bac64d715",
        "addressFrom": "12, Vagharsh Vagharshyan Street, Yerevan, Armenia",
        "addressTo": "44, David-Bek Street, Yerevan, Armenia ",
        "idService": 2,
        "idTransportType": 1,
        "idUserDriver": 13,
        "documentNumber": "ASD123",
        "amountDelivery": 500,
        "amountOrder": 1500,
        "amountTotal": 2000,
        "status": 2,
        "statusFinish": 1,
        "idReason": null,
        "statusFinishNote": null,
        "description": "Order Desc",
        "orderNumber": "1622620945844",
        "deliveryDate": "2021-05-27T19:00:00.000Z",
        "createDate": "2021-06-02T08:02:25.000Z",
        "updateDate": "2021-06-02T08:02:25.000Z",
        "finishDate": null,
        "fromLat": 40.199337,
        "fromLng": 44.501713,
        "toLat": 40.150322,
        "sizeWidth": 44.528896,
        "sizeHeight": 20,
        "sizeLength": 30,
        "sizeM3": 6000,
        "sizeWeight": 15,
        "phoneCode": "+374",
        "phoneNumber": 94775309,
        "routeDistance": 9779,
        "routeDuration": 1011,
        "customerName": "Customer 1",
        "customerEmail": "",
        "driverName": "Driver 177",
        "driverEmail": "[email protected]",
        "driverPhoneCode": "+374",
        "driverPhoneNumber": "55663322",
        "serviceName": "Service 1",
        "reasonTitle": null,
        "stepsCount": 3,
        "statusName": "ACTIVE",
        "statusFinishName": "PENDING",
        "itemsLog": [
            {
                "name": "Create",
                "date": "2021-06-02T08:02:25.000Z",
                "address": null,
                "mapLat": null,
                "mapLng": null,
                "phoneCode": null,
                "phoneNumber": null,
                "note": null,
                "status": 1
            },
            {
                "name": "Assign Driver",
                "date": "2021-06-02T08:02:25.000Z",
                "address": null,
                "mapLat": null,
                "mapLng": null,
                "phoneCode": null,
                "phoneNumber": null,
                "note": null,
                "status": 1
            },
            {
                "name": "Start",
                "date": "2021-06-02T08:02:25.000Z",
                "address": null,
                "mapLat": null,
                "mapLng": null,
                "phoneCode": null,
                "phoneNumber": null,
                "note": null,
                "status": 0
            },
            {
                "name": "12, Vagharsh Vagharshyan Street, Yerevan, Armenia",
                "date": "2021-06-02T08:02:25.000Z",
                "address": "12, Vagharsh Vagharshyan Street, Yerevan, Armenia",
                "mapLat": 40.199337,
                "mapLng": 44.501713,
                "phoneCode": "374",
                "phoneNumber": "14252522",
                "note": "alo 1",
                "status": 0
            },
            {
                "name": "25, Marshal Baghramyan Avenue, Yerevan, Armenia",
                "date": "2021-06-02T08:02:25.000Z",
                "address": "25, Marshal Baghramyan Avenue, Yerevan, Armenia",
                "mapLat": 40.191897,
                "mapLng": 44.503788,
                "phoneCode": "375",
                "phoneNumber": "14252522",
                "note": "alo 2",
                "status": 0
            },
            {
                "name": "44, David-Bek Street, Yerevan, Armenia ",
                "date": "2021-06-02T08:02:25.000Z",
                "address": "44, David-Bek Street, Yerevan, Armenia ",
                "mapLat": 40.150322,
                "mapLng": 44.528896,
                "phoneCode": "375",
                "phoneNumber": "14252522",
                "note": "alo 3",
                "status": 0
            },
            {
                "name": "Finish",
                "date": "2021-06-02T08:02:25.000Z",
                "address": null,
                "mapLat": null,
                "mapLng": null,
                "phoneCode": null,
                "phoneNumber": null,
                "note": null,
                "status": 0
            }
        ],
        "items": [
            {
                "itemName": "Pepsi",
                "itemPrice": 150,
                "itemNumber": "AD123s21a1",
                "status": 1,
                "date": "2021-06-02T08:02:25.000Z"
            },
            {
                "itemName": "Cola",
                "itemPrice": 200,
                "itemNumber": "AD124s21a1",
                "status": 1,
                "date": "2021-06-02T08:02:25.000Z"
            },
            {
                "itemName": "Fanta",
                "itemPrice": 250,
                "itemNumber": "AD456s21a1",
                "status": 1,
                "date": "2021-06-02T08:02:25.000Z"
            }
        ]
    }
}

HTTP/1.1 {errorCode}
{
    "success": false,
    "errMsg": "errorMessage"
}

Get Tracking Url

Required for all requests

POST Authorized
https://api.logistome.com/api/v1/api/order/get_tracking_url/idKey
                                        

Permission: api

HTTP/1.1 200 OK 
{
    "success": true,
    "data": {
        "idOrder": 39,
        "idKey": "c22d08855eeb815fa16c5e9bac64d715",
        "trackingUrl": "https://cdpt.in/NTY4MDQ4"
    }
}

HTTP/1.1 {errorCode}
{
    "success": false,
    "errMsg": "errorMessage"
}