Car API (carapi.app) Trims API

The Trims API from Car API (carapi.app) — 2 operation(s) for trims.

OpenAPI Specification

car-api-trims-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.10.20
  title: Car Account Trims API
  description: 'Welcome to [CarAPIs vehicle API](https://carapi.app) documentation. The developer friendly Car API.

    Start developing with your vehicle API today — no fees, no signup. CarAPIs free vehicle data-set

    requires no account. Only pay when you''re ready to go live. The free data-set is limited to 2015-2020 vehicles.

    To access the full data-set you may [signup here](https://carapi.app/register) and then select a subscription plan.


    **Additional Documentation**


    For additional documentation please review [https://carapi.app/docs](https://carapi.app/docs).


    **SDKs**


    PHP SDK: [https://github.com/car-api-team/carapi-php-sdk](https://github.com/car-api-team/carapi-php-sdk)


    **Release Updates**


    Check release history here: [https://github.com/car-api-team/docs/releases](https://github.com/car-api-team/docs/releases)

    '
servers:
- url: https://carapi.app
tags:
- name: Trims
paths:
  /api/trims:
    get:
      operationId: makemodeltrims:index:get
      summary: Car API Search trims
      description: "To include additional information about the returned body (such as year, make, model and trim) request with the\nquery parameter as `verbose=yes`.\n\nFor complex queries you may use the json field to send an array of URL encoded JSON conditions, example:\n\n`[{\"field\": \"year\", \"op\": \">=\", \"val\": 2010}, {\"field\": \"year\", \"op\": \"<=\", \"val\": 2020}]`\n\nJSON operators: `=`, `!=`, `>`, `<`, `>=`, `<=`, `in`, `not in`, `like`, `not like`, `not null`, and `is null`.\n\nJSON search fields:\n `year`, `make`, `model`, `trim`, `make_model_id`, `make_model_trim_id`, `created`, `modified`, `bodies.type`, `engines.cam_type`, `engines.cylinders`, `engines.drive_type`, `engines.engine_type`, `engines.fuel_type`, `engines.transmission`, `engines.valve_timing`, `engines.valves`, and `make_id`."
      tags:
      - Trims
      externalDocs:
        url: https://carapi.app/features/json-api-specs#trims
        description: Documentation
      parameters:
      - $ref: '#/x-swagger-bake/components/parameters/paginatorPage'
      - $ref: '#/x-swagger-bake/components/parameters/paginatorLimit'
      - in: query
        name: sort
        required: false
        schema:
          type: string
          enum:
          - id
          - make_model_id
          - year
          - name
          - description
          - msrp
          - invoice
          - created
          - modified
      - $ref: '#/x-swagger-bake/components/parameters/paginatorDirection'
      - in: query
        name: verbose
        description: Includes make, model and trim
        required: false
        schema:
          type: string
          enum:
          - 'yes'
          - 'no'
      - in: query
        name: year
        required: false
        schema:
          type: string
          description: Value
      - in: query
        name: make
        required: false
        schema:
          type: string
          description: Like
      - in: query
        name: model
        required: false
        schema:
          type: string
          description: Like
      - in: query
        name: trim
        required: false
        schema:
          type: string
          description: Like
      - in: query
        name: make_model_id
        required: false
        schema:
          type: string
          description: Value
      - in: query
        name: make_id
        required: false
        schema:
          type: string
          description: Value
      - in: query
        name: json
        required: false
        schema:
          type: string
          description: JsonSearchFilter
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  data:
                    items:
                      type: object
                      allOf:
                      - $ref: '#/components/schemas/MakeModelTrim'
                    type: array
                allOf:
                - $ref: '#/x-swagger-bake/components/schemas/Generic-Collection'
            application/ld+json:
              schema:
                properties:
                  member:
                    items:
                      type: object
                      allOf:
                      - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
                      - $ref: '#/components/schemas/MakeModelTrim'
                    type: array
                allOf:
                - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Collection'
            application/hal+json:
              schema:
                properties:
                  _embedded:
                    items:
                      type: object
                      allOf:
                      - $ref: '#/x-swagger-bake/components/schemas/HalJson-Item'
                      - $ref: '#/components/schemas/MakeModelTrim'
                    type: array
                allOf:
                - $ref: '#/x-swagger-bake/components/schemas/HalJson-Collection'
        '400':
          description: BadRequestException
          content:
            application/json:
              schema:
                title: BadRequestException
                properties:
                  exception:
                    example: BadRequestException
                    type: string
                  code:
                    example: 400
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: The request contains invalid data. The returned error message should indicate the issue.
                    type: string
        '405':
          description: MethodNotAllowedException
          content:
            application/json:
              schema:
                title: MethodNotAllowedException
                properties:
                  exception:
                    example: MethodNotAllowedException
                    type: string
                  code:
                    example: 405
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: The HTTP method used to request this resource is not valid. For example, using an HTTP POST  when the endpoint only accepts HTTP GET.
                    type: string
        '429':
          description: 'TooManyRequestsException - Max Per Minute: 600'
          content:
            application/json:
              schema:
                title: TooManyRequestsException
                properties:
                  exception:
                    example: TooManyRequestsException
                    type: string
                  code:
                    example: 429
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: 'TooManyRequestsException - Max Per Minute: 600 (note: daily rate limits may apply, see your subscription plans details)'
                    type: string
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                title: ServiceUnavailableException
                properties:
                  exception:
                    example: ServiceUnavailableException
                    type: string
                  code:
                    example: 503
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: The server is unavailable, typically only encountered during scheduled maintenance.
                    type: string
      security:
      - bearerAuth: []
  /api/trims/{id}:
    get:
      operationId: makemodeltrims:view:get
      summary: Car API Get vehicle data.
      description: Returns all data associated with the vehicle trim.
      tags:
      - Trims
      parameters:
      - in: path
        name: id
        required: true
        schema:
          type: integer
          format: int64
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                properties:
                  make_model:
                    properties:
                      make:
                        allOf:
                        - $ref: '#/components/schemas/Make'
                        type: object
                        description: ''
                    allOf:
                    - $ref: '#/components/schemas/MakeModel'
                    type: object
                    description: ''
                  make_model_trim_body:
                    allOf:
                    - $ref: '#/components/schemas/MakeModelTrimBody'
                    type: object
                    description: ''
                  make_model_trim_engine:
                    allOf:
                    - $ref: '#/components/schemas/MakeModelTrimEngine'
                    type: object
                    description: Engine specifications and transmission type
                  make_model_trim_mileage:
                    allOf:
                    - $ref: '#/components/schemas/MakeModelTrimMileage'
                    type: object
                    description: EPA miles per gallon, ranges etc.
                  make_model_trim_exterior_colors:
                    items:
                      type: object
                      allOf:
                      - $ref: '#/components/schemas/MakeModelTrimExteriorColor'
                    type: array
                  make_model_trim_interior_colors:
                    items:
                      type: object
                      allOf:
                      - $ref: '#/components/schemas/MakeModelTrimInteriorColor'
                    type: array
                allOf:
                - $ref: '#/components/schemas/MakeModelTrim'
                type: object
                description: ''
            application/ld+json:
              schema:
                items:
                  type: object
                  properties:
                    make_model:
                      allOf:
                      - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
                    make_model_trim_body:
                      allOf:
                      - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
                    make_model_trim_engine:
                      allOf:
                      - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
                    make_model_trim_mileage:
                      allOf:
                      - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
                    make_model_trim_exterior_colors:
                      items:
                        type: object
                        allOf:
                        - $ref: '#/components/schemas/MakeModelTrimExteriorColor'
                        - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
                    make_model_trim_interior_colors:
                      items:
                        type: object
                        allOf:
                        - $ref: '#/components/schemas/MakeModelTrimInteriorColor'
                        - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
                allOf:
                - $ref: '#/x-swagger-bake/components/schemas/JsonLd-Item'
            application/hal+json:
              schema:
                items:
                  type: object
                  properties:
                    _embedded:
                      type: object
                      properties:
                        make_model:
                          allOf:
                          - $ref: '#/x-swagger-bake/components/schemas/HalJson-Item'
                        make_model_trim_body:
                          allOf:
                          - $ref: '#/x-swagger-bake/components/schemas/HalJson-Item'
                        make_model_trim_engine:
                          allOf:
                          - $ref: '#/x-swagger-bake/components/schemas/HalJson-Item'
                        make_model_trim_mileage:
                          allOf:
                          - $ref: '#/x-swagger-bake/components/schemas/HalJson-Item'
                      items:
                        type: object
                        allOf:
                        - $ref: '#/components/schemas/MakeModelTrimInteriorColor'
                        - $ref: '#/x-swagger-bake/components/schemas/HalJson-Item'
                allOf:
                - $ref: '#/x-swagger-bake/components/schemas/HalJson-Item'
        '400':
          description: BadRequestException
          content:
            application/json:
              schema:
                title: BadRequestException
                properties:
                  exception:
                    example: BadRequestException
                    type: string
                  code:
                    example: 400
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: The request contains invalid data. The returned error message should indicate the issue.
                    type: string
        '404':
          description: RecordNotFoundException
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/ld+json:
              schema:
                $ref: '#/components/schemas/Exception'
            application/hal+json:
              schema:
                $ref: '#/components/schemas/Exception'
        '405':
          description: MethodNotAllowedException
          content:
            application/json:
              schema:
                title: MethodNotAllowedException
                properties:
                  exception:
                    example: MethodNotAllowedException
                    type: string
                  code:
                    example: 405
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: The HTTP method used to request this resource is not valid. For example, using an HTTP POST  when the endpoint only accepts HTTP GET.
                    type: string
        '429':
          description: 'TooManyRequestsException - Max Per Minute: 600'
          content:
            application/json:
              schema:
                title: TooManyRequestsException
                properties:
                  exception:
                    example: TooManyRequestsException
                    type: string
                  code:
                    example: 429
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: 'TooManyRequestsException - Max Per Minute: 600 (note: daily rate limits may apply, see your subscription plans details)'
                    type: string
        '503':
          description: ServiceUnavailableException
          content:
            application/json:
              schema:
                title: ServiceUnavailableException
                properties:
                  exception:
                    example: ServiceUnavailableException
                    type: string
                  code:
                    example: 503
                    type: string
                  url:
                    example: /url/path
                    type: string
                  message:
                    example: The server is unavailable, typically only encountered during scheduled maintenance.
                    type: string
      security:
      - bearerAuth: []
components:
  schemas:
    Exception:
      properties:
        exception:
          example: ExceptionName
          type: string
        code:
          example: 500
          type: integer
        url:
          example: /url/path
          type: string
        message:
          example: Internal Error
          type: string
      xml:
        name: response
      type: object
    MakeModelTrimEngine:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        make_model_trim_id:
          minLength: 1
          type: integer
          format: int64
        engine_type:
          maxLength: 32
          type: string
          description: Type of engine
          enum:
          - diesel
          - electric
          - electric (fuel cell)
          - flex-fuel (FFV)
          - gas
          - hybrid
          - mild hybrid
          - natural gas (CNG)
          - plug-in hybrid
        fuel_type:
          maxLength: 64
          type: string
          description: The fuel the vehicle uses
          enum:
          - diesel fuel
          - electric
          - flex-fuel (premium unleaded recommended/E85)
          - flex-fuel (premium unleaded required/E85)
          - flex-fuel (unleaded/E85)
          - flex-fuel (unleaded/natural gas)
          - hydrogen
          - natural gas
          - premium unleaded (recommended)
          - premium unleaded (required)
          - regular unleaded
        cylinders:
          maxLength: 16
          type: string
          description: How many cylinders the engine has
          enum:
          - flat 4
          - flat 6
          - I2
          - I3
          - I4
          - I5
          - I6
          - rotary 0
          - V10
          - V12
          - V6
          - V8
          - W12
          - W16
          - W8
        size:
          type: number
          format: float
          description: Total size of the engine in liters
        horsepower_hp:
          type: integer
          format: int64
          description: One horsepower equals 33,000 foot-pounds of work per minute
        horsepower_rpm:
          type: integer
          format: int64
        torque_ft_lbs:
          type: integer
          format: int64
          description: The torque (turning force) of the vehicle's engine.
        torque_rpm:
          type: integer
          format: int64
        valves:
          type: integer
          format: int32
          description: Number of valves. The valves are installed in a part of the engine called the head and are responsible for letting air and/or fuel into the cylinders to be combusted -- those are called intake valves -- and for letting the exhaust from that combustion out of the cylinders -- those are called exhaust valves.
        valve_timing:
          maxLength: 32
          type: string
          description: 'In a piston engine, the valve timing is the precise timing of the opening and closing of the valves. '
          enum:
          - Variable
        cam_type:
          maxLength: 64
          type: string
          description: Camshafts are integral components of internal combustion engines, responsible for controlling the opening and closing of the engine's intake and exhaust valves.
          enum:
          - Double overhead cam (DOHC)
          - Overhead valves (OHV)
          - Single overhead cam (SOHC)
        drive_type:
          maxLength: 32
          type: string
          description: The drive type which delivers power to the wheels.
          enum:
          - all wheel drive
          - four wheel drive
          - front wheel drive
          - rear wheel drive
        transmission:
          maxLength: 64
          type: string
          description: Type of transmission
          enum:
          - 1-speed direct drive
          - 10-speed automatic
          - 10-speed shiftable automatic
          - 2-speed
          - 2-speed automatic
          - 3-speed automatic
          - 4-speed automatic
          - 4-speed manual
          - 4-speed shiftable automatic
          - 5-speed automated manual
          - 5-speed automatic
          - 5-speed manual
          - 5-speed shiftable automatic
          - 6-speed automated manual
          - 6-speed automatic
          - 6-speed manual
          - 6-speed shiftable automatic
          - 7-speed automated manual
          - 7-speed automatic
          - 7-speed manual
          - 7-speed shiftable automatic
          - 8-speed automated manual
          - 8-speed automatic
          - 8-speed shiftable automatic
          - 9-speed automated manual
          - 9-speed automatic
          - 9-speed shiftable automatic
          - continuously variable-speed automatic
          - continuously variable-speed shiftable automatic
          - electrically variable-speed automatic
      type: object
      description: Engine specifications and transmission type
    MakeModelTrimExteriorColor:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        make_model_trim_id:
          minLength: 1
          type: integer
          format: int64
        name:
          minLength: 1
          maxLength: 128
          type: string
          description: Color and shade
        rgb:
          maxLength: 16
          type: string
          description: Red, Green, Blue (RGB) value
      type: object
      description: ''
    MakeModelTrimMileage:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        make_model_trim_id:
          minLength: 1
          type: integer
          format: int64
        fuel_tank_capacity:
          type: number
          format: float
          description: How much fuel the vehicle holds (gallons)
        combined_mpg:
          type: integer
          format: int32
          description: Combined fuel economy is a weighted average of City and Highway MPG values that is calculated by weighting the City value by 55% and the Highway value by 45%.
        epa_city_mpg:
          type: integer
          format: int32
          description: Miles per gallon for city driving
        epa_highway_mpg:
          type: integer
          format: int32
          description: Miles per gallon for highway driving
        range_city:
          type: integer
          format: int32
          description: Total range in miles on a full tank for city driving
        range_highway:
          type: integer
          format: int32
          description: Total range in miles on a full tank for highway driving
        battery_capacity_electric:
          minLength: 1
          type: integer
          format: int32
          description: Total capacity of the battery kWh
        epa_time_to_charge_hr_240v_electric:
          type: number
          format: float
          description: How long it takes to charge an EV battery
        epa_kwh_100_mi_electric:
          type: integer
          format: int32
          description: kWh used to drive 100 miles for an electric vehicle
        range_electric:
          type: integer
          format: int32
          description: Range for electric vehicles in miles
        epa_highway_mpg_electric:
          type: integer
          format: int32
          description: MPG equivalent for driving electric vehicles on the highway
        epa_city_mpg_electric:
          type: integer
          format: int32
          description: MPG equivalent for driving electric vehicles in the city
        epa_combined_mpg_electric:
          type: integer
          format: int32
          description: MPG equivalent for electric vehicles
      type: object
      description: EPA miles per gallon, ranges etc.
    MakeModelTrim:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        make_model_id:
          minLength: 1
          type: integer
          format: int64
        year:
          minLength: 1
          maxLength: 4
          type: integer
          format: int32
          description: Vehicle Year
        name:
          minLength: 1
          maxLength: 128
          type: string
          description: Vehicle Trim
        description:
          minLength: 1
          maxLength: 256
          type: string
          description: Full trim description
        msrp:
          minLength: 1
          type: integer
          format: int64
          description: Manufacturers Suggested Retail Price
        invoice:
          minLength: 1
          type: integer
          format: int64
          description: The typical auto dealers cost
        created:
          minLength: 1
          type: string
          format: date-time
          readOnly: true
        modified:
          minLength: 1
          type: string
          format: date-time
          readOnly: true
      type: object
      description: ''
    Make:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        name:
          minLength: 1
          maxLength: 32
          type: string
          description: Vehicle make/brand
      type: object
      description: ''
    MakeModelTrimInteriorColor:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        make_model_trim_id:
          minLength: 1
          type: integer
          format: int64
        name:
          minLength: 1
          maxLength: 128
          type: string
          description: Color and shade
        rgb:
          maxLength: 16
          type: string
          description: Red, Green, Blue (RGB) value
      type: object
      description: ''
    MakeModelTrimBody:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        make_model_trim_id:
          minLength: 1
          type: integer
          format: int64
        type:
          minLength: 1
          maxLength: 32
          type: string
          description: The body type, such as SUV or Sedan
          enum:
          - Cargo Van
          - Convertible
          - Coupe
          - Ext Cargo Minivan
          - Ext Cargo Van
          - Ext Minivan
          - Ext Van
          - Hatchback
          - Minivan
          - Passenger Van
          - Sedan
          - SUV
          - Truck (Access Cab)
          - Truck (Cab Plus)
          - Truck (Club Cab)
          - Truck (Crew Cab)
          - Truck (CrewMax)
          - Truck (Double Cab)
          - Truck (Extended Cab)
          - Truck (King Cab)
          - Truck (Mega Cab)
          - Truck (Quad Cab)
          - Truck (Regular Cab)
          - Truck (SuperCab)
          - Truck (SuperCrew)
          - Truck (Xtracab)
          - Van
          - Wagon
        doors:
          type: integer
          format: int32
          description: Number of doors &mdash; generally including a hatchback as an additional door
        length:
          type: number
          format: float
          description: Total length (in inches) of the vehicle in inches
        width:
          type: number
          format: float
          description: Total width (in inches) of the vehicle
        seats:
          type: integer
          format: int32
          description: Number of passenger seats in the vehicle.
        height:
          type: number
          format: float
          description: Total height (in inches) of the vehicle
        wheel_base:
          type: number
          format: float
          description: The horizontal distance (in inches) between the centers of the front and rear wheels
        front_track:
          type: number
          format: float
          description: The distance (in inches) between the centerline of the wheels
        rear_track:
          type: number
          format: float
          description: The distance (in inches) between the hub flanges on an axle
        ground_clearance:
          type: number
          format: float
          description: The distance (in inches) between the lowest point on the undersurface of the vehicle and the road
        cargo_capacity:
          type: number
          format: float
          description: The standard total cubic feet of space in a vehicles cargo area
        max_cargo_capacity:
          type: number
          format: float
          description: The maximum total cubic feet of space in a vehicles cargo area
        curb_weight:
          type: integer
          format: int64
          description: Curb weight refers to the vehicles heaviness (in pounds) without passengers or cargo, only counting the car itself along with necessary fluids like oil and coolant
        gross_weight:
          type: integer
          format: int64
          description: Gross weight (in pounds) considers all components—including passengers, cargo, and both the tow vehicle weight—if one is attached
        max_payload:
          type: integer
          format: int64
          description: Maximum weight in pounds that a vehicle can safely carry
        max_towing_capacity:
          type: integer
          format: int64
          description: Maximum weight in pounds that a vehicle can safely tow
      type: object
      description: ''
    MakeModel:
      properties:
        id:
          minLength: 1
          type: integer
          format: int64
          readOnly: true
        make_id:
          minLength: 1
          type: integer
          format: int64
        name:
          minLength: 1
          maxLength: 64
          type: string
          description: Vehicle model
      type: object
      description: ''
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-swagger-bake:
  components:
    parameters:
      paginatorPage:
        name: page
        in: query
        required: false
        schema:
          type: integer
      paginatorLimit:
        name: limit
        in: query
        required: false
        schema:
          type: integer
      paginatorSort:
        name: sort
        in: query
        required: false
        schema:
          type: string
      paginatorDirection:
        name: direction
        in: query
        required: false
        schema:
          type: string
          enum:
          - asc
          - desc
    schemas:
      HalJson-Item:
        type: object
        properties:
          links:
            type: object
            properties:
              self:
                type: object
                properties:
                  href:
                    type: string
                    format: url
                    example: /entity/:id
      HalJson-Collection:
        type: object
        properties:
          links:
            type: object
            properties:
              self:
                type: object
                properties:
                  href:
                    type: string
                    format: url
                    example: /collection
              next:
                type: object
                properties:
                  href:
                    type: string
                    format: url
                    example: /collection?page=:number
              prev:
                type: object
                properties:
                  href:
                    type: string
                    format: url
                    example: /collection?page=:number
              first:
                type: object
                properties:
                  href:
                    type: string
                    format: url
                    example: /collection?page=:number
              properties:
                href:
                  type: string
                  format: url
                  example: /collection?page=:number
            last:
              type: object
              properties:
                href:
                  type: string
                  format: url
                  example: /collection?page=:number
      JsonLd-Item:
        type: object
        properties:
          '@id':
            

# --- truncated at 32 KB (34 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/car-api/refs/heads/main/openapi/car-api-trims-api-openapi.yml