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

# Restore a Crm Vehicle version by its id

> Restore a Crm Vehicle version by its id

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

  const sdk = new SDK(...)

  const crmVehicles = await sdk.crmVehicles.create(data: crmVehicles): Promise<crmVehicles>
  ```
</Accordion>


## OpenAPI

````yaml post /crmVehicles/versions/{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:
  /crmVehicles/versions/{id}:
    post:
      tags:
        - crmVehicles
      summary: Restore a Crm Vehicle version by its id
      description: Restore a Crm Vehicle version by its id
      parameters:
        - name: id
          in: path
          description: id of the Crm Vehicle version
          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/crmVehiclesUpsertConfirmationResponse'
        '404':
          $ref: '#/components/responses/NotFoundErrorResponse'
      security:
        - apiKeyAuth: []
components:
  responses:
    crmVehiclesUpsertConfirmationResponse:
      description: ok
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/crmVehiclesUpsertConfirmation'
    NotFoundErrorResponse:
      description: not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  schemas:
    crmVehiclesUpsertConfirmation:
      type: object
      title: Crm Vehicle upsert confirmation
      properties:
        doc:
          additionalProperties: false
          title: CrmVehicle
          type: object
          properties:
            vin:
              type: string
              nullable: true
            search:
              items:
                type: number
              type: array
              nullable: true
            favorite:
              items:
                type: number
              type: array
              nullable: true
            exteriorColor:
              type: string
              nullable: true
            status:
              enum:
                - Needs Review
                - Exclude
                - To Send to Customer
                - Sent to Customer
                - Watching Price
                - Customer Approved
              type: string
              nullable: true
            reason:
              items:
                enum:
                  - Wrong Color
                  - Wrong Trim
                  - Out of price range
                  - Sold at Auction
                  - Salvage Title
                  - Damage on the Carfax
                  - Old
                  - Condition Report
                  - Mileage
                  - Test
                  - Manual transmission
                  - Features
                  - Waiting for Lower Price
                  - Duplicate
                  - MECHANICAL AND DIAGNOSTIC CODES
                  - Previous Canadian
                  - No Pictures
                type: string
              type: array
              nullable: true
            notes:
              type: string
              nullable: true
            salesPrice:
              type: string
              nullable: true
            year:
              type: number
              nullable: true
            make:
              type: string
              nullable: true
            model:
              type: string
              nullable: true
            trim:
              type: string
              nullable: true
            bodyStyle:
              type: string
              nullable: true
            mileage:
              type: number
              nullable: true
            condition:
              type: number
              nullable: true
            newOrUsed:
              type: string
              nullable: true
            auction:
              type: string
              nullable: true
            auctionDate:
              type: string
              nullable: true
            laneAndRun:
              type: string
              nullable: true
            pickupZip:
              type: string
              nullable: true
            estimatedTransportFee:
              type: string
              nullable: true
            adjMmr:
              type: string
              nullable: true
            minBid:
              type: string
              nullable: true
            buyNow:
              type: string
              nullable: true
            retailPrice:
              type: string
              nullable: true
            tmvUsedRetailTotalWithOptions:
              type: string
              nullable: true
            kbbRetailBook:
              type: string
              nullable: true
            bbTotalRetail:
              type: string
              nullable: true
            wholesaleVdp:
              type: string
              nullable: true
            retailVdp:
              type: string
              nullable: true
            conditionReport:
              type: string
              nullable: true
            updateRequested:
              type: string
              nullable: true
            createdBy:
              type: number
              nullable: true
            lastModifiedBy:
              type: number
              nullable: true
            vdpEmails:
              items:
                type: number
              type: array
              nullable: true
            likes:
              type: string
              nullable: true
            dislikes:
              type: string
              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

````