openapi-directory
Version:
Building & bundling https://github.com/APIs-guru/openapi-directory for easy use from JS
1 lines • 14.7 kB
JSON
{"openapi":"3.0.0","info":{"contact":{"name":"The open API platform by Mercedes-Benz","x-twitter":"MercedesBenz"},"description":"The Dealer API provides Dealer search functions.","title":"Dealer","version":"1.0","x-apisguru-categories":["transport"],"x-logo":{"url":"https://twitter.com/MercedesBenz/profile_image?size=original"},"x-origin":[{"format":"swagger","url":"https://developer.mercedes-benz.com/content/sites/default/files/2018-07/swagger_dealer_api_0.yaml","version":"2.0"}],"x-providerName":"mercedes-benz.com","x-serviceName":"dealer"},"tags":[{"description":"Resources that provide search functions for dealers (dealer, garage, retailer, etc.) based on given attributes.","name":"Dealer search"},{"description":"Reference data that is required for the Dealer API.","name":"References"}],"paths":{"/countries":{"get":{"description":"This request returns the countries supported by the Dealer API","operationId":"countriesGET","parameters":[{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HalifiedCountries"}}}},"400":{"description":"Invalid parameter was specified:\n * Page is not valid\n * Page size is not valid"},"401":{"description":"Unauthorized:\n * Failed to resolve API Key query parameter\n * Invalid API Key"},"429":{"description":"Quota limit is exceeded"},"500":{"description":"Internal server error"}},"tags":["References"]},"x-swagger-router-controller":"get_countries"},"/dealers":{"get":{"description":"This request returns dealers (dealer, garage, retailer, etc.) for given parameters","operationId":"dealersGET","parameters":[{"$ref":"#/components/parameters/dealerIds"},{"$ref":"#/components/parameters/latitude"},{"$ref":"#/components/parameters/longitude"},{"$ref":"#/components/parameters/radiusValue"},{"$ref":"#/components/parameters/radiusUnit"},{"$ref":"#/components/parameters/countryIsoCode"},{"$ref":"#/components/parameters/city"},{"$ref":"#/components/parameters/legalName"},{"$ref":"#/components/parameters/brand"},{"$ref":"#/components/parameters/productGroup"},{"$ref":"#/components/parameters/activity"},{"$ref":"#/components/parameters/fieldsForDealers"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/pageSize"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HalifiedDealers"}}}},"204":{"description":"The search did not match any dealers."},"400":{"description":"Invalid parameter was specified:\n * DealerId is not valid\n * Area search is not valid (latitude or longitude missing or invalid)\n * Country ISO code is not valid\n * Brand code is not valid\n * Product group is not valid\n * Activity is not valid\n * Page is not valid\n * Page size is not valid"},"401":{"description":"Unauthorized:\n * Failed to resolve API Key query parameter\n * Invalid API Key"},"429":{"description":"Quota limit is exceeded"},"500":{"description":"Internal server error"}},"tags":["Dealer search"]},"x-swagger-router-controller":"get_dealers"},"/dealers/{dealerId}":{"get":{"description":"This request returns dealers for given parameters","operationId":"dealerGET","parameters":[{"$ref":"#/components/parameters/dealerId"},{"$ref":"#/components/parameters/fieldsForDealer"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Dealer"}}}},"400":{"description":"Invalid format for parameter dealerId was specified"},"401":{"description":"Unauthorized:\n * Failed to resolve API Key query parameter\n * Invalid API Key"},"404":{"description":"Dealer not found"},"429":{"description":"Quota limit is exceeded"},"500":{"description":"Internal server error"}},"tags":["Dealer search"]},"x-swagger-router-controller":"get_dealer_by_id"}},"x-default-apikey":"Tyt82ndiKG0AdH8TCqe001ROh7RsGOKB","servers":[{"url":"https://api.mercedes-benz.com/dealer_tryout/v1"}],"components":{"parameters":{"activity":{"description":"Filter by activity, valid actitvity values are:\n * PARTS: Spare Parts Sales\n * SALES: Sales of new vehicles\n * SERVICE: Maintaining and repair\n * USED-VEHICLES-TRADE: Sales of used vehicles","in":"query","name":"activity","required":false,"schema":{"type":"string","enum":["PARTS","SALES","SERVICE","USED-VEHICLES-TRADE"]}},"brand":{"description":"Filter by brand, valid values are:\n * MB: Mercedes-Benz\n * SMT: Smart","in":"query","name":"brand","required":false,"schema":{"type":"string","enum":["MB","SMT"]}},"city":{"description":"The city of the dealer address.","in":"query","name":"city","required":false,"schema":{"type":"string"}},"countryIsoCode":{"description":"The country of the dealer address defined as ISO two letter ID (e.g. DE, CH, CN, etc.)","in":"query","name":"countryIsoCode","required":false,"schema":{"type":"string"}},"dealerId":{"description":"The dealer id is dealer’s business key, also known as GS Id. e.g. GS0000857","in":"path","name":"dealerId","required":true,"schema":{"type":"string","default":"GS0000275"}},"dealerIds":{"description":"Array of dealer ids. The dealer id is dealer’s business key, also known as GS Id. e.g. GS0000857,GS0017621\n","in":"query","name":"dealerIds","required":false,"style":"form","explode":false,"schema":{"type":"array","items":{"type":"string"}}},"fieldsForDealer":{"description":"Specifies which fields should be included in the result. If this filter is not used, per default all fields are returned. e.g. fields=dealerId,address(street,city)","in":"query","name":"fields","required":false,"schema":{"type":"string"}},"fieldsForDealers":{"description":"Specifies which fields should be included in the result. If this filter is not used, per default all fields are returned. e.g. fields=dealers(dealerId,address(street,city))","in":"query","name":"fields","required":false,"schema":{"type":"string"}},"latitude":{"description":"The latitude geo coordinate.","in":"query","name":"latitude","required":false,"schema":{"type":"number"}},"legalName":{"description":"A name of the dealer, the name filter will be applied to all Dealer names (e.g. legalName, nameAddition). You can also search for parts of Dealer names, e.g. the search term 'Niederlassung' will also match 'Niederlassung Stuttgart'.","in":"query","name":"name","required":false,"schema":{"type":"string"}},"longitude":{"description":"The longitude geo coordinate.","in":"query","name":"longitude","required":false,"schema":{"type":"number"}},"page":{"description":"The index of the page to be returned. If this parameter is omitted, the first page will be returned.\n","in":"query","name":"page","required":false,"schema":{"type":"integer","format":"int32"}},"pageSize":{"description":"The index of the page to be returned. If this parameter is omitted, the first page will be returned.\n","in":"query","name":"pageSize","required":false,"schema":{"type":"integer","format":"int32"}},"productGroup":{"description":"Filter by a product group","in":"query","name":"productGroup","required":false,"schema":{"type":"string","enum":["PASSENGER-CAR","VAN"]}},"radiusUnit":{"description":"The radius unit of the search area. The center of the search area is defined by geo coordinates. (latitude, longitude properties) If radiusValue and radiusUnit parameters are missing, then the default radius is 10 km.","in":"query","name":"radiusUnit","required":false,"schema":{"type":"string","enum":["M","KM","MILE"],"default":"KM"}},"radiusValue":{"description":"The radius value of the search area. The center of the search area is defined by geo coordinates. (latitude, longitude properties) If radiusValue and radiusUnit parameters are missing, then the default radius is 10 km.","in":"query","name":"radiusValue","required":false,"schema":{"type":"integer","default":10}}},"schemas":{"ActivityOfAFunction":{"properties":{"code":{"description":"The activity of the dealer, valid actitvity values are:\n * PARTS: Spare Parts Sales\n * SALES: Sales of new vehicles\n * SERVICE: Maintaining and repair\n * USED-VEHICLES-TRADE: Sales of used vehicles","type":"string"},"name":{"description":"the corresponding activity name","type":"string"}},"required":["code","name"],"type":"object"},"Address":{"properties":{"addressAddition":{"description":"address addition","type":"string"},"city":{"description":"city","type":"string"},"countryIsoCode":{"description":"ISO A2 country code","type":"string"},"district":{"description":"district, area of city","type":"string"},"street":{"description":"street and house number, if applicable","type":"string"},"zipCode":{"description":"postal code","type":"string"}},"type":"object"},"Brand":{"properties":{"code":{"description":"brand qualifier","type":"string"},"name":{"description":"brand name","type":"string"}},"required":["code","name"],"type":"object"},"BrandCode":{"properties":{"brand":{"$ref":"#/components/schemas/Brand"}},"required":["brand"],"type":"object"},"CommunicationChannels":{"properties":{"general":{"$ref":"#/components/schemas/General"}},"type":"object"},"Country":{"properties":{"countryId":{"description":"the country id","type":"string"},"isoCode":{"description":"the country iso code","type":"string"},"name":{"description":"the country name","type":"string"}},"required":["countryId","isoCode","name"],"type":"object"},"Dealer":{"description":"the representation of an dealer","properties":{"_links":{"$ref":"#/components/schemas/SelfLink"},"address":{"$ref":"#/components/schemas/Address"},"brandCodes":{"description":"network brand codes of the dealer, dealer numbers","items":{"$ref":"#/components/schemas/BrandCode"},"type":"array"},"communication":{"$ref":"#/components/schemas/CommunicationChannels"},"dealerId":{"description":"GSSN unique ID, main identifier","type":"string"},"distance":{"$ref":"#/components/schemas/TheDistance"},"functions":{"description":"list of functions for the dealer","items":{"$ref":"#/components/schemas/Function"},"type":"array","uniqueItems":true},"geoCoordinates":{"$ref":"#/components/schemas/GeoCoordinates"},"legalName":{"description":"legal name of the company","type":"string"},"nameAddition":{"description":"name addition, country specific use","type":"string"},"openingHours":{"description":"List of opening hours for each customer relevant function for\neach day\n","items":{"$ref":"#/components/schemas/FunctionOpeningHours"},"type":"array","uniqueItems":true},"region":{"$ref":"#/components/schemas/RegionRepresentation"}},"required":["_links","legalName","dealerId"],"type":"object"},"DefaultLinks":{"description":"default links","properties":{"next":{"$ref":"#/components/schemas/Link"},"previous":{"$ref":"#/components/schemas/Link"},"self":{"$ref":"#/components/schemas/Link"}},"type":"object"},"Function":{"properties":{"activity":{"$ref":"#/components/schemas/ActivityOfAFunction"},"brand":{"$ref":"#/components/schemas/Brand"},"productGroup":{"$ref":"#/components/schemas/ProductGroupOfAFunction"}},"required":["activity","brand","productGroup"],"type":"object"},"FunctionOpeningHours":{"properties":{"function":{"$ref":"#/components/schemas/Function"},"weekdays":{"$ref":"#/components/schemas/Weekdays"}},"type":"object"},"General":{"properties":{"email":{"description":"general email address","type":"string"},"facebook":{"description":"general facebook URL","type":"string"},"fax":{"description":"general fax number","type":"string"},"googlePlus":{"description":"general googlePlus account name","type":"string"},"mobile":{"description":"general mobile phone number","type":"string"},"phone":{"description":"general phone number","type":"string"},"twitter":{"description":"general twitter account name","type":"string"},"website":{"description":"general website","type":"string"}},"type":"object"},"GeoCoordinates":{"properties":{"latitude":{"description":"latitude - in decimal degrees","format":"double","type":"number"},"longitude":{"description":"longitude - in decimal degrees","format":"double","type":"number"}},"required":["latitude","longitude"],"type":"object"},"HalifiedCountries":{"description":"countries and navigation links for additional results.","properties":{"_links":{"$ref":"#/components/schemas/DefaultLinks"},"countries":{"description":"countries","items":{"$ref":"#/components/schemas/Country"},"type":"array"}},"required":["_links"],"type":"object"},"HalifiedDealers":{"description":"dealer with navigation links.","properties":{"_links":{"$ref":"#/components/schemas/DefaultLinks"},"dealers":{"description":"dealers","items":{"$ref":"#/components/schemas/Dealer"},"type":"array"}},"required":["_links"],"type":"object"},"Link":{"description":"the representation of a link","properties":{"href":{"description":"the target of the link","type":"string"}},"required":["href"],"type":"object"},"Periods":{"properties":{"from":{"description":"from","type":"string"},"until":{"description":"until","type":"string"}},"required":["from","until"],"type":"object"},"ProductGroupOfAFunction":{"properties":{"code":{"description":"The product group code, valid values are:\n * PASSENGER-CAR\n * VAN","type":"string"},"name":{"description":"product group name","type":"string"}},"required":["code","name"],"type":"object"},"RegionRepresentation":{"properties":{"region":{"description":"region","type":"string"},"subRegion":{"description":"subregion","type":"string"}},"type":"object"},"SelfLink":{"description":"self links","properties":{"self":{"$ref":"#/components/schemas/Link"}},"type":"object"},"TheDistance":{"properties":{"unit":{"description":"unit of length","enum":["M","KM","MILE"],"type":"string"},"value":{"description":"numeric amount of distance","format":"double","type":"number"}},"required":["value"],"type":"object"},"WeekdayInfo":{"properties":{"periods":{"description":"time periods","items":{"$ref":"#/components/schemas/Periods"},"type":"array"},"status":{"description":"status (OPEN or CLOSED)","enum":["OPEN","CLOSED"],"type":"string"}},"type":"object"},"Weekdays":{"description":"opening hours for a week, represented by a map where the key\nis a weekday and the value is an object containing the time periods. There\nare a maximum of two time slots for each day. If there exists no opening\nhours for one day, they will be shown as closed.\n","properties":{"FRIDAY":{"$ref":"#/components/schemas/WeekdayInfo"},"MONDAY":{"$ref":"#/components/schemas/WeekdayInfo"},"SATURDAY":{"$ref":"#/components/schemas/WeekdayInfo"},"SUNDAY":{"$ref":"#/components/schemas/WeekdayInfo"},"THURSDAY":{"$ref":"#/components/schemas/WeekdayInfo"},"TUESDAY":{"$ref":"#/components/schemas/WeekdayInfo"},"WEDNESDAY":{"$ref":"#/components/schemas/WeekdayInfo"}},"type":"object"}}}}