ALS Logo

Webtrieve Mobile API v3

API Compatibility

Version 8 clients (Mobile v2) should continue to call the v2 API.
Version 9 clients (Mobile v3) should call this API.

Webtrieve Mobile v3 will return a version associated with a authenticated user, as either version 8 (Webtrieve8) or version 9 (Webtrieve9)

Webtrieve Version API Base URL
8.0 v2 http://mobile.alstribology.com/v2
9.0 v3 http://mobile.alstribology.com/v3

Requests

The Web API is based on REST principles, data resources are accessed via standard HTTP requests in UTF-8 format.
Verb
Description
GET
Used for retrieving resources.
POST
Used for creating resources.
PUT
Used for changing/replacing resources or collections.
DELETE
Used for deleting resources.

For POST requests, the request body must be JSON with the Content-Type header set to application/json.

Please note that API requires that all requests be authenticated. See Authentication for details.
The API Documentation provides a description of all the valid REST requests.

Responses

All valid responses return a HTTP Response Status Code of 200 in the Response Header. i.e.
/Component/Find?uinNumber=222
Returns:
HTTP/1.1 200 OK
    {
    "Id": 55892,
    "UnitId": "49780",
    "Name": "Diesel Engine",
    "CompartmentMakeName": "Perkins",
    "CompartmentTypeName": "Diesel Engine",
    "LocationName": "Perkins",
    "UnitName": "17R3755",
    "UINNo": "0347B16 ",
    "CompartmentFluidName": "Rimula R3 MV",
    "SerialNo": "DDU317085W"
    }
    
A 2xx status code indicates success, whereas a 4xx status code indicates failure. When a request fails, the response body is still JSON but always contains the fields code and error which you can inspect to use for debugging.

See API Documentation for a detailed list of response objects.

Error handling

Error status codes are returned using standard are HTTP Response Status Code, contained in the response which was not successful will be additional information contained in the body (JSON-formatted):
    "Success": false,
    "Message": "Component with UINNo 0285EFXX not found",
    "ErrorCode": 306
    

Error Codes

Error CodesDescription
306 No Results Found
NoResultsFound = 306, InvalidTrackingNumber = 307, InvalidRequest = 308, SubmissionFailed = 309, AuthenticationFailed = 310, NotImplemented = 311, OperationFailed = 312,

Http Status Response Codes

Status Code
Description
200
OK - The request has succeeded. The client can read the result of the request in the body and the headers of the response.
201
Created - The request has been fulfilled and resulted in a new resource being created.
204
No Content - The request has succeeded but returns no message body.
400Bad Request - The request could not be understood by the server due to malformed syntax. The message body will contain more information; see Error Details, below.
401
Unauthorized - The request requires user authentication or, if the request included authorization credentials, authorization has been refused for those credentials.
403
Forbidden - The server understood the request, but is refusing to fulfill it.
404
Not Found - The requested resource could not be found. This error can be due to a temporary or permanent condition.
429Too Many Requests - Rate limiting has been applied.
500Internal Server Error. You should never receive this error because our clever coders catch them all ... but if you are unlucky enough to get one, please report it to us through a comment at the bottom of this page.
503
Service Unavailable - The server is currently unable to handle the request due to a temporary condition which will be alleviated after some delay. You can choose to resend the request again.

Authentication

All requests which use this service must provide authentication details for each HTTP request.
See Basic Authentication for more information.

LogonResponse

    {
    "ClientVersion": 0,
    "TermsUrl": null,
    "TermsHash": null,
    "TermsAcceptanceRequired": false,
    "BaseUrl": null,
    "Session": null,
    "AlertSeverity": null,
    "DaysToRetrieve": 0,
    "Success": false,
    "Message": "The username or password are incorrect",
    "ErrorCode": "AuthenticationFailed"
    }
    
Quick Links: API Documentation