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

# Generate Quote Documents

> Generate all the documents required to send the Quote as an email to the prospect - or an Order Confirmation; it just depends on the template id's for the lines doc and mail body.

Quote version status is not changed by this method.
NsApiSlow threshold: 5000 ms.



## OpenAPI

````yaml /openapi/agent/openapi-v3-QuoteAgent.json post /api/v1/Agents/Quote/GenerateQuoteDocuments
openapi: 3.0.0
info:
  version: v1-Agents
  title: SuperOffice Agent API v1
  description: SuperOffice Agent API - QuoteAgent
  contact:
    name: SuperOffice DevNet
    url: https://docs.superoffice.com/en/api/index.html
    email: sdk@superoffice.com
servers:
  - url: http://localhost:56350
  - url: https://localhost:56350
security: []
tags: []
externalDocs:
  description: >-
    The SuperOffice DevNet Community has more documentation, examples, and
    discussion forums.
  url: https://community.superoffice.com/en/developer/
paths:
  /api/v1/Agents/Quote/GenerateQuoteDocuments:
    post:
      tags:
        - Quote_Agent
      summary: Generate Quote Documents
      description: "Generate all the documents required to send the Quote as an email to the prospect - or an Order Confirmation; it just depends on the template id's for the lines doc and mail body.\n\nQuote version status is not changed by this method.\r\nNsApiSlow threshold: 5000 ms."
      operationId: v1QuoteAgent_GenerateQuoteDocuments
      parameters:
        - name: $select
          in: query
          description: >-
            Optional comma separated list of properties to include in the
            result. Other fields are then nulled out to reduce payload size:
            "Name,department,category". Default = show all fields.
          required: false
          schema:
            type: string
        - name: Accept-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code.
          required: false
          schema:
            type: string
        - name: SO-Language
          in: header
          description: >-
            Convert string references and multi-language values into a specified
            language (iso2) code. Overrides Accept-Language value.
          required: false
          schema:
            type: string
        - name: SO-Culture
          in: header
          description: >-
            Number, date formatting in a specified culture (iso2 language) code.
            Partially overrides SO-Language/Accept-Language value. Ignored if no
            Language set.
          required: false
          schema:
            type: string
        - name: SO-TimeZone
          in: header
          description: >-
            Specify the timezone code that you would like date/time responses
            converted to.
          required: false
          schema:
            type: string
        - name: SO-AppToken
          in: header
          description: >-
            The application token that identifies the partner app. Used when
            calling Online WebAPI from a server.
          required: false
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest
          text/json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest
          application/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest
          text/xml:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest
          application/x-www-form-urlencoded:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest
          application/json-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest
          application/merge-patch+json:
            schema:
              $ref: >-
                #/components/schemas/SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest
        description: >-
          QuoteVersionId, EmailBodyTemplateId, AttachMainDocument,
          QuotedProductsTemplateId, IncludeAttachments, RawMailSubject
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.QuotePublishDocuments
            text/json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.QuotePublishDocuments
            application/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.QuotePublishDocuments
            text/xml:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.QuotePublishDocuments
            application/json-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.QuotePublishDocuments
            application/merge-patch+json:
              schema:
                $ref: >-
                  #/components/schemas/SuperOffice.CRM.Services.QuotePublishDocuments
      security:
        - SuperOffice_Password: []
          SuperId_Authentication: []
components:
  schemas:
    SuperOffice.WebApi.v1.Carriers.QuoteCarriers.GenerateQuoteDocumentsRequest:
      description: >-
        GenerateQuoteDocuments: Generate all the documents required to send the
        Quote as an email to the prospect - or an Order Confirmation; it just
        depends on the template id's for the lines doc and mail body. Quote
        version status is not changed by this method.
      type: object
      properties:
        QuoteVersionId:
          format: int32
          type: integer
        EmailBodyTemplateId:
          format: int32
          type: integer
        AttachMainDocument:
          type: boolean
        QuotedProductsTemplateId:
          format: int32
          type: integer
        IncludeAttachments:
          type: boolean
        RawMailSubject:
          type: string
    SuperOffice.CRM.Services.QuotePublishDocuments:
      description: "Prepare the documents required to publish a quote - Email, main document as pdf, quoted products as pdf, attachments\r\n<para />\r\nCarrier object for QuotePublishDocuments.\r\nServices for the QuotePublishDocuments Carrier is available from the <see cref=\"T:SuperOffice.CRM.Services.IQuoteAgent\">Quote Agent</see>."
      type: object
      properties:
        QuoteDocumentId:
          format: int32
          description: >-
            Quote document, as PDF; may be zero if there is no document
            specified for the version
          type: integer
        QuotedProductsId:
          format: int32
          description: Quoted products (quote lines or confirmation lines) document, as PDF
          type: integer
        QuoteAttachmentIds:
          description: >-
            Array of id's of any attachments (standard + custom for this
            version)
          type: array
          items:
            format: int32
            type: integer
        MailBody:
          description: >-
            The string that is the content of the mail body; this is the result
            of merging the mail body template with the current template variable
            values
          type: string
        MailSubject:
          description: >-
            The string that is the mail subject; done by merging the text
            resource SR_QUOTE_PUBLISH_MAILHEADING with the current template
            variable values
          type: string
        ToEmail:
          description: The email address of the recipient, taken from the sale's person
          type: string
        ToFullName:
          description: The full name of the recipient, taken from the sale's person
          type: string
        ErrorMessage:
          description: If something went wrong, show this message and do not continue
          type: string
        TableRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.TableRight'
        FieldProperties:
          description: >-
            Field property dictionary mapping field names to field access
            rights.
          type: object
          additionalProperties:
            $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldProperty'
    SuperOffice.CRM.Security.TableRight:
      description: "Wraps a table right together with an explanatory reason.\r\nCode can indicate why access is restricted."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string
    SuperOffice.CRM.Security.FieldProperty:
      description: >-
        Class holding properties like field length, field type about a field in
        the carrier.
      type: object
      properties:
        FieldRight:
          $ref: '#/components/schemas/SuperOffice.CRM.Security.FieldRight'
        FieldType:
          type: string
        FieldLength:
          format: int32
          description: ''
          type: integer
    SuperOffice.CRM.Security.FieldRight:
      description: "Wraps the field right together with an explanatory reason.\r\nAlso adds logical operators to the field rights so that they can be easily combined."
      type: object
      properties:
        Mask:
          type: string
        Reason:
          type: string

````

## Related topics

- [Quote document](/en/automation/crmscript/howto/quote/quote-document.md)
- [SuperOffice.WebApi.Data.Quote GenerateQuoteDocumentsRequest](/en/api/reference/webapi/SuperOffice.WebApi.Data.Quote_GenerateQuoteDocumentsRequest.md)
- [NSQuoteAgent](/en/automation/crmscript/reference/CRMScript.NetServer.NSQuoteAgent.md)
- [SuperOffice.WebApi.Agents.QuoteAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.QuoteAgent.md)
- [SuperOffice.WebApi.Agents.IQuoteAgent](/en/api/reference/webapi/SuperOffice.WebApi.Agents.IQuoteAgent.md)
- [Generate a document](/en/api/web-services/howto/document/rest-generate-document.md)
