{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition"]},"type":"markdown"},"seo":{"title":"Authorization","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"authorization","__idx":0},"children":["Authorization"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"uzyskanie-dostępu","__idx":1},"children":["Uzyskanie dostępu"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dostęp do VirtualCar360 API wymaga aktywnego klucza API."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Klucz API jest generowany indywidualnie dla klienta i może obsługiwać pojedyncze konto lub wiele kont w ramach grupy dealerskiej."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aby uzyskać dostęp:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Skontaktuj się z działem wsparcia VirtualCar360."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Przekaż informacje o planowanej integracji."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Otrzymaj dane dostępowe."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Przeprowadź testy integracyjne."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bezpieczeństwo","__idx":2},"children":["Bezpieczeństwo"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Nigdy nie publikuj klucza API po stronie przeglądarki."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Przechowuj klucze w bezpiecznych magazynach sekretów."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Regularnie rotuj klucze w przypadku incydentów bezpieczeństwa."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"api-authorization","__idx":3},"children":["API Authorization"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API VirtualCar360 wykorzystuje autoryzację za pomocą klucza API przekazywanego w parametrze ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]},". Klucz API identyfikuje konto, lokalizację albo grupę kont, do których dana integracja ma dostęp."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Wszystkie endpointy API wymagają przekazania poprawnego klucza API. Bez poprawnego klucza API nie należy zakładać, że integracja będzie mogła pobrać dane galerii, zdjęcia, hotspoty albo linki do materiałów video."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"warning","name":"Uwaga"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["W obecnej wersji API klucz przekazywany jest jako parametr query string ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]},", a nie jako nagłówek ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]},"."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"base-url","__idx":4},"children":["Base URL"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Wszystkie endpointy API są dostępne pod adresem bazowym:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"txt","header":{"controls":{"copy":{}}},"source":"https://img-out.virtualcar360.pl/api/v6.0/virtual-360\n","lang":"txt"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Przykład pełnego zapytania:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"txt","header":{"controls":{"copy":{}}},"source":"https://img-out.virtualcar360.pl/api/v6.0/virtual-360/vin/WBA1234567890?key=TWOJ_KLUCZ_API\n","lang":"txt"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"parametr-key","__idx":5},"children":["Parametr ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Parametr ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]}," jest wymagany w każdym zapytaniu do API."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parametr"},"children":["Parametr"]},{"$$mdtype":"Tag","name":"th","attributes":{"align":"right","data-label":"Wymagany"},"children":["Wymagany"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Opis"},"children":["Opis"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]}]},{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":["tak"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Klucz API przypisany do konta, lokalizacji albo grupy kont w systemie VirtualCar360."]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Przykład:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"txt","header":{"controls":{"copy":{}}},"source":"?key=TWOJ_KLUCZ_API\n","lang":"txt"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"rodzaje-kluczy-api","__idx":6},"children":["Rodzaje kluczy API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["VirtualCar360 może wykorzystywać różne typy kluczy API w zależności od modelu integracji."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"klucz-dla-jednej-lokalizacji","__idx":7},"children":["Klucz dla jednej lokalizacji"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Standardowy przypadek integracji to klucz API przypisany do jednej lokalizacji, jednego salonu albo jednego konta dealerskiego."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Taki klucz pozwala pobierać dane pojazdów należących do konkretnego konta VirtualCar360."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Przykładowe zastosowania:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["pojedynczy salon dealerski,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["jedna marka,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["jedna lokalizacja,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["jedna strona internetowa prezentująca pojazdy z jednego źródła."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Przykład zapytania:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"txt","header":{"controls":{"copy":{}}},"source":"https://img-out.virtualcar360.pl/api/v6.0/virtual-360/vin/WBA1234567890?key=TWOJ_KLUCZ_API\n","lang":"txt"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"klucz-grupowy-dla-wielu-lokalizacji","__idx":8},"children":["Klucz grupowy dla wielu lokalizacji"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["W przypadku większych organizacji możliwe jest przygotowanie klucza grupowego. Klucz grupowy agreguje dane z wielu kont albo lokalizacji VirtualCar360."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Taki model jest przydatny, gdy jedna integracja ma obsługiwać wiele salonów lub wiele marek."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Przykładowe zastosowania:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["dealer wielomarkowy,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["grupa dealerska,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["portal prezentujący pojazdy z wielu lokalizacji,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["centralny system CRM albo DMS,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["jedna strona internetowa z ofertami wielu oddziałów."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dzięki kluczowi grupowemu jedna integracja może pobierać dane z wielu kont bez konieczności wykonywania osobnej konfiguracji dla każdej lokalizacji."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Wskazówka"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Jeżeli integracja ma obsługiwać wiele lokalizacji, skontaktuj się z supportem VirtualCar360 w celu przygotowania klucza grupowego."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"jak-uzyskać-klucz-api","__idx":9},"children":["Jak uzyskać klucz API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Klucz API jest generowany podczas zakładania lub konfiguracji konta w systemie VirtualCar360."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Aby uzyskać klucz API, należy skontaktować się z supportem VirtualCar360 i przekazać informacje dotyczące planowanej integracji."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["W zgłoszeniu warto podać:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["nazwę klienta lub dealera,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["lokalizację albo listę lokalizacji,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["informację, czy potrzebny jest klucz dla jednej lokalizacji czy klucz grupowy,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["planowane zastosowanie API,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["środowisko, w którym API będzie wykorzystywane,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["adresy systemów lub aplikacji, które będą korzystać z API,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["dane kontaktowe osoby odpowiedzialnej za integrację."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Po wygenerowaniu klucza support przekazuje dane dostępowe integratorowi albo osobie technicznej po stronie klienta."]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"przykłady-użycia-klucza-api","__idx":10},"children":["Przykłady użycia klucza API"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pobranie-najnowszej-galerii-po-numerze-vin","__idx":11},"children":["Pobranie najnowszej galerii po numerze VIN"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/vin/WBA1234567890?key=TWOJ_KLUCZ_API\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pobranie-najnowszej-galerii-po-numerze-rejestracyjnym","__idx":12},"children":["Pobranie najnowszej galerii po numerze rejestracyjnym"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/numberplates/WW4433E?key=TWOJ_KLUCZ_API\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pobranie-listy-galerii-po-numerze-vin","__idx":13},"children":["Pobranie listy galerii po numerze VIN"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/list/vin/WBA1234567890?key=TWOJ_KLUCZ_API&Sorting=-1&Page=1&PageSize=20\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pobranie-listy-galerii-po-numerze-rejestracyjnym","__idx":14},"children":["Pobranie listy galerii po numerze rejestracyjnym"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/list/numberplates/WW4433E?key=TWOJ_KLUCZ_API&Sorting=-1&Page=1&PageSize=20\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"pobranie-zestawu-zdjęć-galerii","__idx":15},"children":["Pobranie zestawu zdjęć galerii"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/image-set?carId=10209937&key=TWOJ_KLUCZ_API\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"typowy-proces-integracji-z-api","__idx":16},"children":["Typowy proces integracji z API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Najczęstszy proces integracji wygląda następująco:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Uzyskaj klucz API od supportu VirtualCar360."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Wyszukaj galerię pojazdu po numerze VIN albo numerze rejestracyjnym."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Odczytaj ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," galerii z odpowiedzi API."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Przekaż ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," jako ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["carId"]}," do endpointu ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/image-set"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Pobierz zestawy zdjęć, hotspoty oraz linki do materiałów video."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Wyświetl dane we własnej aplikacji albo zapisz je w systemie klienta."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Przykład procesu:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"txt","header":{"controls":{"copy":{}}},"source":"GET /vin/{vin}?key=TWOJ_KLUCZ_API\n","lang":"txt"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Odpowiedź zawiera ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," galerii:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": 10209937,\n  \"vin\": \"WBA1234567890\",\n  \"numberPlates\": \"WW4433E\",\n  \"createdAt\": \"2026-04-21T10:42:30.3038179\",\n  \"type\": \"3000_2250_8_JPG_SKODAPLUS\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Następnie użyj ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["id"]}," jako ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["carId"]},":"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"txt","header":{"controls":{"copy":{}}},"source":"GET /image-set?carId=10209937&key=TWOJ_KLUCZ_API\n","lang":"txt"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api-a-player","__idx":17},"children":["API a Player"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API i Player korzystają z danych VirtualCar360, ale są przeznaczone do innych scenariuszy."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Obszar"},"children":["Obszar"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API"},"children":["API"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Player"},"children":["Player"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Cel"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Pobieranie danych do własnego systemu"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gotowy widok do osadzenia na stronie"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Integracja"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Backend lub system klienta"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["iframe"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Dane"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Zdjęcia, galerie, hotspoty, video"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Gotowa prezentacja pojazdu"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Implementacja UI"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Po stronie klienta"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Po stronie VirtualCar360"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Klucz"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Przekazywany w zapytaniach API"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Przekazywany w adresie Playera"]}]}]}]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"bezpieczeństwo-klucza-api","__idx":18},"children":["Bezpieczeństwo klucza API"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Klucz API daje dostęp do danych przypisanych do konta lub lokalizacji. Należy traktować go jak dane poufne."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Zalecenia:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["nie zapisuj klucza API w publicznym repozytorium,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["nie umieszczaj klucza API bezpośrednio w kodzie frontendowym aplikacji,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["przechowuj klucz w zmiennych środowiskowych,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["wykonuj zapytania do API przez backend albo proxy serwerowe,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["nie loguj pełnych adresów URL zawierających ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]},","]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["nie przekazuj klucza osobom spoza zespołu integracyjnego,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["w przypadku podejrzenia wycieku skontaktuj się z supportem VirtualCar360,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["dla wielu lokalizacji używaj klucza grupowego zamiast wielu niezależnych kluczy w aplikacji frontendowej."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"zalecany-model-backend-proxy","__idx":19},"children":["Zalecany model backend proxy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Najbezpieczniejszy model integracji polega na tym, że aplikacja frontendowa nie komunikuje się bezpośrednio z API VirtualCar360."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Zalecany przepływ:"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Frontend wysyła żądanie do backendu klienta."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Backend klienta dodaje parametr ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Backend wykonuje zapytanie do API VirtualCar360."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Backend zwraca do frontendu tylko dane potrzebne do wyświetlenia oferty."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Przykład:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"txt","header":{"controls":{"copy":{}}},"source":"Frontend klienta\n  -> GET /api/vehicles/{vin}/gallery\n\nBackend klienta\n  -> GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/vin/{vin}?key=TWOJ_KLUCZ_API\n\nBackend klienta\n  -> odpowiedź do frontendu bez ujawniania klucza API\n","lang":"txt"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"przykład-backend-proxy-w-nodejs","__idx":20},"children":["Przykład backend proxy w Node.js"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"js","header":{"controls":{"copy":{}}},"source":"import express from 'express';\n\nconst app = express();\n\nconst VIRTUALCAR_API_KEY = process.env.VIRTUALCAR_API_KEY;\nconst VIRTUALCAR_BASE_URL = 'https://img-out.virtualcar360.pl/api/v6.0/virtual-360';\n\napp.get('/api/vehicles/:vin/gallery', async (req, res) => {\n  try {\n    const { vin } = req.params;\n\n    const url = new URL(`${VIRTUALCAR_BASE_URL}/vin/${encodeURIComponent(vin)}`);\n    url.searchParams.set('key', VIRTUALCAR_API_KEY);\n\n    const response = await fetch(url);\n\n    if (!response.ok) {\n      return res.status(response.status).json({\n        error: 'VirtualCar360 request failed',\n      });\n    }\n\n    const data = await response.json();\n\n    return res.json(data);\n  } catch (error) {\n    return res.status(500).json({\n      error: 'Unexpected integration error',\n    });\n  }\n});\n\napp.listen(3000);\n","lang":"js"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"przykład-backend-proxy-w-php","__idx":21},"children":["Przykład backend proxy w PHP"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"php","header":{"controls":{"copy":{}}},"source":"<?php\n\n$vin = $_GET['vin'] ?? null;\n\nif (!$vin) {\n    http_response_code(400);\n    echo json_encode(['error' => 'VIN is required']);\n    exit;\n}\n\n$apiKey = getenv('VIRTUALCAR_API_KEY');\n$baseUrl = 'https://img-out.virtualcar360.pl/api/v6.0/virtual-360';\n\n$url = $baseUrl . '/vin/' . rawurlencode($vin) . '?key=' . rawurlencode($apiKey);\n\n$response = file_get_contents($url);\n\nif ($response === false) {\n    http_response_code(500);\n    echo json_encode(['error' => 'VirtualCar360 request failed']);\n    exit;\n}\n\nheader('Content-Type: application/json');\necho $response;\n","lang":"php"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"obsługa-błędów-autoryzacji-i-dostępu","__idx":22},"children":["Obsługa błędów autoryzacji i dostępu"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Jeżeli zapytanie nie zwraca oczekiwanych danych, sprawdź:"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["czy parametr ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]}," został przekazany,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["czy klucz API jest poprawny,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["czy klucz ma dostęp do lokalizacji, z której pochodzi pojazd,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["czy używany jest właściwy typ klucza: lokalizacyjny albo grupowy,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["czy VIN, numer rejestracyjny albo ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["carId"]}," są poprawne,"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["czy pojazd posiada galerię w systemie VirtualCar360."]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Typowe odpowiedzi API:"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"align":"right","data-label":"Kod"},"children":["Kod"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Znaczenie"},"children":["Znaczenie"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Zapytanie wykonane poprawnie."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Nieprawidłowe parametry zapytania."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["404"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Nie znaleziono galerii dla podanych kryteriów."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{"align":"right"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["500"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Błąd serwera. Skontaktuj się z supportem VirtualCar360."]}]}]}]}]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info","name":"Uwaga"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Jeżeli klucz jest poprawny, ale API nie zwraca danych dla pojazdu, najczęstszą przyczyną jest brak galerii dla danego VIN, numeru rejestracyjnego albo brak dostępu klucza do właściwej lokalizacji."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"dobre-praktyki-integracyjne","__idx":23},"children":["Dobre praktyki integracyjne"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Używaj HTTPS dla wszystkich zapytań do API."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Przechowuj klucz API poza kodem źródłowym."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dla aplikacji frontendowych stosuj backend proxy."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Dla integracji wielooddziałowych używaj klucza grupowego."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Nie loguj pełnych adresów URL zawierających ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]},"."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Stosuj limity i cache po stronie własnej aplikacji, jeżeli dane są często pobierane."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Waliduj VIN, numer rejestracyjny i ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["carId"]}," przed wysłaniem zapytania."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["W przypadku problemów z dostępem przekazuj supportowi pełny kontekst techniczny, ale nie publikuj klucza w zgłoszeniach publicznych."]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Oddziel konfigurację środowiska testowego i produkcyjnego, jeżeli integracja korzysta z wielu środowisk."]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"minimalny-przykład-zapytania","__idx":24},"children":["Minimalny przykład zapytania"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/vin/WBA1234567890?key=TWOJ_KLUCZ_API\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"minimalny-przykład-pobrania-zdjęć","__idx":25},"children":["Minimalny przykład pobrania zdjęć"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"http","header":{"controls":{"copy":{}}},"source":"GET https://img-out.virtualcar360.pl/api/v6.0/virtual-360/image-set?carId=10209937&key=TWOJ_KLUCZ_API\n","lang":"http"},"children":[]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"podsumowanie","__idx":26},"children":["Podsumowanie"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Autoryzacja API VirtualCar360 opiera się na parametrze ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["key"]},", który identyfikuje konto, lokalizację albo grupę kont. Klucz API jest wymagany w każdym zapytaniu i powinien być traktowany jako informacja poufna."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Dla prostych integracji z jedną lokalizacją wystarczy klucz lokalizacyjny. Dla dealerów wielooddziałowych lub systemów agregujących pojazdy z wielu źródeł zalecany jest klucz grupowy."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["W przypadku integracji API najlepszą praktyką jest wykonywanie zapytań przez backend klienta, aby nie ujawniać klucza API w kodzie frontendowym."]}]},"headings":[{"value":"Authorization","id":"authorization","depth":1},{"value":"Uzyskanie dostępu","id":"uzyskanie-dostępu","depth":2},{"value":"Bezpieczeństwo","id":"bezpieczeństwo","depth":2},{"value":"API Authorization","id":"api-authorization","depth":1},{"value":"Base URL","id":"base-url","depth":2},{"value":"Parametr key","id":"parametr-key","depth":2},{"value":"Rodzaje kluczy API","id":"rodzaje-kluczy-api","depth":2},{"value":"Klucz dla jednej lokalizacji","id":"klucz-dla-jednej-lokalizacji","depth":3},{"value":"Klucz grupowy dla wielu lokalizacji","id":"klucz-grupowy-dla-wielu-lokalizacji","depth":3},{"value":"Jak uzyskać klucz API","id":"jak-uzyskać-klucz-api","depth":2},{"value":"Przykłady użycia klucza API","id":"przykłady-użycia-klucza-api","depth":2},{"value":"Pobranie najnowszej galerii po numerze VIN","id":"pobranie-najnowszej-galerii-po-numerze-vin","depth":3},{"value":"Pobranie najnowszej galerii po numerze rejestracyjnym","id":"pobranie-najnowszej-galerii-po-numerze-rejestracyjnym","depth":3},{"value":"Pobranie listy galerii po numerze VIN","id":"pobranie-listy-galerii-po-numerze-vin","depth":3},{"value":"Pobranie listy galerii po numerze rejestracyjnym","id":"pobranie-listy-galerii-po-numerze-rejestracyjnym","depth":3},{"value":"Pobranie zestawu zdjęć galerii","id":"pobranie-zestawu-zdjęć-galerii","depth":3},{"value":"Typowy proces integracji z API","id":"typowy-proces-integracji-z-api","depth":2},{"value":"API a Player","id":"api-a-player","depth":2},{"value":"Bezpieczeństwo klucza API","id":"bezpieczeństwo-klucza-api","depth":2},{"value":"Zalecany model backend proxy","id":"zalecany-model-backend-proxy","depth":2},{"value":"Przykład backend proxy w Node.js","id":"przykład-backend-proxy-w-nodejs","depth":2},{"value":"Przykład backend proxy w PHP","id":"przykład-backend-proxy-w-php","depth":2},{"value":"Obsługa błędów autoryzacji i dostępu","id":"obsługa-błędów-autoryzacji-i-dostępu","depth":2},{"value":"Dobre praktyki integracyjne","id":"dobre-praktyki-integracyjne","depth":2},{"value":"Minimalny przykład zapytania","id":"minimalny-przykład-zapytania","depth":2},{"value":"Minimalny przykład pobrania zdjęć","id":"minimalny-przykład-pobrania-zdjęć","depth":2},{"value":"Podsumowanie","id":"podsumowanie","depth":2}],"frontmatter":{"seo":{"title":"Authorization"}},"lastModified":"2026-06-16T22:34:39.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/authorization","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}