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

# RFQ and Quotes

# RFQ and Quotes

The RFQ and Quotes add-on supports quote-based purchasing workflows for B2B marketplaces. Customers can request pricing for products or requirements, vendors can respond with quotations, and both parties can track negotiation activity and quote status.

## Key Features

* Provide RFQ submission forms for customers.
* Allow vendors to respond to quote requests.
* Track negotiation activity and history.
* Manage RFQ states such as pending, approved, and rejected.
* Maintain quote versions for comparison.
* Support a communication thread between customers and vendors.

## Package Structure

```text theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
RfqAndQuotes/
├── controllers/
├── migrations/
├── models/
├── repository/
└── service/
```

## How It Works

1. A customer submits an RFQ with the information requested by the marketplace.
2. The RFQ is routed to the relevant vendor or quote-management workflow.
3. The vendor prepares and submits a quotation.
4. The customer and vendor negotiate through the supported communication thread.
5. Quote versions and status changes provide a record of the negotiation.
6. The parties review the final quote and proceed according to the marketplace order workflow.

## Components

* Models represent RFQs and quote data.
* Controllers expose RFQ and quote operations.
* Repositories access RFQ records.
* Services implement quote and negotiation logic.
* Migrations create the required database structures.

## Configuration

Configure the following settings after the add-on has been discovered and enabled. Only apply settings supported by the supplied package version.

* Configure RFQ form fields and required information.
* Set the vendor quote-response workflow.
* Configure negotiation history and quote versioning behaviour.
* Define the statuses and rules used to approve or reject requests.

## Installation (Pre-built Premium Add-on)

This add-on is delivered as a **pre-built JavaScript package** by SpurtCommerce. Install the supplied compiled files; **you do not need to run a TypeScript build**.

### Before you begin

* Confirm that the add-on package is intended for the SpurtCommerce version and edition installed in your project.
* Back up the application files and database before installing a new add-on or applying its migrations.
* Extract the supplied add-on archive. The package normally contains `index.js` (which exports the `spurtcommerceAddon` manifest), compiled folders such as `controllers/`, `models/`, `repositories/`, `services/`, `migrations/`, and may include an optional hook file and `package.json`.
* Work from the SpurtCommerce project root - the directory containing the application’s `main.js` and `package.json`.

### Step 1: Place the add-on in `add-ons/`

Create an `add-ons/` directory in the project root if it does not already exist. Copy the supplied add-on folder into it. Use the folder name provided with the add-on package and retain the supplied internal file structure.

There are two supported layouts.

**Layout A - compiled files directly inside the add-on folder**

```text theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
my-spurtcommerce-project/
├── add-ons/
│   └── <addon-name>/
│       ├── index.js
│       ├── controllers/
│       ├── models/
│       ├── repositories/
│       ├── services/
│       └── migrations/
├── main.js
└── package.json
```

**Layout B - keep the `dist/` directory inside the add-on folder**

```text theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
my-spurtcommerce-project/
├── add-ons/
│   └── <addon-name>/
│       ├── package.json
│       └── dist/
│           ├── index.js
│           ├── controllers/
│           ├── models/
│           ├── repositories/
│           ├── services/
│           └── migrations/
├── main.js
└── package.json
```

For Layout B, the add-on folder must contain a root-level `package.json` that points to the compiled entry file. For example:

```json theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
{
  "name": "<addon-name>",
  "version": "1.0.0",
  "main": "dist/index.js"
}
```

Alternatively, create `add-ons/<addon-name>/index.js` with this content:

```javascript theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
module.exports = require('./dist');
```

**Important:** The add-on registry does not discover a nested `dist/` directory as a package entry by itself. When retaining `dist/`, provide the root-level `package.json` or `index.js` entry point shown above.

### Step 2: Add add-on-specific environment settings

Check the add-on's configuration section and the README or handover notes included with the supplied package. If the add-on requires environment variables - for example, a Redis connection, socket port, payment gateway credentials, or an external service key - add the exact variables to the SpurtCommerce project's `.env` file.

Do not add placeholder values to production. Keep credentials private and do not commit real secrets to source control. If the add-on does not specify additional environment variables, no add-on-specific `.env` change is required.

### Step 3: Install only additional dependencies required by the add-on

The SpurtCommerce application already provides its core dependencies, such as TypeORM, `routing-controllers`, and `typedi`. Install an additional third-party package only when it is explicitly listed as a requirement in the supplied add-on documentation or package manifest.

Run any required command from the project root:

```bash theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
npm install <package-name>
```

