GPS System Diagnostics
Verifi
Description
Verifi uses a subscription based REST API that requires periodic polling to retrieve statuses accumulated since the last poll request. Multiple statuses for multiple trucks may be received in a single poll request.
REST API
There are three API resources that handle status requests. When calling any of these resources, you must include the following HEADER parameters:
verifi-user=(provided by verifi) verify-user-pass=(provided by verifi)
Subscription Request
Before polling, a "subscription request" call must be made. This is a POST call that includes body content. This call only needs to be made ONCE per session.
POST https://portal.verificoncrete.com/rs/api/1.0/subscription Body: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <verifi-subscription-request xmlns="https://portal.verificoncrete.com/api/1.0/xml/subscription" min-gps-interval-seconds="0"> <context> <all/> </context> </verifi-subscription-request>
Poll Statuses
At periodic intervals, make a GET call to the "poll status" resource. This will return all the statuses accumulated since the last call.
NOTE: It is easier to obtain the results in JSON versus XML. To do this, add an "Accept" header to this call with the value "application/json".
GET https://portal.verificoncrete.com/rs/api/1.0/subscription
Sample Response: (TBD)
Status Codes:
- 404 (Resource not found) - There are no statuses since the last call.
- 410 (Gone) - The Verifi session has timed out, you need to make the "subscription request" call again.
Unsubscribe
When your session is complete, you should "unsubscribe" by making this DELETE call:
DELE https://portal.verificoncrete.com/rs/api/1.0/subscription