Keystone Mobile Server REST API

From KeystoneIntranet
Revision as of 16:50, 19 April 2018 by Chanson (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Overview

The Keystone Mobile Server exposes a REST API which is used by the Keystone mobile apps to communicate with the Keystone Application Server.

See: Keystone_REST_Server_(KServer) for more on KServer.

Negotiation API

ROOT: /rest

apinegotiate

apinegotiate/{ClientId}/{ClientApiMin}/{ClientApi}

negotiates API version with the server and returns
1

API v1

ROOT: /rest/kmsapi1

System/Session Functions

systeminfo

systeminfo

returns system license information and list of companies
{ "licenseinfo": 
  [ 
    { "serialno": 12345,
      "sysloc": 0,
      "licenseename": "XYZ Company"
    }
  ],
  "companylist":
  [
    { "id": "001",
      "name": "XYZ Company",
      "type": "N"
    },
    { "id": "002",
      "name": "Practice",
      "type": "P"
    }
  ]
}

userlogin

userlogin/{CoId}/{UserId}/{EncryptedPassword}/{OSVersion}

logs in specified UserId and returns session information
{ "session": 
  { "sessionname": "abcdefg",
    "loginname": "john",
    "fullname": "John Q Public",
    "groupname": "user",
    "securityclass": "50",
    "lastcoid": "001",
    "entityid": "",
    "roleclass": "U",
    "options": ""
  }
}

userlogout

userlogout/{SessionKey}

logs out user and closes out session for specified SessionKey

usersessionexpired

usersessionexpired/{UserId}

logs out specified UserId

Mobile Functions

customerinvoices

customerinvoices/{CustId}/{IncludePaid}/{AgeByDate}/{AgingDateLo1}/{AgingDateLo2}/{AgingDateHi2}/{AgingDateLo3}/{AgingDateHi3}/{AgingDateLo4}/{AgingDateHi4}/{AgingDateHi5}

returns invoices for specified CustId

customerlist

customerlist

returns list of customers

invoicehistory

invoicehistory/{SessionNo}/{TransNo}

returns invoice history (tickets and payments) for specified invoice (SessionNo, TransNo)

loadgpslocation

loadgpslocation/{OrderSessionNo}/{OrderTransNo}/{LoadNo}

returns gps location information for specified load (OrderSessionNo, OrderTransNo, LoadNo)

schedulecust

schedulecust/{SlsId}/{BegSchedDT}/{EndSchedDT}/{ActiveCarryHrs}/{UndelvCarryHrs}/{NTLLookAheadHrs}/{OrdselRangeHrs}/{ShowCompletedOrders}

returns schedule information summarized by customer for salesperson SlsId

schedulecustorderloads

schedulecustorderloads/{SessionNo}/{TransNo}/{BegSchedDT}/{EndSchedDT}/{ActiveCarryHrs}/{UndelvCarryHrs}/{NTLLookAheadHrs}/{OrdselRangeHrs}/{ShowCompletedOrders}

returns schedule information (active & completed loads) for specified order (SessionNo, TransNo)

schedulecustorders

schedulecustorders/{SlsId}/{CustId}/{BegSchedDT}/{EndSchedDT}/{ActiveCarryHrs}/{UndelvCarryHrs}/{NTLLookAheadHrs}/{OrdselRangeHrs}/{ShowCompletedOrders}

returns schedule information (active & completed orders) for salesperson SlsId customer CustId

scheduleplant

scheduleplant/{BegSchedDT}/{EndSchedDT}/{ActiveCarryHrs}/{UndelvCarryHrs}/{NTLLookAheadHrs}/{OrdselRangeHrs}/{ShowCompletedOrders}

returns schedule information summarized by plant

scheduleplantorderloads

scheduleplantorderloads/{SessionNo}/{TransNo}/{BegSchedDT}/{EndSchedDT}/{ActiveCarryHrs}/{UndelvCarryHrs}/{NTLLookAheadHrs}/{OrdselRangeHrs}/{ShowCompletedOrders}

returns schedule information (active & completed loads) for specified order (SessionNo, TransNo)

scheduleplantorders

scheduleplantorders/{PlantId}/{BegSchedDT}/{EndSchedDT}/{ActiveCarryHrs}/{UndelvCarryHrs}/{NTLLookAheadHrs}/{OrdselRangeHrs}/{ShowCompletedOrders}

returns schedule information (active & completed orders) for plant PlantId

schedulesls

schedulesls/{BegSchedDT}/{EndSchedDT}/{ActiveCarryHrs}/{UndelvCarryHrs}/{NTLLookAheadHrs}/{OrdselRangeHrs}/{ShowCompletedOrders}

returns schedule information summarized by salesperson
results restricted to single salesperson if current user is locked to a salesperson (New in Keystone 3.1.9)

ticketinfo

ticketinfo/{SessionNo}/{TransNo}

returns ticket detail information for specified ticket (SessionNo, TransNo)