Do not reinstall the SpurtCommerce core dependencies or run a build for the pre-built add-on. The package handover notes should identify any additional dependency that is required.

### Step 4: Start or restart SpurtCommerce

Start the application using the normal command for your project. For example:

```bash theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
node main.js
```

or:

```bash theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
npm start
```

If the server is already running, restart it after copying the add-on files or changing `.env` values. No manual edits to `main.js` or SpurtCommerce core loader files are required when the project has the supported add-on registry.

### Step 5: Allow the core loaders to register the add-on

During startup, SpurtCommerce performs the add-on integration through its loader lifecycle:

1. **Discovery (`addonRegistry`):** Scans the `add-ons/` directory, loads the add-on entry file, and validates/caches its `spurtcommerceAddon` manifest.
2. **Database and migrations (`typeormLoader`):** Registers the add-on's TypeORM entities and migrations, runs the migrations, seeds the add-on's plugin record where defined, and calls `manifest.initialize(dataSource)` when provided.
3. **Plugin registration (`pluginLoader`):** Registers the add-on's `pluginName` in the application’s plugin module.
4. **API routes (`expressLoader`):** Mounts the add-on's store, vendor, and admin controllers under the `/api/*` route space.
5. **Hooks (`HookUtil`):** Registers the event hooks included with the add-on so relevant core events can invoke them.

This is performed by the host application at startup. Do not manually run the add-on migrations or register controllers/entities in core files unless the add-on's own handover guide specifically requires an exception.

### Step 6: Verify add-on discovery and activation

After startup, check the application console for a discovery message similar to:

```text theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
[AddonRegistry] Discovered local add-on: <AddonPluginName> (<addon-name>)
```

Then verify that the plugin record is enabled. You can check the Plugins area in the Admin application or query the database:

```sql theme={"theme":{"light":"github-dark-default","dark":"github-light-default"}}
SELECT id, plugin_name, slug_name, plugin_status
FROM plugins
WHERE slug_name = '<addon-slug>';
```

Confirm that `plugin_status` is `1`. If the add-on is disabled, enable it through the Admin application where supported, or follow your platform’s plugin administration procedure.

Finally, test the add-on's documented API routes and its corresponding Admin, Vendor, or Store workflow. Test in a development or staging environment before enabling the add-on for production users.

### Installation troubleshooting

| Symptom | Likely cause | What to check |
| - | - | - |
| Add-on is not discovered | Entry file is missing, folder is misplaced, or nested `dist/` has no root entry point | Confirm `add-ons/<addon-name>/index.js`, or add the root `package.json` with `main: "dist/index.js"` / root shim as shown above |
| API returns `404` | Server was not restarted, controllers were not loaded, or package entry file was not found | Restart the server and check the `[AddonRegistry] Discovered local add-on` log |
| API returns `403` or plugin is unavailable | Plugin record is disabled | Check `plugin_status` and enable the add-on in Admin where available |
| Startup reports a missing module | An add-on-specific third-party dependency is not installed | Install the missing package in the project root only after confirming it is required by the add-on |
| Migration or database error | Host database configuration is invalid, migration failed, or the add-on is not compatible with the project version | Review startup logs, confirm the target SpurtCommerce version, back up the database, and contact SpurtCommerce support with the error details |

> **Version and delivery note:** Premium add-ons are supplied as compiled packages for a compatible SpurtCommerce release. Use the package delivered for your project version. Do not substitute source-build instructions, rename internal files, or mix compiled packages from different releases unless SpurtCommerce confirms compatibility.

## Operational Notes

Test the workflow from both customer and vendor accounts. Confirm that quote revisions, status changes, and messages remain associated with the correct RFQ.

## Summary

The RFQ and Quotes add-on extends SpurtCommerce with the capabilities described above. It is delivered as a compiled premium package and is loaded by the SpurtCommerce add-on registry when installed according to the steps above.

## API Endpoints

The endpoint definitions below are derived from the supplied controller files. All routes are mounted under the SpurtCommerce `/api` prefix. Each entry describes the operation and lists the path, query, body, or file inputs identified by the controller annotations.

**Controller routes documented:** 28.

### Store API

#### StoreQuoteController

### `GET /api/store-quote`

**Definition:** Retrieves the store Quote List.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Query | `count` | number \| boolean | As defined by the controller | If 1, return only count of matching records |
| Query | `createdDate` | string | As defined by the controller | Filter by creation date |
| Query | `keyword` | string | As defined by the controller | Search keyword |
| Query | `limit` | number | As defined by the controller | Number of records to fetch |
| Query | `offset` | number | As defined by the controller | Number of records to skip |
| Query | `poNumber` | string | As defined by the controller | Filter by PO number |
| Query | `validUntil` | string | As defined by the controller | Filter by validity date |

