Keystone Online E-Ticketing REST API: Difference between revisions

From KeystoneIntranet
Jump to navigation Jump to search
 
 
(4 intermediate revisions by 2 users not shown)
Line 152: Line 152:


===List Functions===
===List Functions===
====CustomStatusList====
<code>
CustomStatusList
<BR>?BegId=<b>34</b>
<BR>?EndId=<b>53</b>
</code>
: returns list of active dispatch custom statuses
<blockquote>
<pre style="white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;">
{
    "CustomStatusList": [
        {
            "CustomStatusId": 0,
            "Description": "Test Mode 0",
            "StatusCode": "Test"
        }
    ]
}
</pre>
</blockquote>


====DriverList====
====DriverList====

Latest revision as of 01:01, 10 February 2024

Overview

The Keystone REST Server exposes a REST API which is used to support Keystone Online E-Ticketing.

See: Keystone_REST_Server_(KServer) for more on KServer.

Example URIs:

http://127.0.0.1:8211/rest/kOLetapi/v1/connection

Connection Test API

ROOT: /rest/kOLetapi/v1

connection

connection

tests connection with the server
{
    "kOLetapi/v1": {
        "request_status": {
            "status": "200",
            "msg": "Keystone Online E-Ticketing REST Server."
        }
    }
}

API v1

ROOT: /rest/kOLetapi/v1

Ticket Functions

TruckTicketInfo

TruckTicketInfo/{Id}

returns truck status and ticket information for specified GPS Unit Id
{
    "Header": {
        "TruckTicketInfo": {
            "JobId": "ECHO VALLEY",
            "CustomerId": "ALLEN",
            "LoadNumber": 1,
            "OrderNumber": "2728",
            "BatchStart": "2020-07-28T20:45:00.000Z",
            "BatchEnd": "2020-07-28T20:47:16.000Z",
            "VehicleId": 100,
            "TicketNumber": "99739",
            "Plant": "01",
            "TicketKey": "7824",
            "TruckStatus": 2,
            "Ticketed": "2020-07-28T20:45:00.000Z",
            "ProjectLeavePlant": "2020-07-28T21:29:10.955Z",
            "ProjectArriveJob": "2020-07-28T21:39:10.956Z",
            "ProjectBeginPour": "2020-07-28T21:48:10.957Z",
            "ProjectEndPour": "2020-07-28T22:18:10.958Z",
            "ProjectLeaveJob": "2020-07-28T22:20:10.958Z",
            "ProjectAtPlant": "2020-07-28T22:30:10.959Z"
        }
    },
    "Ticket": {
        "TicketInfo": {
            "CustomerId": "ALLEN",
            "TicketNumber": 99739,
            "OrderNumber": "2728",
            "JobId": "ECHO VALLEY",
            "GPSRadius": 0.2,
            "Slump": 3,
            "PrintWeights": "Y",
            "ShipTo1": "ECHO VALLEY Estates",
            "ShipTo2": "345 W Adams St",
            "ShipTo3": "Columbus,OH 43221",
            "DeliveryInstruction1": "I 70 W to Exit 24 turn left",
            "DeliveryInstruction2": "Go 6 miles to Brewister St",
            "DeliveryInstruction3": "Turn Rt .75 mile on left",
            "CustomerName": "Allen Construction",
            "Usage": "CURBS",
            "CustomerPurchaseOrder": "123456",
            "DriverId": "ANDREWS",
            "DriverName": "Walt Andrews",
            "SubTotal": 405,
            "TaxTotal": 20.25,
            "TicketTotal": 425.25,
            "GrandTotal": 425.25,
            "BatchStart": "2020-07-28T20:45:00.000Z",
            "BatchEnd": "2020-07-28T20:47:16.000Z",
            "OrderSessionNumber": 8403,
            "OrderTransactionNumber": 1,
            "Plant": "01",
            "DeliveryDate": "2020-07-28T21:00:00.000Z",
            "DriverNumber": 101,
            "Priced": false,
            "TicketKey": "7824"
        },
        "TicketProducts": [
            {
                "LineNumber": 1,
                "ProductId": "3010-01",
                "Description": "3000 PSI w/ 1\" Stone",
                "QtySold": 5,
                "QtyDelivered": 5,
                "QtyOrdered": 10,
                "UnitOfMeasure": "CY",
                "UnitPrice": 81,
                "UnitPercentDiscount": "",
                "Amount": 405
            }
        ],
        "TicketEmailRecipients": [
            {
                "Name": "Paul Morey",
                "Email": "pmorey@givenhansco.com",
                "TicketEmailTypeId": 1
            },
            {
                "Name": "Craig Hanson",
                "Email": "chanson@givenhansco.com",
                "TicketEmailTypeId": 2
            },
            {
                "Name": "Don Cheng",
                "Email": "dcheng@givenhansco.com",
                "TicketEmailTypeId": 3
            }
        ]
    }
}

List Functions

CustomStatusList

CustomStatusList
?BegId=34
?EndId=53

returns list of active dispatch custom statuses
{
    "CustomStatusList": [
        {
            "CustomStatusId": 0,
            "Description": "Test Mode 0",
            "StatusCode": "Test"
        }
    ]
}

DriverList

DriverList

returns list of active Keystone drivers
{
    "DriverList": [
        {
            "DriverId": "ANDREWS",
            "DriverName": "Walt Andrews",
            "DriverNo": 101
        },
        {
            "DriverId": "COLEMAN",
            "DriverName": "Daryl Coleman",
            "DriverNo": 102
        },
        {
            "DriverId": "FOX",
            "DriverName": "James Fox",
            "DriverNo": 103
        },
        {
            "DriverId": "FRYE",
            "DriverName": "GERALD FRYE",
            "DriverNo": 0
        }
    ]
}

PlantList

PlantList

returns list of active Keystone plants
{
    "PlantList": [
        {
            "PlantId": "01",
            "PlantNo": 1
        },
        {
            "PlantId": "02",
            "BillingPlantId": "01",
            "PlantNo": 2
        },
        {
            "PlantId": "03",
            "BillingPlantId": "01",
            "PlantNo": 3
        },
        {
            "PlantId": "5D",
            "PlantNo": 0
        }
    ]
}

TruckList

returns list of active Keystone trucks
{
    "TruckList": [
        {
            "TruckId": "01",
            "VehicleId": 1
        },
        {
            "TruckId": "02",
            "VehicleId": 2
        },
        {
            "TruckId": "03",
            "VehicleId": 3
        },
        {
            "TruckId": "100",
            "VehicleId": 100
        },
        {
            "TruckId": "101",
            "VehicleId": 101
        },
        {
            "TruckId": "Z100",
            "VehicleId": 1000100
        },
        {
            "TruckId": "Z101",
            "VehicleId": 0
        }
    ]
}