Website

Read all categories

Last update: 11.12.2023

Category is a crucial term to understand how Adverts are classified. Conceptually, each advert is assigned to single category which holds set of bound parameters. All categories form together a tree starting from general root node (eg. car) going down narrowing and describing levels to be more specific.

Returns all root categories defined in category tree.

GET: https://www.autovit.ro/api/open/categories

Permission: read

Header

Field Type Description
User-Agent string Account email.

Parameter

Field Type Description
all Boolean Optional (all=1) returns all categories (also children ones) in sigle request

Example request:
		HTTP/1.1 GET /categories

User-Agent: $USER_EMAIL
Content-Type: application/json
Authorization: Bearer $ACCESS_TOKEN			
		
Copied to clipboard
Success response:
		HTTP/1.1 200 OK
 {
     "results":
     [
         {
             "id": 29,
             "names":
             {
                 "pl": "Cars",
                 "en": "Cars"
             },
             "code": "cars",
             "path_url": "cars",
             "depth": 1,
             "parameters":
             [
                 {
                     "code": "has_vin",
                     "type": "checkbox",
                     "labels":
                     {
                         "pl": "Ma VIN",
                         "en": "Has VIN"
                     },
                     "required": false,
                     "purpose": "search",
                     "options": null
                 },
                 {
                     "code": "make",
                     "type": "select",
                     "labels":
                     {
                         "pl": "Marka",
                         "en": "Make"
                     },
                     "required": true,
                     "purpose": "both",
                     "options":
                     {
                         "acura":
                         {
                             "pl": "Acura",
                             "en": "Acura"
                         },
                         "aixam":
                         {
                             "pl": "Aixam",
                             "en": "Aixam"
                         },
                         "alfa-romeo":
                         {
                             "pl": "Alfa Romeo",
                             "en": "Alfa Romeo"
                         },
...
                     }
                 }
             ]
         }
     ]
 }			
		
Copied to clipboard