swagger: "2.0"
schemes:
  - https
host: api.mercedes-benz.com
basePath: /image_tryout/v1/vehicles
info:
  contact:
    name: The open API platform by Mercedes-Benz
    x-twitter: MercedesBenz
  description: The vehicle images API offers access to original Mercedes-Benz vehicle images.  It provides access to exterior and interior images with parameters e.g. to modify the perspective and to display vehicles at day/nighttime.  In addition you can request component images of a vehicle's engine, paint, rim, trim, upholstery and equipments.
  title: Vehicle Image
  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-05/swagger_vehicleimage_api.json
      version: "2.0"
  x-providerName: mercedes-benz.com
  x-serviceName: image
produces:
  - application/json
parameters:
  finorvin:
    default: WDD1760421J123456
    description: |-
      The FIN or VIN of one specific vehicle. For testing purposes the following sample FINs are available (please note that these FINs are NOT available in the tryout): 
        * E 350 d: WDD2130331A123456
        * B 180: WDD2462421N123456
        * GLA 200: WDC1569431J123456
        * S 500 Cabrio: WDD2174821A123456
        * Smart fortwo turbo: WME4533441K012345
    in: path
    name: finorvin
    required: true
    type: string
  night:
    default: false
    description: Set 'true', if you are looking for images with a darker background and the vehicle's headlights turned on. Default is 'false'.
    in: query
    name: night
    required: false
    type: boolean
  perspectives:
    default: EXT020,INT1
    description: |-
      One or more perspectives as a comma separated String list e.g. 'EXT000,EXT010,INT1'.  The following perspectives are available:
        * EXT000-EXT350: EXT000 defines the front view, EXT010 defines a rotation of 10 degress and so forth.
        * INT1-INT4: These are the 4 available interior perspectives.































        
      The default value is EXT020,INT1 if no value is provided.
    in: query
    name: perspectives
    required: false
    type: string
  roofOpen:
    default: false
    description: Set 'true', if you are looking for images with the roof open. This option is only valid for cabrios. Default is 'false'.
    in: query
    name: roofOpen
    required: false
    type: boolean
tags:
  - name: Perspectives
  - name: Components
paths:
  "/{finorvin}/components":
    get:
      description: |-
        Returns URLs pointing to images in JPG format in the highest available resolution (depending on the component) of the vehicle's:
          * engine (1024x576 px), 
          * rim (710x710 px), 
          * trim (800x600 px), 
          * paints (800x600 px), 
          * upholstery (800x600 px) and 
          * equipments (740x416 px).
      operationId: imageComponentsGET
      parameters:
        - $ref: "#/parameters/finorvin"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.              "
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/ComponentsResponse"
        "204":
          description: No content could be found for your request. The FIN/VIN belongs to a vehicle for which no images are available.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.            "
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Components
    x-swagger-router-controller: images_components_finvin
  "/{finorvin}/components/engine":
    get:
      description: Returns a URL pointing to an image of the vehicles engine.  These images are available in the resolution 1024x576 px.
      operationId: imageComponentsEngineGET
      parameters:
        - $ref: "#/parameters/finorvin"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/EngineResponse"
        "204":
          description: No content could be found for your request. The FIN/VIN belongs to a vehicle for which no images are available.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Components
    x-swagger-router-controller: images_components_finvin
  "/{finorvin}/components/equipments":
    get:
      description: Returns URLs pointing to images of this vehicle's equipments. The images are available in the highest possible resolution (usually 740x416 px).
      operationId: imageComponentsEquipmentsGET
      parameters:
        - $ref: "#/parameters/finorvin"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.              "
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/EquipmentResponse"
        "204":
          description: No content could be found for your request. The FIN/VIN belongs to a vehicle for which no images are available.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Components
    x-swagger-router-controller: images_components_finvin
  "/{finorvin}/components/paint":
    get:
      description: Returns URLs pointing to images of this vehicles paint.  These images are available in resolution 800x600 px.  Note there might be two paints (e.g. Smart, 'paint' for body panel and 'paint2' for the tridion cell)
      operationId: imageComponentsPaintGET
      parameters:
        - $ref: "#/parameters/finorvin"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.              "
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/PaintResponse"
        "204":
          description: No content could be found for your request. The FIN/VIN belongs to a vehicle for which no images are available.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Components
    x-swagger-router-controller: images_components_finvin
  "/{finorvin}/components/rim":
    get:
      description: Returns a URL pointing to an image of the vehicles rim.  These images are available in the resolution 710x710 px.
      operationId: imageComponentsRimGET
      parameters:
        - $ref: "#/parameters/finorvin"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.              "
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/RimResponse"
        "204":
          description: No content could be found for your request. The FIN/VIN belongs to a vehicle for which no images are available.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Components
    x-swagger-router-controller: images_components_finvin
  "/{finorvin}/components/trim":
    get:
      description: Returns a URL pointing to an image of this vehicles trim.  These images are available in resolution 800x600 px.
      operationId: imageComponentsTrimGET
      parameters:
        - $ref: "#/parameters/finorvin"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.              "
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/TrimResponse"
        "204":
          description: No content could be found for your request. The FIN/VIN belongs to a vehicle for which no images are available.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Components
    x-swagger-router-controller: images_components_finvin
  "/{finorvin}/components/upholstery":
    get:
      description: Returns URLs pointing to images of the vehicle's upholsteries. Tge images are available in the highest possible resolution (usually 800x600 px).
      operationId: imageComponentsUpholsteryGET
      parameters:
        - $ref: "#/parameters/finorvin"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.              "
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/UpholsteryResponse"
        "204":
          description: No content could be found for your request. The FIN/VIN belongs to a vehicle for which no images are available.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Components
    x-swagger-router-controller: images_components_finvin
  "/{finorvin}/vehicle":
    get:
      description: Returns URLs pointing to PNG images of a vehicle with a transparent background.
      operationId: imageVehicleGET
      parameters:
        - $ref: "#/parameters/finorvin"
        - $ref: "#/parameters/perspectives"
        - $ref: "#/parameters/roofOpen"
        - $ref: "#/parameters/night"
      responses:
        "200":
          description: Successful response
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
            cache-control:
              default: max-age=86400
              description: Specifies the maximum amount of time (in seconds) an image is considered to be up-to-date
              type: string
          schema:
            $ref: "#/definitions/VehicleResponse"
        "204":
          description: No content could be found for your request. Try to use different parameters instead.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
        "400":
          description: One of the provided parameters was invalid. Verify your query and inspect the global error object in the response for further information.
          headers:
            X-Request-Id:
              description: Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.
              type: string
          schema:
            $ref: "#/definitions/Error"
        "401":
          description: |-
            Unauthorized: 
              * Failed to resolve API Key query parameter 
              * Invalid API Key 
        "404":
          description: The requested FIN/VIN could not be resolved. Please verify that your FIN/VIN is correct.
          headers:
            X-Request-Id:
              description: "Returns a randomly generated (unique) request id that was assigned to the request for internal tracing and logging. Provide this request id for troubleshooting in a support case.            "
              type: string
          schema:
            $ref: "#/definitions/Error"
        "429":
          description: Quota limit is exceeded
        "500":
          description: The requested FIN/VIN could not be resolved because external resources are not available or the server encountered an internal error.
          schema:
            $ref: "#/definitions/Error"
      tags:
        - Perspectives
    x-swagger-router-controller: images_vehicle_finvin
