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

# Build your own quote form

> Replace the BeRocker widget with a form you design — save the lead, wait for the automatic quote and hand the customer to your booking page.

The BeRocker quoting widget is one form serving every account. If you would rather design your own
— your markup, your styling, your steps — you can, and it gets **exactly the same treatment** as the
widget: the same lead, the same automatic quote, the same assignment and the same booking page.
Everything the widget does, it does through two endpoints under your lead source URL, and this page
walks through them in the order a form uses them.

<Info>
  Both endpoints are authenticated by the key embedded in your **Lead save URL**
  (**Settings → Lead Management → Lead sources → URLs**). Copy that URL from the CRM and replace the
  trailing `/save` with the path of the endpoint you need. The field-by-field reference is on the
  [Lead source API](/integrations/lead-source-api) page.
</Info>

***

## 1. Save the lead

```http theme={null}
POST /api/v1/auto-logistics/client/webhooks/lead/<api-key>/save
Content-Type: application/json
```

```json theme={null}
{
  "first_name": "Dana",
  "last_name": "Reyes",
  "email": "dana@example.com",
  "phone": "3055550101",
  "origin_postal_code": "33101",
  "destination_postal_code": "75201",
  "transport_type": "open",
  "ship_date": "2026-09-23",
  "vehicles": [
    { "vehicle_model_year": 2021, "vehicle_make": "Honda", "vehicle_model": "Civic", "vehicle_inop": false }
  ]
}
```

Only `first_name`, `phone` and one vehicle are required. A ZIP on each end is enough for the route;
BeRocker fills in the city and state.

<Tip>
  Want year / make / model pickers instead of free-text fields? The
  [Vehicle database API](/integrations/vehicle-database-api) serves the same catalogue the widget
  uses, and the names it returns drop straight into `vehicle_make` and `vehicle_model`.
</Tip>

The response gives you the lead's id and the booking page:

```json theme={null}
{
  "id": 48213,
  "bookingLink": "https://app.berocker.com/booking/…",
  "price": null,
  "leadProvider": "Main Website"
}
```

A `422` means a field was rejected; `errors` names it with a message you can show under the field,
and no lead is saved.

<Warning>
  Show the visitor a clear error and keep their input on a `422`, a `500` or a dropped connection.
  Telling someone to "check their details" after a server error is how one failed submission turns
  into five leads.
</Warning>

***

## 2. Wait for the price — `booking-status`

Pricing runs in the background, so `price` is usually empty right after the save. If you want to
send the customer straight to the booking page with a price on it, poll:

```http theme={null}
GET /api/v1/auto-logistics/client/webhooks/lead/<api-key>/<lead-id>/booking-status
```

```json theme={null}
{ "id": 48213, "price": 1250, "priceReady": true, "priceFailed": false, "manualReview": false, "bookingLink": "https://…" }
```

* `priceReady: true` — send them to `bookingLink`.
* `manualReview: true` — the lead has a custom vehicle; an agent prices it by hand. Stop polling
  and show your own "we'll be in touch with your quote" message.
* `priceFailed: true` — pricing gave up. Same: stop and show a message.

Poll every couple of seconds for up to a minute or so, then give up gracefully — the lead is already
in the CRM and assigned either way.

***

## 3. Hand off to the booking page

Send the customer to `bookingLink`. The booking page opens on the pickup date they gave you, and
whatever they confirm there — dates, signature, payment — flows into the lead exactly as it would
for a widget lead.

***

## Editions with pickup windows

Some BeRocker editions let a form ask for a **pickup window** (a first and last day) or a **pickup
timeframe** ("how soon do you need it?") instead of a single date, and expose a `quote-config`
endpoint that tells the form which question the account asks. If your CRM has a
**Settings → Feature Flags** page with a **Pickup windows** switch, read
[Lead Source API with pickup windows](/integrations/pickup-windows-api). If it does not, your edition
takes the single `ship_date` above and nothing on that page applies.

***

## Checklist

<Steps>
  <Step title="Copy your Lead save URL">
    Settings → Lead Management → Lead sources → URLs. Create a separate source for the form if you
    want its leads and cost tracked separately.
  </Step>

  <Step title="Post to /save">
    Required: `first_name`, `phone`, one vehicle. Handle a `422` by showing the field message.
  </Step>

  <Step title="Poll booking-status, then hand off">
    Send the customer to `bookingLink` once `priceReady` is true.
  </Step>

  <Step title="Send one test lead">
    Use your own name and number and watch it land in [Inbox](/using/inbox).
  </Step>
</Steps>

***

## Related

<CardGroup cols={2}>
  <Card title="Lead source API" icon="code" href="/integrations/lead-source-api">
    Every field the save endpoint accepts.
  </Card>

  <Card title="Vehicle database API" icon="car" href="/integrations/vehicle-database-api">
    Year, make and model pickers backed by the widget's catalogue.
  </Card>

  <Card title="Lead sources" icon="filter" href="/settings/lead-sources">
    Create the source and get the URL.
  </Card>

  <Card title="Lead Source API with pickup windows" icon="calendar-days" href="/integrations/pickup-windows-api">
    Optional pickup fields, for editions that have them.
  </Card>

  <Card title="Booking page" icon="browser" href="/settings/booking-page">
    Where the customer confirms dates, signs and pays.
  </Card>
</CardGroup>
