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

> Deletes an existing Trade

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

  const sdk = new SDK(...)

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


## OpenAPI

````yaml delete /trades/{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:
  /trades/{id}:
    delete:
      tags:
        - trades
      summary: Deletes an existing Trade
      description: Deletes an existing Trade
      parameters:
        - name: id
          in: path
          description: id of the Trade
          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/tradesUpsertConfirmationResponse'
        '404':
          $ref: '#/components/responses/NotFoundErrorResponse'
      security:
        - apiKeyAuth: []
components:
  responses:
    tradesUpsertConfirmationResponse:
      description: ok
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/tradesUpsertConfirmation'
    NotFoundErrorResponse:
      description: not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/error'
  schemas:
    tradesUpsertConfirmation:
      type: object
      title: Trade upsert confirmation
      properties:
        doc:
          additionalProperties: false
          title: Trade
          type: object
          properties:
            status:
              enum:
                - 'Vehicle Picked Up '
                - Dropped Off At Manheim
              type: string
              nullable: true
            deal:
              type: number
              nullable: true
            creditApplication:
              type: number
              nullable: true
            tradeInAllowance:
              type: string
              nullable: true
            odometer:
              type: number
              nullable: true
            lienholder:
              type: number
              nullable: true
            tradeInPayoffBalance:
              type: string
              nullable: true
            payoffGoodThrough:
              type: string
              nullable: true
            vehicle:
              type: number
              nullable: true
            lastModifiedBy:
              type: number
              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

````