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

# Order Inspection

<Info>
  This API is currently in closed beta, if you would like to participate please contact us!
</Info>

Orders a inspection for the specified vehicle.

Inspection is a service that allows you to get an in-depth look at the vehicle's condition. This service is
useful if you wish to know more about the vehicle from a third-party professional.

## Path Parameters

<ParamField path="vin" type="string" required>
  The Vehicle Identification Number (e.g. WP0AF2A99KS165242)
</ParamField>

## Body Parameters

<ParamField body="contact" type="object" required>
  The contact information of the person ordering the inspection.

  <Expandable title="Contact" defaultOpen>
    <ParamField body="name" type="string" required>
      The name of the person ordering the inspection.
    </ParamField>

    <ParamField body="phone" type="string" required>
      The phone number of the person ordering the inspection.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="addons" type="string[]">
  The addons that the person ordering the inspection wants to include in the inspection.
  Avalible options: `carfax`, `verbal-assessment`.

  * `carfax`: A report that provides information about the vehicle's history.
  * `verbal-assessment`: A member of the inspection team will call the person ordering the inspection and provide a verbal assessment of the vehicle. Useful if you wish to know more, or ask questions about the vehicle.
</ParamField>

## Response

<ResponseField name="data" type="object" required>
  <Expandable defaultOpen>
    <ResponseField name="id" type="string">
      The ID of the inspection request, used to track the status of the inspection.
    </ResponseField>

    <ResponseField name="status" type="enum<string>">
      The status of the inspection request.
      Avalible options: `pending`, `completed`, `canceled`.
    </ResponseField>

    <ResponseField name="estimatedTime" type="ISODate<string> | null">
      The date when the inspection is expected to be completed. This is an estimate, and may change, so it is recommended to check every so often.

      This value is `null` if the inspection has not been scheduled yet, such as if the invoice is yet to be completed.
    </ResponseField>

    <ResponseField name="invoice" type="Invoice">
      The invoice for the inspection request. This must be paid before any work is booked, or worked on.

      You can find out more about invoices, and how they work in the [Invoices API](/services/reference/invoices).

      <Expandable defaultOpen>
        <ResponseField name="id" type="string">
          The ID of the invoice.
        </ResponseField>

        <ResponseField name="paid" type="boolean">
          Whether the invoice has been paid.
        </ResponseField>

        <ResponseField name="total" type="number">
          The total amount of the invoice. This is a sum of all the items in the invoice, including addons, and taxes.
        </ResponseField>

        <ResponseField name="items" type="array" required>
          <Expandable defaultOpen>
            <ResponseField name="service" type="string">
              The service that this item is for. e.g. "wash-and-inspection"
            </ResponseField>

            <ResponseField name="name" type="string">
              The name of the service.
            </ResponseField>

            <ResponseField name="description" type="string">
              The description of the service. e.g. "Standard inspection for WP0AF2A99KS165242"
            </ResponseField>

            <ResponseField name="price" type="number">
              The price of the service, typically \$220 for standard vehicles.
            </ResponseField>

            <ResponseField name="quantity" type="number">
              The quantity of services ordered, usually 1.
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
    "data": {
      "id": "wdr_hBNxywxcUZ",
      "status": "pending",
      "estimatedTime": null,
      "invoice": {
        "id": "inv_zzmsiUloNc"
        "paid": false,
        "total": 220,
        "items": [
          {
            "service": "wash-and-inspection",
            "name": "standard-inspection",
            "description": "Standard inspection for WP0AF2A99KS165242",
            "price": 220,
            "quantity": 1
          }
        ]
      }
    }
  }
  ```
</ResponseExample>
