- authorization
- Format: Authorization: <token>
JWT style token that should be used to validate future requests of the D3\PICK database system.
This will included information on the user and the users roles in a json object.
- x-filelock
- This variable will show TRUE or FALSE if the client is holding a database item lock on the specific record being returned. A lock must be requested before doing a PUT on an existing record to edit or update the data. To request a lock you must use the $requestlock=1 url variable with a GET prior to the PUT.
- x-total-count
- Will return the total number of records available with a GET request. URL variables $limit and $offset can be used to control paging of the results actually returned.
Endpoints:
Conos (Companies)
Auth
Orders
Clients
PaperSaver
conos
https://d3-devel.murphyauto.net/api/v1/conos/ {company# 3digits}
Will return a json object containing containing details for that company. If no company number is provided then objects for all API activated companies are returned.
- company#
- To request a single record. Must be in the 3 digit numeric format (co#)
auth
https://d3-devel.murphyauto.net/api/v1/auth/
{logon | login | authorize | token | renew | logoff | app}
- Used to manage user authentication for API access and return App details.
- For login; GET required query parameters:
- appkey
- Returns (opens) a HTML page which could be displayed normally or in a model. An access_code will be submitted to the redirectURL which is on file in the App config for the appkey used when making request. The access_code life is very short (30 seconds or less) and must be used by the same App to retreive an authToken. If not used in that time a new login request will be needed.
- For logon; headers must include:
- x-appkey
- x-username
- x-password
- An authorization token and refreshToken will be returned in the response body as json if successful. This auhorization token is in JWT format and the payload includes user info and permissions for the user and the specified x-appkey used when making request. The authorization should be included in header of future secure requests of the API. This endpoint can be used only by Apps which are owned by the auth server (highly trusted)
- For authorize; POST parameters:
- x-appkey - in header or appkey in post body or url
- username - in post body
- password - in post body
- An access_code and redirectURL will be returned in the response body as json if successful. The access_code would normally be submitted to the redirectURL which is the URL on file in the App config of x-appkey used when making request. The access_code life is very short (30 seconds or less) and must be used by the same App to retreive an authToken. If not used in that time a new authorization request will be needed.
- For token; GET or POST required paramters:
- appkey (can be in header as x-appkey)
- access_code (received from login in the redirectURL
- An authorization token and refreshToken will be returned in the response body as json if successful. This auhorization token is in JWT format and the payload includes user info and permissions for the user and the specified x-appkey used when making request. The authorization should be included in header of future secure requests of the API.
- For renew; GET - required query paramter:
- refreshToken (recieved with original authorization token)
- headers must include:
- x-appkey
- authorization
- An authorization Bearer token will be returned in the response body as json if successful. This token is in JWT format and the payload includes user info and permissions for the x-appkey used when making request. The authorization should be included in future requests of the API, especially those of the D3\PICK data.
- For logoff; GET headers must include:
- x-appkey
- authorization
- For app; GET headers or query parameters must include:
- x-appkey in header
- or
- appkey in query parameters
- Will return some App details known by auth server in json format.
orders
https://d3-devel.murphyauto.net/api/v1/{cono}/orders/
{order# 9digits} or {client/######} or {tech/####} or {writer/####} or {vin/#$?#} {open/status/#####} {URL params}
Will return a json object containing an array of order objects.
- By default orders will return all open (not history) work orders.
- order#
- To request a single record. Must be in the 9 digit numeric format (cono:ordernumber)
- client/######
- To request work orders for clientID ######
- tech/####
- To request open (not history) work orders assigned to tech ####.
- writer/####
- To request open (not history) work orders assigned to service writer ####.
- vin/#$?#
- To request work orders for a specific vehicle with VIN number #...##. The VIN number shoukd be a 17 character alpha-numeric.
This response can include orders from any related company.
- open/status/ {scheduled | checkedin | inprogress | completed}
- To request work orders with a given current status.
scheduled will return orders "scheduled" on or before the current day.
checkedin will return orders with current status of "CheckedIn".
inprogress will return orders with the current status of assigned, inspecting, estimating, waiting for approval, waiting for parts or repairing.
completed will return orders with the current status of "Completed" within the last 14 days.
clients
https://d3-devel.murphyauto.net/api/v1/{cono}/clients/
{clientID} or {search/SearchString} {fuzzy} {URL params}
Will return a json object containing an array of client objects.
- By default clients will return all clients with work orders in the last 90 days sorted by most recent visit.
- clientID
- To request a single client record. Must be the 6 digit numeric client ID number without the company number prepended.
- search/SearchString
- To search for clients by name, house#, street name, phone#, VIN(minimum of 5 character) or license plate(maximum of 7 charaters).
- fuzzy
- If using the fuzzy parameter the search can be a partial match or inclusion. Without fuzzy an exact match is required to get results. Doing a search on a partial VIN, license, name, street name or phone# requires fuzzy to return results.
psavr (future)
https://d3-devel.murphyauto.net/api/v1/{cono}/psavr/
{reportID} or {conos/###,###,.../} {whse/#### or ALL/}{cat/catID/} {subcat/subcatID/} {ref/GLREF#} {hidden/}
{sdat/startDate/} {edat/endDate/} {datetype/{business or print}/} {{seaarch/searchString/} {fuzzy/} {URL params}
- Will return a json object containing an array of reports matching the search params.