> For the complete documentation index, see [llms.txt](https://docs.bidunity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bidunity.com/supplier-api/quote-request.md).

# Quote Request

Allows suppliers to directly receive quote requests and respond without any human interaction.

## Overview

BidUnity can send a quote request to a supplier through a RESTful web service. The supplier must have a webhook endpoint setup to receive the request. Contact <support@bidunity.com> to setup this endpoint.

## Send Quote Request to Supplier

<mark style="color:green;">`POST`</mark> `https://your-supplier-site.com/v1/quote/request`

BidUnity will make a POST request to the supplier's endpoint when a user starts a quote request from within BidUnity. The supplier has full control over what the URL is to that endpoint; it must be configured by BidUnity support.

#### Headers

| Name         | Type   | Description                                                              |
| ------------ | ------ | ------------------------------------------------------------------------ |
| Content-type | string | `application/json`                                                       |
| BidUnity-Key | string | Contains your Webhook key to verify that the request came from BidUnity. |

#### Request Body

| Name           | Type   | Description                                                                                                                                                                             |
| -------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| request\_id    | string | A random, unique identifier for the quote. This must be sent back to BidUnity when responding with the quote.                                                                           |
| request\_type  | string | The type of request being made. For quote requests this will be `quote`. Orders will be `order`.                                                                                        |
| company\_id    | string | The id of the company making the request.                                                                                                                                               |
| company\_name  | string | The name of the company making the request.                                                                                                                                             |
| deliver\_to    | object | The address of where the materials should be delivered. This will include the following string fields: `line1`, `line2`, `city`, `state`, `zip`, `country`                              |
| project\_id    | string | The id of the project.                                                                                                                                                                  |
| project\_name  | string | The name of the project.                                                                                                                                                                |
| proposal\_id   | string | The id of the proposal within the project.                                                                                                                                              |
| proposal\_name | string | The name of the proposal.                                                                                                                                                               |
| parts          | array  | Contains an array of Part objects to be quoted. This can be an empty array. See the Part object for the structure of each object.                                                       |
| doors          | array  | Contains an array of Door objects to be quoted. This can be an empty array. See the Door object for the structure of each object.                                                       |
| total\_cost    | number | The total cost that BidUnity calculated for all parts and doors in the quote request. Note this is provided for information purposes only and may differ from the actual amount quoted. |

{% tabs %}
{% tab title="200 Quote request successfully received by supplier." %}

```
{ }
```

{% endtab %}

{% tab title="500 If an error occurs, include a description of the error with the response." %}

```
{ "error": "Description of the error that occurred." }
```

{% endtab %}
{% endtabs %}

### Example quote request body

```yaml
{
    "request_id": “d770d1d3-72f6-48b7-b24b-fea1c8a2da77”,
    "request_type": “quote”,
    "company_id": “5cd2410d2482a6002148aa38”,
    "company_name": “The Company Name”,
    "deliver_to": {
        "line1": “4822 Somewhere Street”,
        "line2": null,
        "city": “New York”,
        "state": “NY”,
        "zip": 48230,
        "country": “USA”,
    },
    "project_id": “5db1bd412c3017002170ebb6”,
    "project_name": “The Project Name”,
    "proposal_id": “5e383f71e8c7250026e29f80”,
    "proposal_name": “The Proposal Name”,
    "parts": [{
        id: “407f191e810c19729de860ec”,
        name: “Trulite 3101 Head/Sill/Jamb”,
        part_number: “3101”,
        finish_type: “Class 1 Anodized”,
        finish_color: “Dark Bronze”,
        finish_multiplier: 1.0,
        total_cost: 100.00,
        package_unit_cost: 20.00,
        package_quantity_to_order: 5,
        item_measurement_type: “stock_length”,
        items_per_package: 1,   # Lengths sold individually
        item_stock_size: 288,   # 288” stock lengths
        item_size_unit_of_measure: “in”,  // Inches
        sizes: [{
            component: “Head”,
            length: 29.125   # inches
        },{
            component: “Sill”,
            length: 29.125   # inches
        }]
    }],
    "doors": [DoorObject],
    "total_cost": 3820.48
}
```

See the [Part object](/supplier-api/api-reference/api-objects/part-object.md) and [Door object](/supplier-api/api-reference/api-objects/door-object.md) for more information on these objects.
