greenparts api version 0.9.6.2

Важное замечание

Если пользователь не авторизован в приложении, то для отображения справочников городов, марок, моделей и т.д. небходимо запросить авторизационный токен по идентификатору устройства.

Города

Название Метод Путь Параметры
Получение списка городов GET /towns country, [page][limit]
Получение список городов c объявлениями GET /towns/presence section
Получение города GET /towns/{id}
Поиск города по имени GET /towns/search name

Регионы

Название Метод Путь Параметры
Получение списка регионов GET /regions country, [page][limit]
Получение списка стран GET /countries [page][limit]
Получение региона GET /region/{id}
Поиск региона по имени GET /regions/search name

Страны

Название Метод Путь Параметры
Получение списка стран GET /countries [page][limit]

Контакты

Название Метод Путь Параметры
Добавление контакта POST /contacts name, text, address, email, phone, web, skype
Получение списка своих контактов GET /contacts [page][limit]
Получение контакта GET /contacts/{id}
Редактирование контакта POST /contacts/{id} name, text, address, email, phone, web, skype

Запчасти

Название Метод Путь Параметры
Добавление объявления POST /{section}parts contactId, townId, price, currency = {RUB}, type, mark, model frame, engine, optics, condition = {OLD, NEW, CONTRACT}, original = {ORIGINAL, NOT_ORIGINAL}, defect = {GOOD, SCRATCHED, DAMAGED, BAD}, rightLeft = {RIGHT, LEFT}, rearFront = {REAR, FRONT}, upDown = {UP, DOWN}, remark, oem, producer, producerCode, color, photo, in_stock={NORMAL, ORDER}
Загрузка фотографии POST /{section}parts/upload file
Получение списка объявлений GET /{section}parts [page][limit][width]
Получение объявления GET /{section}parts/{id} [width]
Редактирование объявления POST /{section}parts/{id} contactId, townId, price, currency = {RUB}, type, mark, model frame, engine, optics, condition = {OLD, NEW, CONTRACT}, original = {ORIGINAL, NOT_ORIGINAL}, defect = {GOOD, SCRATCHED, DAMAGED, BAD}, rightLeft = {RIGHT, LEFT}, rearFront = {REAR, FRONT}, upDown = {UP, DOWN}, remark, oem, producer, producerCode, color, photo, in_stock={NORMAL, ORDER}
Перемещение объявления в архив DELETE /{section}parts/{id}
Список провереных компаний GET /{section}parts/firms
Поиск объявлений GET /{section}parts/search type, tech, town, firm, condition, region, regionId, townId, page, limit, width, height, price_sort={asc, desc}, date_sort={asc, desc}, price_from, price_to, with_price, with_photo, with_gpay Результат- state={STATE_NOT_STARTED, STATE_SUCCESS, STATE_SUCCESS_NO_RESULTS, STATE_FAIL}
Поиск своих объявлений GET /{section}parts/my type, tech, town, [page][limit][width]
Справочник GET /carparts/handbook type={type | mark | model | frame | engine}, [mark], [model]

Поиск автозапчастей по ОЕМ

Название Метод Путь Параметры
Поиск объявлений GET /carparts/search/oem page, producer, code, town, region, firm
Подсказка по producer code GET /carparts/suggest/oem/producer code
Получить ссылку на объявление GET /carparts/oem/{id} producer, code

Шины и диски

