> ## Documentation Index
> Fetch the complete documentation index at: https://docs.driv.ly/llms.txt
> Use this file to discover all available pages before exploring further.

# Retrieve a Listing



## OpenAPI

````yaml Commerce get /listings/{id}
openapi: 3.1.0
info:
  title: Commerce
  version: '3.0'
  contact:
    email: samuel@driv.ly
    name: Samuel Lippert
    url: https://driv.ly/
  description: Drivly Commerce API
servers:
  - url: https://commerce.driv.ly/api
security: []
paths:
  /listings/{id}:
    parameters:
      - schema:
          type: string
        name: id
        in: path
        required: true
        description: Listing is uniquely identified by id
      - schema:
          type: integer
        name: depth
        in: query
        required: false
        description: The number of levels of related objects to include in the response
    get:
      summary: Retrieve a Listing
      operationId: get-listing
      responses:
        '200':
          description: Listing Found
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/Listing'
                  success:
                    type: boolean
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 401
                      message: Unauthorized
                    success: false
        '404':
          description: Listing Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 404
                      message: Listing Not Found
                    success: false
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorModel'
                examples:
                  - error:
                      code: 429
                      message: Too Many Requests
                    success: false
components:
  schemas:
    Listing:
      $id: Listing
      title: Listing
      examples:
        - id: lst_k3j5s9qj3w0d
          dealer: dlr_4dk39dkl3d93
          vehicle: veh_3k12j9qksdf0
          vhrUrls:
            - https://example.com/vhr.pdf
          odometer: 15000
          ownerCount: 1
          attachments: []
          accidentCount: 0
          vehicleRating: 8
          initialOfferDate: '2022-05-10'
          retailBuyNowPrice: 35000
          retailAskingPrice: 34000
          wholesaleBuyNowPrice: 30000
          wholesaleMinimumBidPrice: 28000
          wholesaleMaximumBidPrice: 32000
      properties:
        id:
          type: string
          description: Listing is uniquely identified by id
        ownerCount:
          type: integer
          minimum: 0
          description: Listing has Owner Count
        odometer:
          type: number
          minimum: 0
          description: Listing has Odometer reading
        dealer:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/Dealer'
          description: Listing is sold by Dealer
        wholesaleBuyNowPrice:
          type: integer
          description: Listing has Wholesale Buy Now Price
        accidentCount:
          type: integer
          minimum: 0
          description: Listing records Accident Count
        initialOfferDate:
          type: string
          format: date
          description: Listing has Initial Offer Date
        retailBuyNowPrice:
          type: integer
          description: Listing has Retail Buy Now Price
        vehicleRating:
          type: number
          minimum: 0
          maximum: 5
          multipleOf: 0.1
          description: Listing has Vehicle Rating
        retailAskingPrice:
          type: integer
          description: Listing has Retail Asking Price
        vehicle:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/Vehicle'
          description: Listing offers Vehicle for sale
        wholesaleMinimumBidPrice:
          type: integer
          description: Listing has Wholesale Minimum Bid Price
        wholesaleMaximumBidPrice:
          type: integer
          description: Listing has Wholesale Maximum Bid Price
        attachments:
          type: array
          items:
            oneOf:
              - type: string
              - $ref: '#/components/schemas/Attachment'
          description: Listing has Attachment
        vhrUrls:
          type: array
          items:
            type: string
            format: iri
          description: Listing has condition details at VHR URL
      type: object
      required:
        - id
        - odometer
        - initialOfferDate
        - vehicle
    ErrorModel:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: number
            message:
              type: string
        success:
          type: boolean
    Dealer:
      $id: Dealer
      title: Dealer
      examples:
        - location:
            latitude: 39.7487
            longitude: -104.999
          addresses:
            - city:
                name: Denver
                state:
                  code: CO
              zip: '80202'
              line2: Suite 400
              line1: 100 Business Park Ave
      properties:
        id:
          type: string
          description: Customer is uniquely identified by id
        addresses:
          type: array
          items:
            oneOf:
              - type: string
              - $ref: '#/components/schemas/Address'
          description: Customer is located at Addresses
        phoneNumbers:
          type: array
          items:
            type: string
            pattern: ^\+?1?[- ]?\(?([0-9]{3})\)?[- ]?([0-9]{3})-?([0-9]{4})$
          description: Customer has Phone Number
        name:
          type: string
          description: Company has Name
        contacts:
          type: array
          items:
            oneOf:
              - type: string
              - $ref: '#/components/schemas/Contact'
          description: Company has Contact
        location:
          oneOf:
            - type: object
              properties:
                longitude:
                  type: number
                  minimum: -180
                  maximum: 180
                latitude:
                  type: number
                  minimum: -90
                  maximum: 90
              required:
                - longitude
                - latitude
            - $ref: '#/components/schemas/Location'
          description: Dealer is located at Location
      type: object
      required:
        - name
        - id
    Vehicle:
      $id: Vehicle
      examples:
        - vin: 1C4HJXEN5MW592818
          year: 2021
          make: Jeep
          trim: Sport
          spec: vs_4jf8x9jv5c0b
          model: Wrangler
          engine: 3.6L V6
          seatCount: 5
          doorCount: 4
          bodyStyle: SUV
          drivetrain: 4WD
          transmission: Automatic
          interiorColor: Black
          exteriorColor: Red
      required:
        - vin
        - year
        - make
        - transmission
        - engine
        - drivetrain
        - model
        - bodyStyle
      title: Vehicle
      type: object
      properties:
        vin:
          type: string
          description: Vehicle is uniquely identified by vin
        seatCount:
          type: integer
          minimum: 0
          description: Vehicle has Seat Count
        doorCount:
          type: integer
          minimum: 0
          description: Vehicle has Door Count
        interiorColor:
          type: string
          description: Vehicle was manufactured with Interior Color
        exteriorColor:
          type: string
          description: Vehicle was manufactured with Exterior Color
        year:
          type: integer
          description: Vehicle was manufactured in Year
        make:
          type: string
          description: Vehicle is of Make
        trim:
          type: string
          description: Vehicle has Trim level
        transmission:
          type: string
          description: Vehicle has Transmission
        engine:
          type: string
          description: Vehicle has Engine specification
        spec:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/VehicleSpec'
          description: Vehicle has Vehicle Spec
        drivetrain:
          type: string
          description: Vehicle has Drivetrain
        model:
          type: string
          description: Vehicle has Model
        bodyStyle:
          type: string
          description: Vehicle has Body Style
    Attachment:
      $id: Attachment
      required:
        - id
        - data
        - type
        - name
      title: Attachment
      type: object
      properties:
        id:
          type: string
          description: Attachment is uniquely identified by id
        data:
          type: object
          description: Attachment has Data
        type:
          type: string
          minLength: 1
          description: Attachment has Attachment Type
        name:
          type: string
          description: Attachment has Name
    Address:
      $id: Address
      examples:
        - id: adr_2kj49d1msod2
          zip: '62704'
          city:
            name: Springfield
            state:
              code: IL
          line2: Apt 201
          line1: 456 Elm Street
      required:
        - id
        - city
        - zip
        - line1
      title: Address
      type: object
      properties:
        id:
          type: string
          description: Address is uniquely identified by id
        city:
          oneOf:
            - type: object
              properties:
                state:
                  oneOf:
                    - type: string
                    - $ref: '#/components/schemas/State'
                name:
                  type: string
              required:
                - state
                - name
            - $ref: '#/components/schemas/City'
          description: Address is located in City
        zip:
          type: string
          description: Address has ZIP
        line2:
          type: string
          description: Address has Address Line 2
        line1:
          type: string
          description: Address has Address Line 1
    Contact:
      $id: Contact
      examples:
        - id: cnt_8dk3j2ksl9d2
          roles:
            - Manager
            - Sales
          lastName: Smith
          firstName: Alice
      required:
        - id
        - lastName
        - firstName
      title: Contact
      type: object
      properties:
        id:
          type: string
          description: Contact is uniquely identified by id
        agent:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/Agent'
          description: Contact is automated Agent
        address:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/Address'
          description: Contact has Address
        primaryPhoneNumber:
          type: string
          pattern: ^\+?1?[- ]?\(?([0-9]{3})\)?[- ]?([0-9]{3})-?([0-9]{4})$
          description: Contact has Primary Phone Number
        primaryEmail:
          type: string
          format: idn-email
          description: Contact has Primary Email
        lastName:
          type: string
          description: Contact has Last Name
        firstName:
          type: string
          description: Contact has First Name
        emails:
          type: array
          items:
            type: string
            format: idn-email
          description: Contact has Email
        phoneNumbers:
          type: array
          items:
            type: string
            pattern: ^\+?1?[- ]?\(?([0-9]{3})\)?[- ]?([0-9]{3})-?([0-9]{4})$
          description: Contact has Phone Number
        roles:
          type: array
          items:
            type: string
          description: Contact has Role
    Location:
      $id: Location
      title: Location
      examples:
        - latitude: 37.7749295
          longitude: -122.4194155
      properties:
        longitude:
          type: number
          minimum: -180
          maximum: 180
          description: Location is uniquely identified by Longitude
        latitude:
          type: number
          minimum: -90
          maximum: 90
          description: Location is uniquely identified by Latitude
      type: object
      required:
        - longitude
        - latitude
    VehicleSpec:
      $id: VehicleSpec
      title: Vehicle Spec
      examples:
        - id: vs_4jf8x9jv5c0b
          make: Toyota
          year: 2022
          trim: SE
          model: Camry
          engine: 2.5L 4-cylinder
          squishVin: 4T1BF1FK5H
          bodyStyle: Sedan
          drivetrain: FWD
          transmission: Automatic
          exteriorColors:
            - Black
            - Silver
          interiorColors:
            - Black
            - Gray
      properties:
        id:
          type: string
          description: Vehicle Spec is uniquely identified by id
        model:
          type: string
          description: Vehicle Spec has Model
        make:
          type: string
          description: Vehicle Spec has Make
        squishVin:
          type: string
          minLength: 10
          maxLength: 10
          description: Vehicle Spec has Squish VIN
        year:
          type: integer
          description: Vehicle Spec has Year
        engine:
          type: string
          description: Vehicle Spec has Engine specifications
        drivetrain:
          type: string
          description: Vehicle Spec has Drivetrain
        bodyStyle:
          type: string
          description: Vehicle Spec has Body Style
        transmission:
          type: string
          description: Vehicle Spec has Transmission
        trim:
          type: string
          description: Vehicle Spec has Trim
        exteriorColors:
          type: array
          items:
            type: string
          description: Vehicle Spec has Exterior Color
        interiorColors:
          type: array
          items:
            type: string
          description: Vehicle Spec has Interior Color
      type: object
      required:
        - id
        - model
        - make
        - year
        - engine
        - drivetrain
        - bodyStyle
        - transmission
    State:
      $id: State
      title: State
      properties:
        code:
          type: string
          description: State is uniquely identified by State Code
      type: object
      required:
        - code
    City:
      $id: City
      examples:
        - name: Springfield
          state:
            code: IL
      required:
        - state
        - name
      title: City
      type: object
      properties:
        state:
          oneOf:
            - type: string
            - $ref: '#/components/schemas/State'
          description: City is uniquely identified by State
        name:
          type: string
          description: City is uniquely identified by Name
    Agent:
      $id: Agent
      examples:
        - id: ai_3jks93ndk3s9
          model: gpt-4o
          prompt: Respond to the customer service request
          functions:
            - fnc_ed904md03684
      required:
        - id
        - model
      title: Agent
      type: object
      properties:
        id:
          type: string
          description: Agent is uniquely identified by id
        prompt:
          type: string
          description: Agent has Prompt
        model:
          type: string
          description: Agent has Agent Model
        functions:
          type: array
          items:
            type: string
          description: Agent has Function

````