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

# Generate Quotes From Rfq

> Generate one draft Quote per costed RFQ line (RFQ → True Cost → Quotation).

For each RFQ line with a linked cost sheet, the cost-sheet version's true-cost
breakdown + profit scenario become the quote's line items (one quote per style,
matching Quote.cost_sheet_id being singular). Lines with no cost sheet are skipped
and reported. When at least one quote is created the RFQ transitions to 'Quoted'.



## OpenAPI

````yaml /api/openapi-cutmake.json post /api/v1/quotes/from-rfq/{rfq_id}
openapi: 3.1.0
info:
  title: VM App API
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/quotes/from-rfq/{rfq_id}:
    post:
      tags:
        - Quotes
      summary: Generate Quotes From Rfq
      description: >-
        Generate one draft Quote per costed RFQ line (RFQ → True Cost →
        Quotation).


        For each RFQ line with a linked cost sheet, the cost-sheet version's
        true-cost

        breakdown + profit scenario become the quote's line items (one quote per
        style,

        matching Quote.cost_sheet_id being singular). Lines with no cost sheet
        are skipped

        and reported. When at least one quote is created the RFQ transitions to
        'Quoted'.
      operationId: generate_quotes_from_rfq_api_v1_quotes_from_rfq__rfq_id__post
      parameters:
        - name: rfq_id
          in: path
          required: true
          schema:
            type: string
            title: Rfq Id
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GenerateQuotesFromRfqResponse'
        '404':
          description: Not found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    GenerateQuotesFromRfqResponse:
      properties:
        rfqId:
          type: string
          title: Rfqid
        rfqDocumentId:
          type: string
          title: Rfqdocumentid
        rfqStatus:
          type: string
          title: Rfqstatus
        created:
          items:
            $ref: '#/components/schemas/GeneratedQuoteSummary'
          type: array
          title: Created
        skipped:
          items:
            $ref: '#/components/schemas/SkippedRfqLineSummary'
          type: array
          title: Skipped
      type: object
      required:
        - rfqId
        - rfqDocumentId
        - rfqStatus
      title: GenerateQuotesFromRfqResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    GeneratedQuoteSummary:
      properties:
        quoteId:
          type: string
          title: Quoteid
        costSheetId:
          type: string
          title: Costsheetid
        costSheetVersion:
          anyOf:
            - type: integer
            - type: 'null'
          title: Costsheetversion
        masterStyleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Masterstyleid
        totalAmount:
          type: number
          title: Totalamount
        currency:
          type: string
          title: Currency
      type: object
      required:
        - quoteId
        - costSheetId
        - totalAmount
        - currency
      title: GeneratedQuoteSummary
    SkippedRfqLineSummary:
      properties:
        lineItemId:
          type: string
          title: Lineitemid
        masterStyleId:
          anyOf:
            - type: string
            - type: 'null'
          title: Masterstyleid
        reason:
          type: string
          title: Reason
      type: object
      required:
        - lineItemId
        - reason
      title: SkippedRfqLineSummary
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````