Phoenix API Documentation
Phoenix API Documentation
About
The Phoenix API is a RESTful interface for allowing third-party applications to interrogate the
OATS database for equipment information and lubricant recommendations.
Encoding
Unless otherwise specified, all API requests should be encoded using UTF-8, and all responses
will be encoded using UTF-8.
Authentication
Depending on application requirements, access to the API might require authentication in the
form of a token query parameter. If authentication is required, this parameter must be present
on every request.
Formats
The API currently supports two response formats: XML and JSON.
The default and primary response format is XML. JSON format can be selected by either:
● appending “.json” to any request path, e.g. /browse.json, or
● including “Accept: application/json” header with the HTTP request
Compression
The API supports gzip compression of all responses when the request includes the HTTP
header "Accept-Encoding: gzip”. Use of compression is highly recommended for all requests.
Translations
The OATS equipment database is translated into many languages. Each API access will have
one primary language and zero or many additional languages. Requests can include a language
parameter to cause the response to be translated to the specified language.
Resources
The interface consists of four top-level resources:
● /browse
● /search
● /vrm_search
● /equipment
Browse Resource
The browse resource is a hierarchical tree that partitions the large set of equipment into many
smaller sets by groups of predefined properties of equipment.
Each branch node of the tree represents a property of equipment (e.g. manufacturer) and its
children are the distinct values for that property (e.g. ‘Audi’, ‘BMW’, etc.). The leaf nodes of the
tree are the sets of equipment that match the corresponding properties of its ancestor nodes.
All child node responses also include all of the items of their ancestor nodes. The items which
are the direct ancestors of a requested node are indicated with a ‘selected’ attribute. For
example, if the root node is a list of family groups (cars, motorcycles, vans), the response for a
request to the ‘cars’ node will also include the list of family groups, with the ‘cars’ item marked
as selected.
The tree construction is flexible; the set of properties used will depend on the desired user
journey. The intention is that the application can simply follow the tree, prompting the user at
each node and traversing down the tree with the user’s selections, until a small set of equipment
is presented for the user to choose from.
The most typical case is a tree constructed from the properties: Family Group, Family and
Manufacturer.
Example: /browse
<response created="2014-10-13T09:39:34.052Z">
<index type="familygroup" href="/browse">
<item href="/browse/motorcycles">Motorcycles</item>
<item href="/browse/cars">C ars</item>
<item href="/browse/vans">V ans</item>
<item href="/browse/commercial">Commercial</item>
<item href="/browse/agricultural">Agricultural</item>
<item href="/browse/off-highway">Off-Highway</item>
<item href="/browse/industrial">Industrial</item>
</index>
</response>
Example: /browse/cars
<response created="2014-10-13T09:39:34.052Z">
<index type="manufacturer" href="
/browse/cars">
Search Resource
The search resource enables applications to search equipment using text keywords.
<facet> optional (only for “Smart Search”) Any of the facets in the
response to a previous
search query
Example: /search?q=acura+1.7el
<response created="2014-10-17T09:50:44.950Z">
<equipment_list matches="
1" t
otal_matches="1" page="1" page_size="50"
truncated="false">
Example: /search?q=audi+a4+2.0
<response created="2016-04-11T10:27:45.794Z">
<facets>
<facet name="series" truncated="false">
<bucket value="A3" count="3"/>
<bucket value="A4" count="520"/>
<bucket value="A4L" count="2"/>
<bucket value="A8" count="1"/>
</facet>
<facet name="manufacturer" truncated="false">
<bucket value="AUDI" count="291"/>
<bucket value="AUDI (AUS)" count="1"/>
<bucket value="AUDI (CHI)" count="28"/>
<bucket value="AUDI (US)" count="223"/>
<bucket value="AUDI (ZAR)" count="52"/>
<bucket value="AUDI-FAW (CHI)" count="2"/>
</facet>
<facet name="year" truncated="false">
<bucket value="2016" count="206"/>
<bucket value="2015" count="206"/>
<bucket value="2014" count="287"/>
Each of the facets can be used to subsequently filter the search results by sending the original
request with the facet name and bucket value as an additional query parameter. Facet names
may be used multiple times in a query to filter search results across multiple bucket values.
When multiple bucket values are given for a facet name, the search results include equipment
that matches at least one of the values.
Example: /search?q=audi+a4+2.0&year=2016&year=2017&series=A4
<response created="2016-04-11T10:32:21.815Z">
<facets>
<facet name="manufacturer" truncated="false">
<bucket value="AUDI" count="146"/>
<bucket value="AUDI (CHI)" count="21"/>
</facet>
<facet name="fueltype" truncated="false">
<bucket value="Diesel" count="90"/>
<bucket value="Petrol" count="77"/>
</facet>
</facets>
<equipment_list matches="10" total_matches="167" page="1" page_size="10"
truncated="true">
<equipment .../>
</equipment_list>
</response>
Example: /search?q=porsh
<response created="2016-04-11T10:34:57.123Z">
<suggest_text>porsche</suggest_text>
<facets/>
<equipment_list matches="0" total_matches="0" page="1" page_size="10"
truncated="false"/>
</response>
Equipment Resource
The equipment resource provides applications with detailed equipment information, including
lubricant recommendations.
In general, applications should not construct URLs under the equipment resource. Other
resources such as browse, search and vrm_search should be queried to find equipment.
Equipment Fields
Equipment
@application_name - copy of
the corresponding
application/display_name
@display_name - presentable
interval name, including the
@display_unit and one of
“min” or “max”
Applications
Applications represent different parts of the equipment that a product can be applied to.
@channel_name - name
of the branding channel.
Normally the same for
every product and not
presented to the end
user. [Optional]
@tier_name - name of
the branding channel’s
tier. Should be displayed
with the product name
when there is more than
one product.
@nonbrandable - value of
“true” indicates that the
application cannot
reasonably have any
product applied to it. The
product/name field will
contain a message
explaining why (e.g.
‘Filled For Life’).
[Optional]
An example of the logical a front-end application might use to present the coptions:
● Group applications together by the name field.
● For each group with more than one application, present a choice all of the
display_coption fields for the user.
● When the user chooses a particular display_coption, show the details for the
corresponding application.
Name Description
coption/conjunction/bind/value The value of the variable for that this particular conjunction
applies to.
Example
<application>
<name>Engine</name>
<display_coption>Long Drain</display_coption>
<coption>
<conjunction>
<bind>
<var>qg</var>
<value>QG1</value>
</bind>
</conjunction>
</coption>
...
</application>
<application>
<name>Engine</name>
<display_coption>Short Drain</display_coption>
<coption>
<conjunction>
<bind>
<var>qg</var>
<value>QG0/2</value>
</bind>
</conjunction>
The application index contains one child app_ref for each set of related applications, e.g. one
app_ref for all “Engine” applications, a second app_ref for all “Differential” applications.
Each app_ref contains a tree, the branch nodes of which are choices, and the leaf nodes are
each a reference to a specific application.
The tree may be of any depth, but in the vast majority of cases the root node will be an
application reference (i.e. no choices), then the majority of the remainder will be depth of 2 (i.e.
one choice).
Name Description
The decision tree consists of nodes, each if which has a type of either “choice” (indicating a
branch) or “application” (indicating a leaf).
Name Description
Name Description
Example
<application_index>
<app_ref>
<name>Engine</name>
<fueltype>PT</fueltype>
<option>CREC</option>
<display_name>Engine (PT) (CREC)</display_name>
<application_ids>1</application_ids>
<application_ids>2</application_ids>
<decision_tree>
<type>choice</type>
<choice>
<var>qg</var>
<display_name>Service regime</display_name>
<option>
<value>QG0/2</value>
<display_value>Short Drain</display_value>
v0.91 2019-05-14 OATS
<type>application</type>
<application_id>1</application_id>
</option>
<option>
<value>QG1</value>
<display_value>Long Drain</display_value>
<type>application</type>
<application_id>2</application_id>
</option>
</choice>
</decision_tree>
</app_ref>
</application_index>
Document History
2014-10-17
● Add paragraph explaining the browse resource responses including items from ancestor
nodes, plus example.
● Add information on search resource response pagination.
● Add equipment/application/product/external_id information.
2014-12-16
● Update descriptions of equipment/familygroup and equipment/series fields to include
cardinality.
● Add equipment/displacement information.
2016-04-11
● Add descriptions of “Smart Search” features, Facets and Suggestions, to search
resource.
2017-10-11
● Add subsection to “Equipment Fields” describing the new coption and display_option
application fields.
2018-04-04
● Add subsection to “Equipment Fields” describing the new application index section for
Chatham data sources.
2018-09-12
● Corrections to field descriptions. In particular, fix the cardinality of application product
field.
2018-10-17
v0.91 2019-05-14 OATS
● Add explanation on filtering multiple bucket values in smart search.
2019-05-14
● Add “app_type” and “app_type_original” definitions to equipment application description.