{
    "openapi": "3.0.0",
    "info": {
        "title": "AUTOKAT Katalizatory Warszawa API Documentation",
        "description": "AUTOKAT Swagger API description",
        "contact": {
            "email": "mailbodnaruk@gmail.com"
        },
        "license": {
            "name": "Apache 2.0",
            "url": "http://www.apache.org/licenses/LICENSE-2.0.html"
        },
        "version": "1.0.0"
    },
    "servers": [
        {
            "url": "https://cennik.autokat-katalizatory.pl/api/",
            "description": "API Server"
        }
    ],
    "paths": {
        "/brands": {
            "get": {
                "tags": [
                    "Brands"
                ],
                "summary": "Get list of brands",
                "description": "Returns list of brands",
                "operationId": "getBrandsList",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/brands/{id}": {
            "get": {
                "tags": [
                    "Brands"
                ],
                "summary": "Get the brand",
                "description": "Returns the brand by id",
                "operationId": "getBrandsItem",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the brand",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/groups": {
            "get": {
                "tags": [
                    "Groups"
                ],
                "summary": "Get list of groups",
                "description": "Returns list of groups",
                "operationId": "getGroupsList",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "brand_id",
                        "in": "query",
                        "description": "ID of the brand",
                        "required": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductRequest"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/groups/{id}": {
            "get": {
                "tags": [
                    "Groups"
                ],
                "summary": "Get the group",
                "description": "Returns the group by id",
                "operationId": "getGroupsItem",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the group",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/GroupRequest"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/partners": {
            "get": {
                "tags": [
                    "Partners"
                ],
                "summary": "Get list of partners",
                "description": "Returns list of partners",
                "operationId": "getPartnersList",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "403": {
                        "description": "Forbidden"
                    }
                }
            }
        },
        "/partners/{id}": {
            "get": {
                "tags": [
                    "Partners"
                ],
                "summary": "Get the partner",
                "description": "Returns the partner by id",
                "operationId": "getPartnersItem",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the partner",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/partners-marza-update": {
            "post": {
                "tags": [
                    "Partners"
                ],
                "summary": "Update marza",
                "description": "Update marza for the partner",
                "operationId": "updatePartnersMarza",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "id",
                        "in": "query",
                        "description": "ID of the partner",
                        "required": true
                    },
                    {
                        "name": "marza",
                        "in": "query",
                        "description": "New marż",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/partners-add-view": {
            "post": {
                "tags": [
                    "Partners"
                ],
                "summary": "Add view from aplication",
                "description": "Add view from aplication",
                "operationId": "updatePartnersAddView",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "user_id",
                        "in": "query",
                        "description": "ID of the partner",
                        "required": true
                    },
                    {
                        "name": "brand_name",
                        "in": "query",
                        "description": "Name of Brand",
                        "required": true
                    },
                    {
                        "name": "series",
                        "in": "query",
                        "description": "Nr Seryjny of Product",
                        "required": true
                    },
                    {
                        "name": "created_at",
                        "in": "query",
                        "description": "Example: 2022-04-17 13:55:45",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/json-partners-add-view": {
            "post": {
                "tags": [
                    "Partners"
                ],
                "summary": "Add list of views from aplication",
                "description": "Add list of views from aplication",
                "operationId": "jsonPartnersAddView",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "views_json",
                        "in": "query",
                        "description": "Json with brand_name, series, user_id, created_at",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/products": {
            "get": {
                "tags": [
                    "Products (Katalizatory)"
                ],
                "summary": "Get list of products(katalizatory)",
                "description": "Returns list of products",
                "operationId": "getProductsList",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "group_id",
                        "in": "query",
                        "description": "ID of the group",
                        "required": false
                    },
                    {
                        "name": "brand_id",
                        "in": "query",
                        "description": "ID of the brand",
                        "required": false
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductRequest"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/products/{id}": {
            "get": {
                "tags": [
                    "Products (Katalizatory)"
                ],
                "summary": "Get the product(katalizator)",
                "description": "Returns the product by id",
                "operationId": "getProductItem",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    },
                    {
                        "name": "id",
                        "in": "path",
                        "description": "ID of the product",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation",
                        "content": {
                            "application/json": {
                                "schema": {
                                    "$ref": "#/components/schemas/ProductRequest"
                                }
                            }
                        }
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        },
        "/rates": {
            "get": {
                "tags": [
                    "Rates"
                ],
                "summary": "Get list of rates",
                "description": "Returns list of rates",
                "operationId": "getRatesList",
                "parameters": [
                    {
                        "name": "_api_key",
                        "in": "query",
                        "description": "Authorization key (issued by the administrator)",
                        "required": true
                    }
                ],
                "responses": {
                    "200": {
                        "description": "Successful operation"
                    },
                    "401": {
                        "description": "Unauthenticated"
                    },
                    "404": {
                        "description": "Not Found"
                    }
                }
            }
        }
    },
    "components": {
        "schemas": {
            "BrandsRequest": {
                "title": "Brand",
                "description": "Informacje o marka",
                "properties": {
                    "id": {
                        "title": "Unikalny identyfikator numeryczny",
                        "type": "integer",
                        "example": "4"
                    },
                    "active": {
                        "title": "Pokazać",
                        "type": "boolean",
                        "example": "true|false"
                    },
                    "sort_order": {
                        "title": "Sortuj indeks",
                        "type": "integer",
                        "example": "10"
                    },
                    "title": {
                        "title": "Nazwa handlowa",
                        "type": "string",
                        "example": "BMW"
                    },
                    "link": {
                        "title": "Link do strony",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/katalog/bmw"
                    },
                    "main_img": {
                        "title": "Link do zdjęcia",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/storage/brand/5.jpg"
                    },
                    "api_products_link": {
                        "title": "Filtrowanie linków w API według marki. Zwraca listę katalizatorów.",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/api/products?brand_id=1"
                    },
                    "api_groups_link": {
                        "title": "Filtrowanie linków w API według marki. Zwraca listę grup.",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/api/groups?brand_id=1"
                    },
                    "seo": {
                        "title": "Informacje dla stron",
                        "type": "string",
                        "example": "{\n           'id': 1,\n           'title': 'BMW',\n           'h1': 'BMW',\n           'keywords': null,\n           'description': null,\n           'added_meta': null,\n           'content': null,\n           'noindex': 0\n            }"
                    },
                    "created_at": {
                        "title": "Utworzony",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    },
                    "updated_at": {
                        "title": "Zaktualizowany",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    }
                },
                "type": "object"
            },
            "GroupRequest": {
                "title": "Group",
                "description": "Informacje o group",
                "properties": {
                    "id": {
                        "title": "Unikalny identyfikator numeryczny",
                        "type": "integer",
                        "example": "5"
                    },
                    "is_empty": {
                        "title": "True jeśli nie jest dołączony dzienny katalizator dla tej grupy",
                        "type": "boolean",
                        "example": "true|false"
                    },
                    "top": {
                        "title": "Priorytet",
                        "type": "boolean",
                        "example": "true|false"
                    },
                    "name": {
                        "title": "Nazwa grupy",
                        "type": "string",
                        "example": "BMW - 003"
                    },
                    "description": {
                        "title": "Dodatkowa Informacja",
                        "type": "string"
                    },
                    "main_img": {
                        "title": "Link do zdjęcia",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/storage/no_image_placeholder.jpg"
                    },
                    "images": {
                        "title": "Obiekt z linkami do dodatkowych zdjęć. Object type",
                        "type": "string",
                        "example": "{\n    'https://www.autokat-katalizatory.pl/storage/groups/8/1.jpg',\n    'https://www.autokat-katalizatory.pl/storage/groups/8/2.jpg',\n    'https://www.autokat-katalizatory.pl/storage/groups/8/3.jpg'\n    }"
                    },
                    "api_products_link": {
                        "title": "Filtrowanie linków w API.  Zwraca listę katalizatorów.",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/api/products?group_id=1"
                    },
                    "brand_id": {
                        "title": "Unikalny identyfikator Brand",
                        "type": "integer",
                        "example": "4"
                    },
                    "brand_title": {
                        "title": "Nazwa Brand",
                        "type": "string",
                        "example": "BMW"
                    },
                    "products": {
                        "title": "Object with series and id of products",
                        "type": "string",
                        "example": "{\n            '02/2237232004/R99/CE81915215388': 2,\n            '04/PROMOCJA/SIERPIEŃ': 4,\n            '01/2237307003/ICP UNILAB': 1,\n            '03/2237232004/R99': 3\n            }"
                    },
                    "created_at": {
                        "title": "Utworzony",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    },
                    "updated_at": {
                        "title": "Zaktualizowany",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    }
                },
                "type": "object"
            },
            "ParterRequest": {
                "title": "Partner",
                "description": "Informacje o marka",
                "properties": {
                    "id": {
                        "title": "Unikalny identyfikator numeryczny",
                        "type": "integer",
                        "example": "1"
                    },
                    "name": {
                        "title": "Imię",
                        "type": "string",
                        "example": "Petia"
                    },
                    "last_name": {
                        "title": "Nazwisko",
                        "type": "string",
                        "example": "Test"
                    },
                    "email": {
                        "title": "Email",
                        "type": "string",
                        "example": "mailbodnaruk@gmail.com"
                    },
                    "phone": {
                        "title": "Telefon",
                        "type": "string",
                        "example": "+48435949545"
                    },
                    "count_to_by": {
                        "title": "Miesięczna ilość na sprzedaż (szt)",
                        "type": "string",
                        "example": "6-10"
                    },
                    "country": {
                        "title": "Kraj",
                        "type": "string",
                        "example": "Polska"
                    },
                    "city": {
                        "title": "Miejscowość",
                        "type": "string",
                        "example": "Test"
                    },
                    "city_code": {
                        "title": "Kod pocztowy",
                        "type": "string",
                        "example": "3242"
                    },
                    "address": {
                        "title": "Ulica",
                        "type": "string",
                        "example": ""
                    },
                    "company_name": {
                        "title": "Nazwa firmy",
                        "type": "string",
                        "example": "CCO Katal"
                    },
                    "nip": {
                        "title": "NIP",
                        "type": "string",
                        "example": "3456"
                    },
                    "balance": {
                        "title": "Ilość sprawdzeń",
                        "type": "number",
                        "format": "float",
                        "example": "43.5"
                    },
                    "show_model": {
                        "title": "Pokaż model",
                        "type": "boolean",
                        "example": "true|false"
                    },
                    "marza_amount": {
                        "title": "Marża ogólna",
                        "type": "number",
                        "format": "float",
                        "example": "10.5"
                    },
                    "marza": {
                        "title": "Marża",
                        "type": "number",
                        "format": "float",
                        "example": "3.5"
                    },
                    "application_password": {
                        "title": "Hasło w aplikacji",
                        "type": "number",
                        "format": "float",
                        "example": "FKDJ@DSL12"
                    },
                    "created_at": {
                        "title": "Utworzony",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    },
                    "updated_at": {
                        "title": "Zaktualizowany",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    }
                },
                "type": "object"
            },
            "ProductRequest": {
                "title": "Product",
                "description": "Informacje o katalizatorze",
                "properties": {
                    "id": {
                        "title": "Unikalny identyfikator numeryczny",
                        "description": " ",
                        "type": "integer",
                        "example": "3"
                    },
                    "top": {
                        "title": "Priorytet",
                        "description": " ",
                        "type": "boolean",
                        "example": "true|false"
                    },
                    "series": {
                        "title": "Nr Seryjny",
                        "description": " ",
                        "type": "string",
                        "example": "GM18 90500649/702"
                    },
                    "model": {
                        "title": "Model",
                        "description": " ",
                        "type": "string",
                        "example": "ASTRA J 1.4T 140KM 2014R SPOD AUTA (2 z 2)"
                    },
                    "description": {
                        "title": "Dodatkowa Informacja",
                        "description": " ",
                        "type": "string",
                        "example": "1SZT"
                    },
                    "main_img": {
                        "title": "Link do zdjęcia",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/storage/groups/8/5.jpg"
                    },
                    "mass": {
                        "title": "Waga[kg]",
                        "type": "number",
                        "format": "float",
                        "example": "0.63"
                    },
                    "pt": {
                        "title": "Ilosć Pt [g]",
                        "type": "number",
                        "format": "float",
                        "example": "0.21"
                    },
                    "pd": {
                        "title": "Ilość Pd [g]",
                        "type": "number",
                        "format": "float",
                        "example": "0.43"
                    },
                    "rh": {
                        "title": "Ilość Rh [g]",
                        "type": "number",
                        "format": "float",
                        "example": "0.12"
                    },
                    "price_absolute": {
                        "title": "Cena bez marży",
                        "type": "number",
                        "format": "float",
                        "example": "1072.21"
                    },
                    "price_1": {
                        "title": "Cena 1-5. Object type",
                        "type": "string",
                        "example": " {\n            'PLN': 1272.413,\n            'EUR': 296.472,\n            'USD': 269.752\n            }"
                    },
                    "price_6": {
                        "title": "Cena 6-10. Object type",
                        "type": "number",
                        "format": "float",
                        "example": " {\n                'PLN': 1301.332,\n                'EUR': 303.21,\n                'USD': 275.882\n                }"
                    },
                    "price_10": {
                        "title": "Cena 10+. Object type",
                        "type": "number",
                        "format": "float",
                        "example": "{\n            'PLN': 1373.628,\n            'EUR': 320.055,\n            'USD': 291.209\n            }"
                    },
                    "brand_id": {
                        "title": "Unikalny identyfikator Brand",
                        "type": "integer",
                        "example": "4"
                    },
                    "brand_title": {
                        "title": "Nazwa Brand",
                        "type": "string",
                        "example": "BMW"
                    },
                    "api_brand_link": {
                        "title": "Link do informacji w API dla Brand",
                        "type": "string",
                        "example": "https://www.autokat-katalizatory.pl/api/brands/3"
                    },
                    "marza_id": {
                        "title": "Unikalny identyfikator Marza",
                        "type": "integer",
                        "example": "3"
                    },
                    "marza_name": {
                        "title": "Nazwa Marza",
                        "type": "string",
                        "example": "MINIMALNA"
                    },
                    "type_id": {
                        "title": "Unikalny identyfikator Type",
                        "type": "integer",
                        "example": "2"
                    },
                    "type_title": {
                        "title": "Wpisz imię",
                        "type": "string",
                        "example": "Ceramiczny + filtr"
                    },
                    "images": {
                        "title": "Obiekt z linkami do dodatkowych zdjęć. Object type",
                        "type": "string",
                        "example": "{\n                'https://www.autokat-katalizatory.pl/storage/products/8/1.jpg',\n                'https://www.autokat-katalizatory.pl/storage/products/8/2.jpg',\n                'https://www.autokat-katalizatory.pl/storage/products/8/3.jpg'\n            }"
                    },
                    "group_id": {
                        "title": "Unikalny identyfikator Groups",
                        "type": "integer",
                        "example": "3"
                    },
                    "group_name": {
                        "title": "Nazwa grupy",
                        "type": "string",
                        "example": "BMW-1"
                    },
                    "created_at": {
                        "title": "Utworzony",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    },
                    "updated_at": {
                        "title": "Zaktualizowany",
                        "type": "string",
                        "format": "date",
                        "example": "2022-03-16T12:06:16.000000Z"
                    }
                },
                "type": "object"
            }
        },
        "securitySchemes": {
            "passport": {
                "type": "oauth2",
                "description": "Laravel passport oauth2 security.",
                "in": "header",
                "scheme": "https",
                "flows": {
                    "password": {
                        "authorizationUrl": "https://www.autokat-katalizatory.pl//oauth/authorize",
                        "tokenUrl": "https://www.autokat-katalizatory.pl//oauth/token",
                        "refreshUrl": "https://www.autokat-katalizatory.pl//token/refresh",
                        "scopes": []
                    }
                }
            }
        }
    },
    "security": [
        []
    ]
}