definitions:
  CodeImage:
    description: The code image contains an equipment code with a corresponding image URL.
    properties:
      code:
        description: The equipment code for the corresponding image.
        type: string
      url:
        description: An URL pointing to an image of an equipment.
        type: string
    required:
      - code
      - url
    type: object
  Components:
    description: A set of URLs pointing to images of the vehicle in low resolution.
    properties:
      engine:
        $ref: "#/definitions/ImageUrl"
      equipments:
        $ref: "#/definitions/EquipmentMap"
      paint:
        $ref: "#/definitions/Paints"
      rim:
        $ref: "#/definitions/CodeImage"
      trim:
        $ref: "#/definitions/CodeImage"
      upholstery:
        $ref: "#/definitions/CodeImage"
    type: object
  ComponentsResponse:
    description: A paint object
    properties:
      components:
        $ref: "#/definitions/Components"
    type: object
  EngineResponse:
    description: A paint object
    properties:
      engine:
        $ref: "#/definitions/ImageUrl"
    type: object
  EquipmentMap:
    additionalProperties:
      $ref: "#/definitions/ImageUrlArray"
    description: The map holds equipments objects with the equipment codes as map keys and a corresponding list of image URLs for each code.
    type: object
  EquipmentResponse:
    description: The response object holds either an error object, in case that the request was malformed, or an equipments object containing a map with all equipment urls for the requested vehicle with the equipment codes as map keys.
    properties:
      equipments:
        $ref: "#/definitions/EquipmentMap"
    required:
      - equipments
  Error:
    description: The error object containing detailed information about the error.
    properties:
      code:
        type: string
      message:
        type: string
    type: object
  ImageUrl:
    description: "An object describing an image URL that could be a vehicle image for example. This includes the URL to the content.      "
    properties:
      url:
        type: string
  ImageUrlArray:
    description: An object describing a list of image URLs that could be an vehicle equipment images for example.
    properties:
      urls:
        items:
          type: string
        type: array
  ImageUrlWithError:
    description: An object describing an image URL that could be a vehicle image for example. This includes the URL to the content. In case of an error that is related to the requested image material (e.g. perspective), an error object is present containing further information.
    properties:
      error:
        $ref: "#/definitions/Error"
      url:
        type: string
  PaintResponse:
    description: A paint object
    properties:
      paint:
        $ref: "#/definitions/Paints"
    type: object
  Paints:
    description: The upper (paint2) and the lower (paint1) paint of the vehicle.
    properties:
      lowerPaint:
        $ref: "#/definitions/CodeImage"
      upperPaint:
        $ref: "#/definitions/CodeImage"
    type: object
  RimResponse:
    description: A rim object
    properties:
      rim:
        $ref: "#/definitions/CodeImage"
    type: object
  TrimResponse:
    description: A trim object
    properties:
      trim:
        $ref: "#/definitions/CodeImage"
    type: object
  UpholsteryResponse:
    description: A paint object
    properties:
      upholstery:
        $ref: "#/definitions/CodeImage"
    type: object
  VehicleResponse:
    description: The response object holds either an error object, in case that the request was malformed, or a vehicle object containing all urls for the requested perspectives.
    properties:
      vehicle:
        additionalProperties:
          $ref: "#/definitions/ImageUrlWithError"
        description: A map holding a vehicle image for each requested perspective, e.g. EXT000.
        type: object
    required:
      - vehicle
x-default-apikey: Tyt82ndiKG0AdH8TCqe001ROh7RsGOKB