**Authorization:** The controller applies the `customer` access context and the following permission scope: `view-quote`.

### `GET /api/store-quote/:id`

**Definition:** Retrieves the store Quote Detail.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Quote ID |
| Query | `params` | any | Controller-defined | Grouped query parameters used by the controller. Refer to the query type or controller validation for supported fields. |

**Authorization:** The controller applies the `customer` access context and the following permission scope: `view-quote`.

### `PUT /api/store-quote/:id/status`

**Definition:** Updates the status of the selected record using the submitted status value.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Quote ID |
| Body | `statusName` | String | As defined by the controller | New status for the quote |

**Authorization:** The controller applies the `customer` access context and the following permission scope: `view-quote`.

#### StoreRfqController

### `POST /api/store-rfq`

**Definition:** Creates store RFQ.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Body | `attachments` | Object\[] | As defined by the controller | List of file attachments (optional). |
| Body | `company` | String | Optional | Company name |
| Body | `doNotShipLaterThan` | String | Optional | Do not ship later than date (YYYY-MM-DD) |
| Body | `emailAddress` | String | As defined by the controller | Email address of the requester |
| Body | `firstName` | String | As defined by the controller | First name of the requester |
| Body | `lastName` | String | Optional | Last name of the requester |
| Body | `message` | String | Optional | Message for the RFQ |
| Body | `phoneNumber` | String | Optional | Phone number of the requester |
| Body | `poNumber` | String | As defined by the controller | Purchase order number |
| Body | `productRfqDetails` | Object\[] | As defined by the controller | List of products |
| Body | `productRfqDetails.listedPrice` | Number | As defined by the controller | Listed price |
| Body | `productRfqDetails.notes` | String | Optional | Notes for the product |
| Body | `productRfqDetails.productId` | Number | As defined by the controller | Product ID |
| Body | `productRfqDetails.quantity` | Number | As defined by the controller | Quantity |
| Body | `productRfqDetails.skuId` | Number | As defined by the controller | SKU ID |
| Body | `productRfqDetails.targetPrice` | Number | As defined by the controller | Target price |
| Body | `statusName` | String | Optional | Status name |

**Request model:** `CreateCustomRfqRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `customer` access context and the following permission scope: `create-request-for-quote`.

### `GET /api/store-rfq/draft/:id`

**Definition:** Returns the saved RFQ draft identified by the supplied draft ID.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Identifies the resource in the route. |

**Authorization:** The controller applies the `customer` access context.

### `POST /api/store-rfq/message`

**Definition:** Creates store RFQ.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Body | `attachments` | Object\[] | As defined by the controller | List of file attachments (optional). |
| Body | `message` | String | Optional | Message for the RFQ |
| Body | `rfqId` | number | Optional | rfqId for the RFQ |

**Request model:** `RfqMessageRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `customer` access context and the following permission scope: `create-request-for-quote`.

### `GET /api/store-rfq`

**Definition:** Retrieves the store RFQ List.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Query | `count` | number \| boolean | Optional | If set, returns count instead of data |
| Query | `createdDate` | string | Optional | Created date (YYYY-MM-DD) |
| Query | `doNotShipLaterThan` | string | Optional | Do not ship later than date (YYYY-MM-DD) |
| Query | `keyword` | string | Optional | Search keyword |
| Query | `limit` | number | Optional | Limit for pagination |
| Query | `offset` | number | Optional | Offset for pagination |
| Query | `poNumber` | String | Optional | Purchase order number |
| Query | `quoteStatusName` | string | As defined by the controller | Filter, pagination, or lookup value read from the query string. |
| Query | `statusId` | number | As defined by the controller | Filter, pagination, or lookup value read from the query string. |

**Authorization:** The controller applies the `customer` access context and the following permission scope: `view-request-for-quote`.

### `GET /api/store-rfq/status`

**Definition:** Retrieves the store RFQ Status List.

**Authorization:** The controller applies the `customer` access context and the following permission scope: `view-request-for-quote`.

### `GET /api/store-rfq/dropdown-options`

**Definition:** Retrieves the rFQ Dropdown Options.

**Authorization:** The controller applies the `customer` access context.

### `GET /api/store-rfq/:id`

