
In the course of working on a platform for creating online stores for auto parts
abcp.ru we are faced with the need to develop an API.
Initially, work with sellers of spare parts was carried out directly, and we ourselves created standardized online stores with them on our engine. However, over time, more and more customers began to demand an individual approach to the development of the site.
')
Our resources for the simultaneous management of several such projects might not be enough. Therefore, we have created an API for external developers that customers could bring to work on their sites. Today we will tell you more about what we finally got.
What is required of API in the auto parts search industry
In the field of sales of auto parts there are several classes of tasks, the quality of the solution of which depends on the success of an online store.
Knowledge base for auto parts analogues (crosses)
Often the original part is not available or it is too expensive. In this case, car owners can purchase a non-original substitute and seriously save (sometimes without even losing in quality). Bundles of original parts and their substitutes are called crosses, and the most important task of an online store is to have an actual base of such replacement options.
The lack of such information is a serious disadvantage of the store, which leads to a decrease in sales.

In order to make life easier for developers of online auto parts stores, we
have created an API to access our constantly updated database of cross-countries. Information is accessed through the REST API, which allows using data not only on websites, but also in mobile applications.
Below is an example of JSON-issuing substitutes for the VOLKSWAGEN brake disc model 6R0615301:
{ "brand": "VAG", "number": "6R0615301", "crosses": [ { "brand": "Brembo", "number": "09.7011.11", "numberFix": "09701111" }, { "brand": "Febi", "number": "14404", "numberFix": "14404" }, { "brand": "Jurid", "number": "562040J", "numberFix": "562040J" }, ......................... { "brand": "Zimmermann", "number": "100 1233 20", "numberFix": "100123320" } ] }
Search
The second most important task for the developer of an online auto parts store is to create a high-quality search for the product article, taking into account possible analogues, features of part numbers of different brands, and so on.
In the auto parts sales segment, there are a number of nuances that complicate the creation of online stores for developers who are not immersed in this area. Numbering features, EAN-13 barcodes, alternative and short part numbers - in order to understand all this you need to spend a lot of time.
Also, the creation of a search engine for an online auto parts store implies the solution of difficult tasks to update price lists. At the same time, a search that works well with prices of 5,000 positions may not necessarily be able to process a document that includes 600,000 positions.
Using our API, developers can quickly implement high-quality search, avoiding common mistakes (over 10 years of work, we stepped on a lot of rakes and came up with ways to circumvent them).
The ABCP API interface allows you to perform search operations of varying degrees of complexity.
For example, this is how a search query looks like to search for a part by number:
api.demo.abcp.ru/search/articles/?userlogin=username&userpsw=md5pass&number=01089&brand=Febi
The answer to such a request may look something like this:
[ { "brand": "Hepu", "articleCode": "P999", "articleCodeFix": "P999", "articleId": "2854918", "description": " [] 1,5.", "availability": "-1", "deliveryPeriod": 3, "price": 231, "weight": "0" }, { "brand": "Febi", "articleCode": "01089", "articleCodeFix": "01089", "articleId": "37367", "description": " 1.5 ", "availability": "1943", "deliveryPeriod": 3, "price": 233, "weight": "1.76" }, { "brand": "Vaico Vemo", "articleCode": "V600020", "articleCodeFix": "V600020", "articleId": "4144961", "description": " g-11 1.5. ", "availability": "-2", "deliveryPeriod": 3, "price": 235, "weight": "0" } ]
Information on the brand, product code, its description, data on stock availability, delivery time (in hours), cost and weight are transmitted in the response fields. In the example above, the request returned not only the description of the original product, but also its possible replacement.
A more detailed description of the API, including search capabilities, is presented on a special
wiki page .
Adding a TecDoc catalog to your site
Historically, the catalog for the selection of auto parts TecDoc is a very popular tool for finding the right parts. We believe that this tool is rather overvalued, but its demand cannot be disregarded. That is why we created a convenient way to install the TecDoc directory on external sites.
Information in the catalog is presented in the form of a tree - the user clicks on the brand of the car, selects a particular model, then the desired unit and thus finds the part.

Usually, TecDoc in RuNet is used counterfeitly, for which developers have not only to acquire a database (it takes several DVDs), but also to write a large number of “crutches” to convert information from DVD to MySQL (or pay craftsmen-converters $ 50- $ 200 for base). Placing this huge amount of data incurs additional costs.
In addition, every quarter there is an update of TecDoc, changing the structure of the tables and data formats, which further complicates the support of unlicensed versions of the service in the current state. Otherwise, as a hell for a developer, this situation is difficult to call.
To make life easier for developers, we created
tecdoc.abcp.ru website - you can take the source codes to install the licensed version of the TecDoc catalog on external sites (the database is constantly updated). For non-standard use of the catalog data
, API functions are available to developers, the set of which we gradually increase.
We are
not the only official resellers of the TecDoc catalog in the CIS market, but the only ones who managed to reduce the cost of using the official version to only 2,000 rubles per month.
We will tell you more about working with the TecDoc catalog in one of the following topics.
How else to improve the site to find auto parts
In addition to the API itself, there are other methods that allow website developers to search for and purchase auto parts to provide customers with a higher level service. One such tool is a variety of useful widgets.
Search for auto parts by VIN-code
As we have already told in our
past topic - the search for the necessary auto parts on the Internet is extremely difficult. Understanding the manufacturers' catalogs (which are often not good examples of information content) even with a VIN-part code is not a trivial task.
On the website of the auto parts search engine
4mycar.ru, we created a special button and autoexperts “hiding” behind it will select the necessary spare part by the VIN-code.

This scheme works with the help of a special service for the remote selection of auto parts
Vinqu.com . Owners of automotive websites can install a special widget on their resources, and auto experts can participate in finding details for visitors. As a result, stores and experts earn money, and users find the parts they need.
In addition, we have created a widget for
recording in auto repair online - the owners of such companies can place its code on the site. Motorists will not only be able to make an appointment, but also receive SMS reminders about the maintenance date.
That's all for today, thank you for your attention! In the following topics we will talk about the infrastructure of our search engine for auto parts 4mycar.ru, the creation of the “Exchange of VIN-requests” service and how our technical support service has coped with 60 thousand tickets for 5 years of work.