Название Метод Путь Параметры
Добавление объявления POST /tires/{section} contactId, townId, type = {TIRE, WHEEL, TIREWHEEL}, condition = {OLD, NEW}, complect, price, price_for = {ONEPART, COMPLECT}, currency = {RUB}, tire.mark, tire.model, tire.width, tire.height, tire.diameter, tire.year, tire.weather = {ALL, SUMMER, WINTER, DIRT}, wheel.mark, wheel.model, wheel.width, wheel.off, wheel.diameter, wheel.holes, wheel.pcd, remark, photo, in_stock={NORMAL,ORDER}
Загрузка фотографии POST /tires/{section}/upload file
Получение списка объявлений GET /tires/{section} [page][limit][width]
Получение объявления GET /tires/{section}/{id} [width]
Редактирование объявления POST /tires/{section}/{id} contactId, townId, type = {TIRE, WHEEL, TIREWHEEL}, condition = {OLD, NEW}, complect, price, price_for = {ONEPART, COMPLECT}, currency = {RUB}, tire.mark, tire.model, tire.width, tire.height, tire.diameter, tire.year, tire.weather = {ALL, SUMMER, WINTER, DIRT}, wheel.mark, wheel.model, wheel.width, wheel.off, wheel.diameter, wheel.holes, wheel.pcd, remark, photo, in_stock={NORMAL,ORDER}
Перемещение объявления в архив DELETE /tires/{section}/{id}
Список провереных компаний GET /tires/{section}/firms
Поиск объявлений GET /tires/{section}/search firm, town, type = {TIRE, WHEEL, TIREWHEEL}, condition = {OLD, NEW}, tire.width, tire.height, tire.diameter, tire.weather, wheel.width, wheel.off, wheel.diameter, wheel.pcd, with_gpay, price_from, price_to, with_price, with_photo, price_sort={asc,desc}, date_sort={asc,desc} [page][limit][width]
Поиск своих объявлений GET /tires/{section}/my town, type = {TIRE, WHEEL, TIREWHEEL}, condition = {OLD, NEW}, tire.width, tire.height, tire.diameter, tire.weather, wheel.width, wheel.off, wheel.diameter, wheel.pcd, [page][limit][width]
Справочник GET /tires/{section}/handbook/{type}/{property} type = {tire | wheel}, property = {widths, heights, diameters, pcd}

Мото шины

Название Метод Путь Параметры
Поиск объявлений GET /tires/moto/search tech, condition, town, region, regionId, townId, firm, price_sort, date_sort, price_from, price_to, with_price, with_photo, page, limit, width, height
Получение объявления GET /motoparts/{id} [width]

Сколько стоит?

Название Метод Путь Параметры
Проценка запчасти POST /services/howmuch/{section} type, mark, model, frame, engine, condition ={OLD, NEW, CONTRACT}, original = {ORIGINAL, NOT_ORIGINAL}, town, townId, region, regionId, rear_front={rear, front}, up_down={up, down}, right_left={right, left}, client
Получение списка проценок GET /services/howmuch/{section} [page][limit]
Получение списка своих проценок GET /services/howmuch/{section}/latest [page][limit]
Получение списка своих проценок по всем разделам сайта GET /services/howmuch/history [page][limit]
Получение проценки GET /services/howmuch/{section}/{hash} [page][limit][width][order={asc,desc}]

Избранное

Название Метод Путь Параметры
Получение списка избранного GET /favorites token, page
Добавление в избранное POST /favorites/add token, в теле запроса: [{"item_id":"", "user_id":"", "section":"", "notes":""}, ... {}] section = {carparts, motoparts, powerparts, waterparts, tires}
Редактирование заметки об избранном POST /favorites/edit token, в теле запроса: [{"item_id":"", "user_id":"", "section":"", "notes":""}, ... {}] section = {carparts, motoparts, powerparts, waterparts, tires}
Удаление из избранного DELETE /favorites/del token, в теле запроса: [{"item_id":"", "user_id":"", "section":""}, ... {}] section = {carparts, motoparts, powerparts, waterparts, tires}

Справочник

Название Значения Описание
section car, moto, power, water Раздел запчастей
status NORMAL, RAISED, DELETED, BANNED, ORDER Статус объявления (обычное, поднятое, архивное, забаненное, под заказ)

Ограничения

Название Описание
Кол-во контактов Можно создать до 20 контактов
Кол-во элементов Максимальное кол-во элементов на странице 20, исключение список городов 1000 элементов
Кол-во страниц Максимальное кол-во страниц 100, исключение список своих запчастей
Ширина миниатюр Доступные размеры 1280, 1024, 960, 800, 720, 640, 480, 360, 240, 160, 120, 80