**Definition:** Retrieves the store RFQ Detail.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | RFQ ID |
| Query | `params` | any | Controller-defined | Grouped query parameters used by the controller. Refer to the query type or controller validation for supported fields. |
| Query | `threadId` | number | As defined by the controller | Filter, pagination, or lookup value read from the query string. |

**Authorization:** The controller applies the `customer` access context and the following permission scope: `view-request-for-quote`.

### `PUT /api/store-rfq/:id`

**Definition:** Updates the customer RFQ identified by the supplied ID using the validated RFQ payload.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Identifies the resource in the route. |

**Request model:** `CreateCustomRfqRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `customer` access context and the following permission scope: `create-request-for-quote`.

### `POST /api/store-rfq/:id/counter-offer`

**Definition:** Submits a counter-offer for the selected RFQ or quote negotiation.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Identifies the resource in the route. |

**Request model:** `RfqCounterOfferRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `customer` access context and the following permission scope: `create-request-for-quote`.

### `PUT /api/store-rfq/:id/status`

**Definition:** Updates the status of the selected record using the submitted status value.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | RFQ ID |
| Body | `statusName` | String | As defined by the controller | "Approved" or "Rejected" |

**Authorization:** The controller applies the `customer` access context and the following permission scope: `create-request-for-quote`.

### Vendor API

#### VendorQuoteController

### `POST /api/vendor-quote`

**Definition:** Creates vendor Quote.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Body | `customerId` | Number | As defined by the controller | Customer ID |
| Body | `customerUserId` | Number | As defined by the controller | Customer User ID |
| Body | `doNotShipLaterThan` | String | As defined by the controller | Latest shipping date |
| Body | `notes` | String | As defined by the controller | Additional notes |
| Body | `poNumber` | String | As defined by the controller | Purchase order number |
| Body | `quoteDetails` | Object\[] | As defined by the controller | Array of quote detail objects |
| Body | `quoteDetails.listedPrice` | Number | As defined by the controller | Listed price of the product |
| Body | `quoteDetails.notes` | String | As defined by the controller | Notes related to the product |
| Body | `quoteDetails.offeredPrice` | Number | As defined by the controller | Offered price for the product |
| Body | `quoteDetails.productId` | Number | As defined by the controller | Product ID |
| Body | `quoteDetails.quantity` | Number | As defined by the controller | Quantity of product |
| Body | `quoteDetails.skuId` | Number | As defined by the controller | SKU ID |
| Body | `quoteRequestId` | Number | Optional | Quote request ID (optional) |
| Body | `validUntil` | String | As defined by the controller | Quote validity date |

**Request model:** `CreateQuoteRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `create-quote`.

### `PUT /api/vendor-quote/:id/status`

**Definition:** Updates the status of the selected record using the submitted status value.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Quote ID |
| Body | `statusName` | String | As defined by the controller | Name of the new status (e.g., "Approved", "Rejected, "Send to Buyer") |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `edit-quote`.

### `PUT /api/vendor-quote/:id`

**Definition:** Updates vendor Quote.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Quote ID to update |
| Body | `customerId` | Number | Optional | Customer ID |
| Body | `doNotShipLaterThan` | String | Optional | Latest shipping date (YYYY-MM-DD) |
| Body | `notes` | String | Optional | Additional notes |
| Body | `poNumber` | String | Optional | Purchase order number |
| Body | `quoteDetails` | Object\[] | Optional | Array of quote detail objects |
| Body | `quoteDetails.listedPrice` | Number | Optional | Listed price of the product |
| Body | `quoteDetails.notes` | String | Optional | Notes related to the product |
| Body | `quoteDetails.offeredPrice` | Number | Optional | Offered price for the product |
| Body | `quoteDetails.productId` | Number | Optional | Product ID |
| Body | `quoteDetails.quantity` | Number | Optional | Quantity of product |
| Body | `quoteDetails.quoteDetailId` | Number | Optional | Quote detail ID |
| Body | `quoteDetails.skuId` | Number | Optional | SKU ID |
| Body | `quoteRequestId` | Number | Optional | Quote request ID (optional) |
| Body | `validUntil` | String | Optional | Quote validity date (YYYY-MM-DD) |

**Request model:** `CreateQuoteRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `edit-quote`.

### `GET /api/vendor-quote`

