> ## 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.

# Update multiple Searches

> Update all Searches matching the where query

<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.unknown()
  ```
</Accordion>


## OpenAPI

````yaml patch /searches
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:
    patch:
      tags:
        - searches
      summary: Update multiple Searches
      description: Update all Searches matching the where query
      parameters:
        - name: sort
          in: query
          description: sort by field
          schema:
            type: string
          required: false
        - name: where
          in: query
          description: >-
            pass a where query to constrain returned documents (complex type,
            see documentation)
          style: deepObject
          explode: true
          allowReserved: true
          schema:
            $ref: '#/components/schemas/where'
          required: true
        - name: limit
          in: query
          description: limit the returned documents to a certain number
          schema:
            type: number
          required: false
        - name: page
          in: query
          description: get a specific page of documents
          schema:
            type: number
          required: false
        - 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
      requestBody:
        $ref: '#/components/requestBodies/searchesRequest'
      responses:
        '200':
          $ref: '#/components/responses/searchesBulkResponse'
      security:
        - apiKeyAuth: []
components:
  schemas:
    where:
      title: Where clause
      type: object
      additionalProperties:
        anyOf:
          - type: object
            properties:
              equals: {}
            additionalProperties: false
          - type: object
            properties:
              not_equals: {}
            additionalProperties: false
          - type: object
            properties:
              greater_than:
                anyOf:
                  - type: string
                  - type: number
            additionalProperties: false
          - type: object
            properties:
              greater_than_equal:
                anyOf:
                  - type: string
                  - type: number
            additionalProperties: false
          - type: object
            properties:
              less_than:
                anyOf:
                  - type: string
                  - type: number
            additionalProperties: false
          - type: object
            properties:
              less_than_equal:
                anyOf:
                  - type: string
                  - type: number
            additionalProperties: false
          - type: object
            properties:
              like:
                type: string
            additionalProperties: false
          - type: object
            properties:
              contains:
                type: string
            additionalProperties: false
          - type: object
            properties:
              in:
                type: string
            additionalProperties: false
          - type: object
            properties:
              not_in:
                type: string
            additionalProperties: false
          - type: object
            properties:
              exists:
                type: boolean
            additionalProperties: false
          - type: object
            properties:
              near:
                type: string
            additionalProperties: false
      properties:
        or:
          type: array
          items:
            title: Where clause
            type: object
            additionalProperties:
              anyOf:
                - type: object
                  properties: {}
                  additionalProperties: false
                - type: object
                  properties: {}
                  additionalProperties: false
                - type: object
                  properties:
                    greater_than:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    greater_than_equal:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    less_than:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    less_than_equal:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    like:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    contains:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    in:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    not_in:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    exists:
                      type: boolean
                  additionalProperties: false
                - type: object
                  properties:
                    near:
                      type: string
                  additionalProperties: false
            properties:
              or:
                type: array
              and:
                type: array
            example:
              or:
                - color:
                    equals: mint
                - and:
                    - color:
                        equals: white
                    - featured:
                        equals: false
        and:
          type: array
          items:
            title: Where clause
            type: object
            additionalProperties:
              anyOf:
                - type: object
                  properties: {}
                  additionalProperties: false
                - type: object
                  properties: {}
                  additionalProperties: false
                - type: object
                  properties:
                    greater_than:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    greater_than_equal:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    less_than:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    less_than_equal:
                      anyOf:
                        - type: string
                        - type: number
                  additionalProperties: false
                - type: object
                  properties:
                    like:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    contains:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    in:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    not_in:
                      type: string
                  additionalProperties: false
                - type: object
                  properties:
                    exists:
                      type: boolean
                  additionalProperties: false
                - type: object
                  properties:
                    near:
                      type: string
                  additionalProperties: false
            properties:
              or:
                type: array
              and:
                type: array
            example:
              or:
                - color:
                    equals: mint
                - and:
                    - color:
                        equals: white
                    - featured:
                        equals: false
      example:
        or:
          - color:
              equals: mint
          - and:
              - color:
                  equals: white
              - featured:
                  equals: false
    searches:
      additionalProperties: false
      title: Search
      type: object
      properties:
        lead:
          oneOf:
            - type: number
              nullable: true
            - additionalProperties: false
              title: Lead
              type: object
              properties:
                processStatuses:
                  enum:
                    - Qualified Lead
                    - Actively Communicating
                    - First Communication Attempt (phone and text)
                    - Second Communication Attempt
                    - On Hold
                    - Lost
                  type: string
                  nullable: true
                reason:
                  enum:
                    - Do Not Contact
                    - Duplicate
                    - Looking For Business Financing
                    - Looking For Listings
                    - Looking For Personal Financing
                    - Not Responding
                    - Test
                    - Bad Credit
                  type: string
                  nullable: true
                latestEvent:
                  type: number
                  nullable: true
                notes:
                  type: string
                  nullable: true
                statusTracker:
                  type: string
                  nullable: true
                searches:
                  items:
                    type: number
                  type: array
                  nullable: true
                attachments:
                  type: string
                  nullable: true
                firstName:
                  type: string
                  nullable: true
                lastName:
                  type: string
                  nullable: true
                phone:
                  type: string
                  nullable: true
                call:
                  type: string
                  nullable: true
                zipcode:
                  type: string
                  nullable: true
                email:
                  type: string
                  nullable: true
                loginEmail:
                  type: string
                  nullable: true
                purchaseOption:
                  type: string
                  nullable: true
                timeToPurchase:
                  items:
                    enum:
                      - ASAP
                      - This week
                      - Within 1-2 weeks
                      - Within 2-4 weeks
                      - Asap
                      - This Week
                      - Within 1-2 Weeks
                      - Within 2-4 Weeks
                      - within 1-2 weeks
                      - within 2-4 weeks
                      - within 1-2 months
                      - other
                      - this week
                      - asap
                      - 2+ months
                      - just browsing
                      - 1-2 months
                      - 1-2 weeks
                      - 2-4 weeks
                    type: string
                  type: array
                  nullable: true
                monthlyPayment:
                  type: number
                  nullable: true
                budgetLower:
                  type: string
                  nullable: true
                budgetUpper:
                  type: string
                  nullable: true
                mileageLower:
                  type: number
                  nullable: true
                mileageUpper:
                  type: number
                  nullable: true
                cashDown:
                  type: number
                  nullable: true
                newOrUsed:
                  type: string
                  nullable: true
                bodyStyle:
                  items:
                    enum:
                      - truck
                      - car
                      - van
                      - suv
                      - wagon
                    type: string
                  type: array
                  nullable: true
                carStyle:
                  items:
                    enum:
                      - sedan
                      - coupe
                      - convertible
                      - hatchback
                    type: string
                  type: array
                  nullable: true
                truckStyle:
                  items:
                    enum:
                      - crew
                      - reg
                      - extended
                    type: string
                  type: array
                  nullable: true
                suvStyle:
                  items:
                    enum:
                      - small/compact
                      - mid-size
                      - large/full-size
                    type: string
                  type: array
                  nullable: true
                vanStyle:
                  items:
                    enum:
                      - cargo
                      - passenger
                      - conversion
                    type: string
                  type: array
                  nullable: true
                yearLower:
                  type: number
                  nullable: true
                yearUpper:
                  type: number
                  nullable: true
                year:
                  type: number
                  nullable: true
                make:
                  type: string
                  nullable: true
                model:
                  type: string
                  nullable: true
                exterior:
                  items:
                    enum:
                      - Silver
                      - White
                      - Black
                      - Brown
                      - Blue
                      - Orange
                      - Red
                      - Green
                      - Any color
                      - Beige
                      - Gold
                      - Gray
                      - Light Blue
                    type: string
                  type: array
                  nullable: true
                interior:
                  items:
                    enum:
                      - Black
                      - Gray
                      - Tan
                      - Beige
                      - Blue
                      - Brown
                      - Red
                      - White
                      - Any color
                      - Ivory
                      - Cream
                    type: string
                  type: array
                  nullable: true
                fuelType:
                  items:
                    enum:
                      - Gasoline
                      - Electric
                      - Hybrid
                      - gasoline
                      - flex fuel
                      - diesel
                      - other
                      - hybrid
                      - electric
                    type: string
                  type: array
                  nullable: true
                drivetrain:
                  items:
                    enum:
                      - Four Wheel Drive
                      - Rear Wheel Drive
                      - Front Wheel Drive
                      - all wheel drive
                      - front wheel drive
                      - rear wheel drive
                    type: string
                  type: array
                  nullable: true
                transmission:
                  items:
                    enum:
                      - Automatic
                      - Manual
                      - automatic
                      - cvt
                      - manual
                    type: string
                  type: array
                  nullable: true
                comfort:
                  items:
                    enum:
                      - Leather/premium Seats
                      - Heated Steering Wheel
                      - leather/premium seats
                      - heated steering wheel
                      - ventilated or cooled seats
                      - heated seats
                      - dual-zone/climate control
                      - power-adjustable seats
                      - noise-cancelling technology
                      - massage seats
                    type: string
                  type: array
                  nullable: true
                safety:
                  items:
                    enum:
                      - Adaptive Cruise Control
                      - Blind Spot Monitor
                      - lane departure warning
                      - back up camera
                      - 360 camera
                      - park assist
                      - heads-up display
                      - adaptive cruise control
                      - blind spot monitor
                    type: string
                  type: array
                  nullable: true
                entertainment:
                  items:
                    enum:
                      - Premium Audio System
                      - Entertainment Package/dvd
                      - premium audio system
                      - apple carplay/android auto
                      - bluetooth
                      - auxiliary input
                      - usb ports
                      - wireless device charging
                      - wi-fi hotspot
                      - navigation system
                      - entertainment package/dvd
                      - satellite radio
                    type: string
                  type: array
                  nullable: true
                utility:
                  items:
                    enum:
                      - Towing Package
                      - Sunroof/moonroof/panoramic Roof
                      - towing package
                      - sunroof/moonroof/panoramic roof
                      - adaptive suspension
                      - 4 wheel drive
                      - 3rd row seats
                      - handicap accessible
                    type: string
                  type: array
                  nullable: true
                subscribe:
                  type: boolean
                  nullable: true
                agree:
                  type: boolean
                  nullable: true
                customer:
                  type: string
                  nullable: true
                messageNotifications:
                  type: boolean
                  nullable: true
                emailNotifications:
                  type: boolean
                  nullable: true
                emailAlerts:
                  type: boolean
                  nullable: true
                emailOffers:
                  type: boolean
                  nullable: true
                leadEvents:
                  items:
                    type: number
                  type: array
                  nullable: true
                cfZipcode:
                  type: string
                  nullable: true
                cfState:
                  type: string
                  nullable: true
                cfCity:
                  type: string
                  nullable: true
                completedDate:
                  type: string
                  nullable: true
                localTime:
                  type: string
                  nullable: true
                trade:
                  items:
                    type: number
                  type: array
                  nullable: true
                messages:
                  items:
                    type: number
                  type: array
                  nullable: true
                creditScore:
                  type: string
                  nullable: true
                contactScore:
                  type: string
                  nullable: true
                contactBelongsTo:
                  type: string
                  nullable: true
                contactType:
                  type: string
                  nullable: true
                contactValid:
                  type: boolean
                  nullable: true
                testingCustomer:
                  type: boolean
                  nullable: true
                estimatedAgeRange:
                  type: string
                  nullable: true
                estimatedAddress:
                  type: string
                  nullable: true
                estimatedZipcode:
                  type: string
                  nullable: true
                meetings:
                  items:
                    type: number
                  type: array
                  nullable: true
                makeAndModel:
                  type: string
                  nullable: true
                conversation:
                  type: string
                  nullable: true
                city:
                  type: string
                  nullable: true
                state:
                  type: string
                  nullable: true
                preApprovalId:
                  type: string
                  nullable: true
                vdpEmails:
                  items:
                    type: number
                  type: array
                  nullable: true
                favorites:
                  items:
                    type: number
                  type: array
                  nullable: true
                calls:
                  items:
                    type: number
                  type: array
                  nullable: true
                salesRep:
                  type: number
                  nullable: true
                preApprovals:
                  items:
                    type: number
                  type: array
                  nullable: true
                anonymousId:
                  type: string
                  nullable: true
                manual:
                  type: boolean
                  nullable: true
                trim:
                  type: string
                  nullable: true
                oneOwner:
                  type: boolean
                  nullable: true
                customers:
                  type: number
                  nullable: true
                updatedAt:
                  type: string
                createdAt:
                  type: string
              required:
                - id
                - updatedAt
                - createdAt
        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:
            oneOf:
              - type: number
              - additionalProperties: false
                title: Vehicle
                type: object
                properties:
                  name:
                    type: string
                    nullable: true
                  vin:
                    type: string
                    nullable: true
                  customer:
                    type: number
                    nullable: true
                  status:
                    items:
                      enum:
                        - Bought at Auction
                        - Inspected
                        - Transport to Inspection
                        - Transport to Customer
                        - Arbitration
                        - Bid Placed
                        - SOLD TO CUSTOMER
                        - Identified as potential option for customer
                        - Taken in on Trade
                        - Trade sold at Auction
                        - Trade sold Retail
                      type: string
                    type: array
                    nullable: true
                  deals:
                    items:
                      type: number
                    type: array
                    nullable: true
                  year:
                    type: string
                    nullable: true
                  make:
                    type: string
                    nullable: true
                  model:
                    type: string
                    nullable: true
                  trim:
                    type: string
                    nullable: true
                  style:
                    type: string
                    nullable: true
                  body:
                    type: string
                    nullable: true
                  drivetrain:
                    type: string
                    nullable: true
                  engine:
                    type: string
                    nullable: true
                  transmission:
                    type: string
                    nullable: true
                  interior:
                    type: string
                    nullable: true
                  exterior:
                    type: string
                    nullable: true
                  listings:
                    items:
                      type: number
                    type: array
                    nullable: true
                  serviceQuotes:
                    items:
                      type: number
                    type: array
                    nullable: true
                  tenant:
                    type: number
                    nullable: true
                  trades:
                    items:
                      type: number
                    type: array
                    nullable: true
                  createdBy:
                    type: number
                    nullable: true
                  transportServiceOrders:
                    type: string
                    nullable: true
                  transportServiceOrders2:
                    items:
                      type: number
                    type: array
                    nullable: true
                  updatedAt:
                    type: string
                  createdAt:
                    type: string
                required:
                  - id
                  - updatedAt
                  - createdAt
          type: array
          nullable: true
        lastModifiedBy:
          type: number
        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
  requestBodies:
    searchesRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/searches'
  responses:
    searchesBulkResponse:
      description: ok
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
              errors:
                type: array
                items:
                  type: string
              docs:
                type: array
                items:
                  $ref: '#/components/schemas/searches'
  securitySchemes:
    apiKeyAuth:
      in: header
      type: apiKey
      name: Authorization

````