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

# Deletes an existing Search

> Deletes an existing Search

<Accordion title="Usage with the Drivly SDK" icon="code-simple">
  <Note>
    <span class="font-medium">Make sure you install our SDK first. You can find out how, and more [here](/commerce/sdk).</span>
  </Note>

  ```typescript theme={null}
  import { SDK } from '@drivly/commerce'
  import type { searches } from '@drivly/commerce'

  const sdk = new SDK(...)

  const searches = await sdk.searches.delete(searchesId: string): Promise<void>
  ```
</Accordion>


## OpenAPI

````yaml delete /searches/{id}
openapi: 3.0.3
info:
  title: Drivly Commerce API
  version: 1.0.0
  description: API for the Driv.ly experience
  contact:
    name: Drivly
    url: https://driv.ly
    email: support@driv.ly
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://commerce.driv.ly/api
security: []
paths:
  /searches/{id}:
    delete:
      tags:
        - searches
      summary: Deletes an existing Search
      description: Deletes an existing Search
      parameters:
        - name: id
          in: path
          description: id of the Search
          required: true
          schema:
            type: string
        - name: depth
          in: query
          description: number of levels to automatically populate relationships and uploads
          schema:
            type: number
        - name: locale
          in: query
          description: retrieves document(s) in a specific locale
          schema:
            type: string
        - name: fallback-locale
          in: query
          description: specifies a fallback locale if no locale value exists
          schema:
            type: string
      responses:
        '200':
          $ref: '#/components/responses/searchesUpsertConfirmationResponse'
        '404':
          $ref: '#/components/responses/NotFoundErrorResponse'
      security:
        - apiKeyAuth: []
components:
  responses:
    searchesUpsertConfirmationResponse:
      description: ok
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/searchesUpsertConfirmation'
    NotFoundErrorResponse:
      description: not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  schemas:
    searchesUpsertConfirmation:
      type: object
      title: Search upsert confirmation
      properties:
        doc:
          additionalProperties: false
          title: Search
          type: object
          properties:
            lead:
              type: number
              nullable: true
            status:
              enum:
                - On Hold
                - Searching
                - Results Found
                - Search Cancelled
              type: string
              nullable: true
            retailListingUrls:
              type: string
              nullable: true
            year:
              type: string
              nullable: true
            make:
              type: string
              nullable: true
            model:
              type: string
              nullable: true
            trim:
              type: string
              nullable: true
            bodyStyle:
              items:
                enum:
                  - car
                  - suv
                  - truck
                  - van
                  - wagon
                type: string
              type: array
              nullable: true
            drive:
              items:
                enum:
                  - 4WD
                  - AWD
                  - 2WD
                type: string
              type: array
              nullable: true
            transmission:
              items:
                enum:
                  - Manual
                  - Automatic
                type: string
              type: array
              nullable: true
            maxPrice:
              type: string
              nullable: true
            maxMiles:
              type: number
              nullable: true
            newOrUsed:
              items:
                enum:
                  - New
                  - Certified
                  - Used
                type: string
              type: array
              nullable: true
            minimumGrade:
              type: number
              nullable: true
            requiredOptions:
              items:
                enum:
                  - Heated Seats
                  - No crazy colors
                  - Tow package
                  - Heated wheel
                  - Panoramic sunroof
                  - Leather Seats
                  - Bluetooth
                  - Backup Camera
                  - Apple Play
                  - Cooled Seats
                type: string
              type: array
              nullable: true
            acceptableColors:
              items:
                enum:
                  - Anti-Black
                  - Anti-Gray
                  - Anti-Red
                  - Anti-Silver
                  - Anti-White
                  - Beige
                  - Black
                  - Blue
                  - Brown
                  - Gold
                  - Gray
                  - Green
                  - Light Blue
                  - Orange
                  - Red
                  - Silver
                  - White
                  - Yellow
                type: string
              type: array
              nullable: true
            acceptableInterior:
              items:
                enum:
                  - Beige
                  - Black
                  - Brown
                  - Cream
                  - Gray
                  - Ivory
                  - Red
                  - Tan
                  - White
                  - Blue
                  - Burgundy
                  - Charcoal
                  - Off-White
                type: string
              type: array
              nullable: true
            proposedVehicles:
              type: string
              nullable: true
            vehicles:
              items:
                type: number
              type: array
              nullable: true
            lastModifiedBy:
              type: number
              nullable: true
            seats:
              type: string
              nullable: true
            updateRequested:
              type: string
              nullable: true
            oneOwner:
              type: boolean
              nullable: true
            priority:
              type: boolean
              nullable: true
            updatedAt:
              type: string
            createdAt:
              type: string
          required:
            - id
            - updatedAt
            - createdAt
        message:
          type: string
      required:
        - doc
        - message
    error:
      title: Error response message
      type: object
      additionalProperties: false
      properties:
        errors:
          type: array
          items:
            type: object
            additionalProperties: false
            properties:
              message:
                type: string
            required:
              - message
      required:
        - errors
  securitySchemes:
    apiKeyAuth:
      in: header
      type: apiKey
      name: Authorization

````