**Definition:** Retrieves the vendor Quote List.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Query | `count` | number \| boolean | Optional | If true, returns only the total count |
| Query | `createdDate` | string | Optional | Created date |
| Query | `customerId` | number | As defined by the controller | Filter, pagination, or lookup value read from the query string. |
| Query | `customerName` | string | As defined by the controller | Filter, pagination, or lookup value read from the query string. |
| Query | `keyword` | string | Optional | Search keyword (e.g., poNumber) |
| Query | `limit` | number | Optional | Limit for pagination |
| Query | `offset` | number | Optional | Offset for pagination |
| Query | `poNumber` | String | Optional | Purchase order number |
| Query | `statusId` | number | As defined by the controller | Filter, pagination, or lookup value read from the query string. |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `list-quote`.

### `GET /api/vendor-quote/status`

**Definition:** Retrieves the vendor Quote Status List.

**Authorization:** The controller applies the `vendor` access context.

### `GET /api/vendor-quote/:id`

**Definition:** Retrieves the vendor Quote Detail.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Quote ID |
| Query | `params` | any | Controller-defined | Grouped query parameters used by the controller. Refer to the query type or controller validation for supported fields. |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `list-quote`.

### `GET /api/vendor-quote/:id/product-list`

**Definition:** Retrieves the vendor Quote Detail Product list.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Quote ID |
| Query | `params` | any | Controller-defined | Grouped query parameters used by the controller. Refer to the query type or controller validation for supported fields. |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `list-quote`.

#### VendorRfqController

### `GET /api/vendor-rfq`

**Definition:** Retrieves the vendor RFQ List.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Query | `count` | number \| boolean | Optional | If set, returns count instead of data |
| Query | `createdDate` | string | Optional | Created date (YYYY-MM-DD) |
| Query | `customerId` | number | As defined by the controller | Filter, pagination, or lookup value read from the query string. |
| Query | `customerName` | string | As defined by the controller | Filter, pagination, or lookup value read from the query string. |
| Query | `doNotShipLaterThan` | string | Optional | Do not ship later than date (YYYY-MM-DD) |
| Query | `firstName` | String | Optional | firstName |
| Query | `keyword` | string | Optional | Search keyword |
| Query | `lastName` | String | Optional | lastName |
| Query | `limit` | number | Optional | Limit for pagination |
| Query | `offset` | number | Optional | Offset for pagination |
| Query | `poNumber` | String | Optional | Purchase order number |
| Query | `statusId` | string | As defined by the controller | Filter, pagination, or lookup value read from the query string. |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `list-rfq`.

### `GET /api/vendor-rfq/status`

**Definition:** Retrieves the vendor RFQ Status List.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Identifies the resource in the route. |
| Query | `params` | any | Controller-defined | Grouped query parameters used by the controller. Refer to the query type or controller validation for supported fields. |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `list-rfq`.

### `GET /api/vendor-rfq/:id`

**Definition:** Retrieves the vendor RFQ Detail.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | RFQ ID |
| Query | `params` | any | Controller-defined | Grouped query parameters used by the controller. Refer to the query type or controller validation for supported fields. |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `list-rfq`.

### `GET /api/vendor-rfq/:id/product-list`

**Definition:** Retrieves the vendor Quote Detail Product list.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Quote ID |
| Query | `params` | any | Controller-defined | Grouped query parameters used by the controller. Refer to the query type or controller validation for supported fields. |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `list-rfq`.

### `PUT /api/vendor-rfq/:id/status`

**Definition:** Updates the status of the selected record using the submitted status value.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Identifies the resource in the route. |
| Path | `statusName` | Number | As defined by the controller | RFQ status name |

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `edit-rfq`.

### `POST /api/vendor-rfq/:id/counter-offer`

**Definition:** Submits a counter-offer for the selected RFQ or quote negotiation.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | Identifies the resource in the route. |

**Request model:** `RfqCounterOfferRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `edit-rfq`.

### `PUT /api/vendor-rfq/:id`

**Definition:** Updates the customer RFQ identified by the supplied ID using the validated RFQ payload.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Path | `id` | number | As defined by the controller | RFQ ID |

**Request model:** `UpdateRfqRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `edit-rfq`.

### `POST /api/vendor-rfq/message`

**Definition:** Creates store RFQ.

**Inputs**

| Location | Parameter | Type | Requirement | Description |
| - | - | - | - | - |
| Body | `attachments` | Object\[] | As defined by the controller | List of file attachments (optional). |
| Body | `message` | String | Optional | Message for the RFQ |
| Body | `rfqId` | number | Optional | rfqId for the RFQ |

**Request model:** `RfqMessageRequest` is used by the controller for payload validation.

**Authorization:** The controller applies the `vendor` access context and the following permission scope: `reply-more-information`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.