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

# Updates a Contact

> Updates a Contact

<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 { contacts } from '@drivly/commerce'

  const sdk = new SDK(...)

  const contacts = await sdk.contacts.update(contactsId: string, data: contacts): Promise<contacts>
  ```
</Accordion>


## OpenAPI

````yaml patch /contacts/{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:
  /contacts/{id}:
    patch:
      tags:
        - contacts
      summary: Updates a Contact
      description: Updates a Contact
      parameters:
        - name: id
          in: path
          description: id of the Contact
          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
      requestBody:
        $ref: '#/components/requestBodies/contactsRequest'
      responses:
        '200':
          $ref: '#/components/responses/contactsUpsertConfirmationResponse'
        '404':
          $ref: '#/components/responses/NotFoundErrorResponse'
      security:
        - apiKeyAuth: []
components:
  requestBodies:
    contactsRequest:
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/contacts'
  responses:
    contactsUpsertConfirmationResponse:
      description: ok
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/contactsUpsertConfirmation'
    NotFoundErrorResponse:
      description: not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  schemas:
    contacts:
      additionalProperties: false
      title: Contact
      type: object
      properties:
        name:
          type: string
          nullable: true
        status:
          enum:
            - Pending
            - Active
            - Inactive
          type: string
          nullable: true
        type:
          items:
            enum:
              - Auction
              - Mechanic
              - Operations
              - Back Office
              - Transporter
              - Detailer
              - Customer
              - Dealer
            type: string
          type: array
          nullable: true
        customer:
          oneOf:
            - type: number
              nullable: true
            - additionalProperties: false
              title: Customer
              type: object
              properties:
                customerId:
                  type: string
                  nullable: true
                leads:
                  items:
                    type: number
                  type: array
                  nullable: true
                address:
                  type: number
                  nullable: true
                shippingContact:
                  type: number
                  nullable: true
                deals:
                  items:
                    type: number
                  type: array
                  nullable: true
                createdBy:
                  type: number
                  nullable: true
                lastModifiedBy:
                  type: number
                  nullable: true
                email:
                  type: string
                  nullable: true
                phone:
                  type: string
                  nullable: true
                insurancePolicies:
                  items:
                    type: number
                  type: array
                  nullable: true
                tenants:
                  items:
                    type: number
                  type: array
                  nullable: true
                consumerStatus:
                  enum:
                    - SOLD
                    - Pending
                    - Working
                    - Cold
                    - LOST
                    - Duplicate
                    - DNC
                  type: string
                  nullable: true
                consumerFirstName:
                  type: string
                  nullable: true
                consumerMiddleName:
                  type: string
                  nullable: true
                consumerLastName:
                  type: string
                  nullable: true
                consumerSuffix:
                  type: string
                  nullable: true
                consumerDateOfBirth:
                  type: string
                  nullable: true
                consumerEducationLevel:
                  type: string
                  nullable: true
                consumerVehicles:
                  items:
                    type: number
                  type: array
                  nullable: true
                consumerPhoneType:
                  type: string
                  nullable: true
                consumerDriversLicense:
                  type: string
                  nullable: true
                consumerDriversLicenseState:
                  type: string
                  nullable: true
                consumerDriversLicenseNumber:
                  type: string
                  nullable: true
                consumerDriversLicenseExp:
                  type: string
                  nullable: true
                consumerDriversLicenseExpiration:
                  type: string
                  nullable: true
                consumerPreApprovals:
                  items:
                    type: number
                  type: array
                  nullable: true
                consumerGetPreApproved:
                  type: string
                  nullable: true
                consumerProvideProofOfInsurance:
                  type: string
                  nullable: true
                consumerLoginToBank:
                  type: string
                  nullable: true
                consumerConnectCar:
                  type: string
                  nullable: true
                consumerProvideProofOfIncome:
                  type: string
                  nullable: true
                consumerConsumerId:
                  type: string
                  nullable: true
                consumerCreditApplicationId:
                  type: string
                  nullable: true
                deals2:
                  items:
                    type: number
                  type: array
                  nullable: true
                consumerSocialSecurity:
                  type: string
                  nullable: true
                consumerDriversLicenceState:
                  type: string
                  nullable: true
                consumerIncome:
                  type: number
                  nullable: true
                consumerIncomeInterval:
                  type: string
                  nullable: true
                consumerEmploymentStatusCode:
                  type: string
                  nullable: true
                consumerEmploymentDuration:
                  type: number
                  nullable: true
                consumerEmployerName:
                  type: string
                  nullable: true
                consumerEmployerPhone:
                  type: string
                  nullable: true
                consumerEmploymentTitle:
                  type: string
                  nullable: true
                consumerPreviousEmployerName:
                  type: string
                  nullable: true
                consumerPreviousEmployerPhone:
                  type: string
                  nullable: true
                consumerPreviousEmploymentTitle:
                  type: string
                  nullable: true
                consumerPreviousEmploymentDuration:
                  type: number
                  nullable: true
                consumerPreviousEmploymentincome:
                  type: number
                  nullable: true
                consumerTimeAtResidence:
                  type: number
                  nullable: true
                consumerPreviousAddressLine1:
                  type: string
                  nullable: true
                consumerPreviousAddressLine2:
                  type: string
                  nullable: true
                consumerPreviousAddressCity:
                  type: string
                  nullable: true
                consumerPreviousAddressState:
                  type: string
                  nullable: true
                consumerPreviousZip:
                  type: string
                  nullable: true
                consumerPreviousAddressDuration:
                  type: number
                  nullable: true
                consumerResidenceType:
                  type: string
                  nullable: true
                consumerRentMortgage:
                  type: number
                  nullable: true
                consumerOtherIncomeDescription:
                  type: string
                  nullable: true
                consumerOtherIncomeAmount:
                  type: number
                  nullable: true
                consumerLeadSource:
                  items:
                    enum:
                      - Car Concierge (Andrew)
                      - Driv.ly Website
                      - Self Generated
                      - Referral
                      - Rocket
                    type: string
                  type: array
                  nullable: true
                companyName:
                  type: string
                  nullable: true
                companyDealerDeals:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyDealsFacilitated:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyInsuranceQuotes:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyType:
                  items:
                    enum:
                      - Dealer
                      - Concierge
                      - Broker
                      - Partner
                      - Auction
                      - Affiliate
                      - Insurer
                      - Mobile Detailer
                      - Last Mile Transporter
                      - Service Provider
                      - Lender
                    type: string
                  type: array
                  nullable: true
                companyWebsite:
                  type: string
                  nullable: true
                companyStripeConnectLink:
                  type: string
                  nullable: true
                companyCustomerPortalLink:
                  type: string
                  nullable: true
                companyServiceQuotes:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyServiceOrders:
                  type: string
                  nullable: true
                companyServiceQuotesPartners:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyVisibility:
                  type: string
                  nullable: true
                companyTenants2:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyCustomer:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyTrades:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyTenants3:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyPartnerBrand:
                  type: number
                  nullable: true
                companyDeals3:
                  items:
                    type: number
                  type: array
                  nullable: true
                companyRouteOneDealer:
                  type: string
                  nullable: true
                companyTransportServiceOrders:
                  items:
                    type: number
                  type: array
                  nullable: true
                updatedAt:
                  type: string
                createdAt:
                  type: string
              required:
                - id
                - updatedAt
                - createdAt
        addresses:
          oneOf:
            - type: number
              nullable: true
            - additionalProperties: false
              title: Address
              type: object
              properties:
                name:
                  type: string
                  nullable: true
                street:
                  type: string
                  nullable: true
                suite:
                  type: string
                  nullable: true
                city:
                  type: string
                  nullable: true
                state:
                  type: string
                  nullable: true
                zip:
                  type: string
                  nullable: true
                country:
                  type: string
                  nullable: true
                deals:
                  items:
                    type: number
                  type: array
                  nullable: true
                tenants:
                  type: number
                  nullable: true
                customer:
                  items:
                    type: number
                  type: array
                  nullable: true
                contact:
                  items:
                    type: number
                  type: array
                  nullable: true
                updatedAt:
                  type: string
                createdAt:
                  type: string
              required:
                - id
                - updatedAt
                - createdAt
        transportServiceOrders:
          items:
            oneOf:
              - type: number
              - additionalProperties: false
                title: ServiceOrder
                type: object
                properties:
                  name:
                    type: string
                    nullable: true
                  type:
                    items:
                      enum:
                        - Condition Inspection
                        - Last Mile Delivery
                        - Long Haul Transport
                        - Mechanical Inspection
                        - Post Sale Inspection
                        - Pre-Paid Maintenance
                        - Pre-Purchase Inspection
                        - Safety Inspection
                        - Vehicle Service Contract
                        - Wash And Detail
                      type: string
                    type: array
                    nullable: true
                  customer:
                    items:
                      type: number
                    type: array
                    nullable: true
                  serviceQuotes:
                    type: number
                    nullable: true
                  paymentLink:
                    type: string
                    nullable: true
                  vin:
                    type: number
                    nullable: true
                  status:
                    enum:
                      - Quoted
                      - Pending
                      - In Review
                      - Active
                      - Dispatched
                      - En Route
                      - Complete
                      - Hold
                      - Cancel
                      - Error
                    type: string
                    nullable: true
                  error:
                    type: string
                    nullable: true
                  orderId:
                    type: string
                    nullable: true
                  price:
                    type: string
                    nullable: true
                  rush:
                    type: boolean
                    nullable: true
                  attachments:
                    items:
                      type: number
                    type: array
                    nullable: true
                  quoteExpiration:
                    type: string
                    nullable: true
                  ordered:
                    type: string
                    nullable: true
                  start:
                    type: string
                    nullable: true
                  due:
                    type: string
                    nullable: true
                  consignor:
                    type: number
                    nullable: true
                  billTo:
                    type: number
                    nullable: true
                  origin:
                    type: number
                    nullable: true
                  destination:
                    type: number
                    nullable: true
                  deals:
                    items:
                      type: number
                    type: array
                    nullable: true
                  orderLink:
                    type: string
                    nullable: true
                  tenant:
                    items:
                      type: number
                    type: array
                    nullable: true
                  updatedAt:
                    type: string
                  createdAt:
                    type: string
                required:
                  - id
                  - updatedAt
                  - createdAt
          type: array
          nullable: true
        transportServiceOrders2:
          items:
            oneOf:
              - type: number
              - additionalProperties: false
                title: ServiceOrder
                type: object
                properties:
                  name:
                    type: string
                    nullable: true
                  type:
                    items:
                      enum:
                        - Condition Inspection
                        - Last Mile Delivery
                        - Long Haul Transport
                        - Mechanical Inspection
                        - Post Sale Inspection
                        - Pre-Paid Maintenance
                        - Pre-Purchase Inspection
                        - Safety Inspection
                        - Vehicle Service Contract
                        - Wash And Detail
                      type: string
                    type: array
                    nullable: true
                  customer:
                    items:
                      type: number
                    type: array
                    nullable: true
                  serviceQuotes:
                    type: number
                    nullable: true
                  paymentLink:
                    type: string
                    nullable: true
                  vin:
                    type: number
                    nullable: true
                  status:
                    enum:
                      - Quoted
                      - Pending
                      - In Review
                      - Active
                      - Dispatched
                      - En Route
                      - Complete
                      - Hold
                      - Cancel
                      - Error
                    type: string
                    nullable: true
                  error:
                    type: string
                    nullable: true
                  orderId:
                    type: string
                    nullable: true
                  price:
                    type: string
                    nullable: true
                  rush:
                    type: boolean
                    nullable: true
                  attachments:
                    items:
                      type: number
                    type: array
                    nullable: true
                  quoteExpiration:
                    type: string
                    nullable: true
                  ordered:
                    type: string
                    nullable: true
                  start:
                    type: string
                    nullable: true
                  due:
                    type: string
                    nullable: true
                  consignor:
                    type: number
                    nullable: true
                  billTo:
                    type: number
                    nullable: true
                  origin:
                    type: number
                    nullable: true
                  destination:
                    type: number
                    nullable: true
                  deals:
                    items:
                      type: number
                    type: array
                    nullable: true
                  orderLink:
                    type: string
                    nullable: true
                  tenant:
                    items:
                      type: number
                    type: array
                    nullable: true
                  updatedAt:
                    type: string
                  createdAt:
                    type: string
                required:
                  - id
                  - updatedAt
                  - createdAt
          type: array
          nullable: true
        transportServiceOrders3:
          items:
            oneOf:
              - type: number
              - additionalProperties: false
                title: ServiceOrder
                type: object
                properties:
                  name:
                    type: string
                    nullable: true
                  type:
                    items:
                      enum:
                        - Condition Inspection
                        - Last Mile Delivery
                        - Long Haul Transport
                        - Mechanical Inspection
                        - Post Sale Inspection
                        - Pre-Paid Maintenance
                        - Pre-Purchase Inspection
                        - Safety Inspection
                        - Vehicle Service Contract
                        - Wash And Detail
                      type: string
                    type: array
                    nullable: true
                  customer:
                    items:
                      type: number
                    type: array
                    nullable: true
                  serviceQuotes:
                    type: number
                    nullable: true
                  paymentLink:
                    type: string
                    nullable: true
                  vin:
                    type: number
                    nullable: true
                  status:
                    enum:
                      - Quoted
                      - Pending
                      - In Review
                      - Active
                      - Dispatched
                      - En Route
                      - Complete
                      - Hold
                      - Cancel
                      - Error
                    type: string
                    nullable: true
                  error:
                    type: string
                    nullable: true
                  orderId:
                    type: string
                    nullable: true
                  price:
                    type: string
                    nullable: true
                  rush:
                    type: boolean
                    nullable: true
                  attachments:
                    items:
                      type: number
                    type: array
                    nullable: true
                  quoteExpiration:
                    type: string
                    nullable: true
                  ordered:
                    type: string
                    nullable: true
                  start:
                    type: string
                    nullable: true
                  due:
                    type: string
                    nullable: true
                  consignor:
                    type: number
                    nullable: true
                  billTo:
                    type: number
                    nullable: true
                  origin:
                    type: number
                    nullable: true
                  destination:
                    type: number
                    nullable: true
                  deals:
                    items:
                      type: number
                    type: array
                    nullable: true
                  orderLink:
                    type: string
                    nullable: true
                  tenant:
                    items:
                      type: number
                    type: array
                    nullable: true
                  updatedAt:
                    type: string
                  createdAt:
                    type: string
                required:
                  - id
                  - updatedAt
                  - createdAt
          type: array
          nullable: true
        transportServiceOrders4:
          items:
            oneOf:
              - type: number
              - additionalProperties: false
                title: ServiceOrder
                type: object
                properties:
                  name:
                    type: string
                    nullable: true
                  type:
                    items:
                      enum:
                        - Condition Inspection
                        - Last Mile Delivery
                        - Long Haul Transport
                        - Mechanical Inspection
                        - Post Sale Inspection
                        - Pre-Paid Maintenance
                        - Pre-Purchase Inspection
                        - Safety Inspection
                        - Vehicle Service Contract
                        - Wash And Detail
                      type: string
                    type: array
                    nullable: true
                  customer:
                    items:
                      type: number
                    type: array
                    nullable: true
                  serviceQuotes:
                    type: number
                    nullable: true
                  paymentLink:
                    type: string
                    nullable: true
                  vin:
                    type: number
                    nullable: true
                  status:
                    enum:
                      - Quoted
                      - Pending
                      - In Review
                      - Active
                      - Dispatched
                      - En Route
                      - Complete
                      - Hold
                      - Cancel
                      - Error
                    type: string
                    nullable: true
                  error:
                    type: string
                    nullable: true
                  orderId:
                    type: string
                    nullable: true
                  price:
                    type: string
                    nullable: true
                  rush:
                    type: boolean
                    nullable: true
                  attachments:
                    items:
                      type: number
                    type: array
                    nullable: true
                  quoteExpiration:
                    type: string
                    nullable: true
                  ordered:
                    type: string
                    nullable: true
                  start:
                    type: string
                    nullable: true
                  due:
                    type: string
                    nullable: true
                  consignor:
                    type: number
                    nullable: true
                  billTo:
                    type: number
                    nullable: true
                  origin:
                    type: number
                    nullable: true
                  destination:
                    type: number
                    nullable: true
                  deals:
                    items:
                      type: number
                    type: array
                    nullable: true
                  orderLink:
                    type: string
                    nullable: true
                  tenant:
                    items:
                      type: number
                    type: array
                    nullable: true
                  updatedAt:
                    type: string
                  createdAt:
                    type: string
                required:
                  - id
                  - updatedAt
                  - createdAt
          type: array
          nullable: true
        updatedAt:
          type: string
        createdAt:
          type: string
      required:
        - id
        - updatedAt
        - createdAt
    contactsUpsertConfirmation:
      type: object
      title: Contact upsert confirmation
      properties:
        doc:
          additionalProperties: false
          title: Contact
          type: object
          properties:
            name:
              type: string
              nullable: true
            status:
              enum:
                - Pending
                - Active
                - Inactive
              type: string
              nullable: true
            type:
              items:
                enum:
                  - Auction
                  - Mechanic
                  - Operations
                  - Back Office
                  - Transporter
                  - Detailer
                  - Customer
                  - Dealer
                type: string
              type: array
              nullable: true
            customer:
              type: number
              nullable: true
            addresses:
              type: number
              nullable: true
            transportServiceOrders:
              items:
                type: number
              type: array
              nullable: true
            transportServiceOrders2:
              items:
                type: number
              type: array
              nullable: true
            transportServiceOrders3:
              items:
                type: number
              type: array
              nullable: true
            transportServiceOrders4:
              items:
                type: number
              type: array
              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

````