SalesByte
Integration API

Create Quote from Template

Creates a new quote by cloning an existing quote template. Allows for overriding basic customer details and custom fields.

Endpoint

POST /integrations/create_quote/template

Purpose

To quickly generate a new quote based on a predefined template, customizing customer-specific information.

Request Body

{
  "uuid": "string",
  "quote_template_id": 0,
  "customer_name": "string",
  "customer_email": "string | null",
  "customer_phone": "string | null",
  "customer_fields": {},
  "trigger_created_messages_to_customer": true
}

Parameters

Required Parameters

ParameterTypeDescription
uuidstringUnique identifier for the integration configuration (template-specific)
quote_template_idintegerThe ID of the quote template to use
customer_namestringThe name of the customer for the new quote
trigger_created_messages_to_customerbooleanTrigger initial messages to the customer

Contact Information

At least one of customer_email or customer_phone is required.

ParameterTypeDescription
customer_emailstring | nullCustomer's email address (must be valid format if provided). Required if customer_phone is null
customer_phonestring | nullCustomer's phone number (validated format). Required if customer_email is null

Optional Parameters

ParameterTypeDescription
customer_fieldsobjectAn array or object containing data to update custom fields. Structure depends on the custom fields defined in the template

Response

Success Response

Status Code: 200 OK

Body: Quote created (plain text)

Error Responses

Status CodeDescription
404 Not FoundIntegration uuid not found, or quote_template_id not found or not associated with the integration
422 Unprocessable EntityValidation errors in the request body (missing required fields, invalid email/phone format)
500 Internal Server ErrorAn unexpected server error occurred

Example Usage

{
  "uuid": "your-integration-uuid",
  "quote_template_id": 42,
  "customer_name": "John Doe",
  "customer_email": "[email protected]",
  "customer_phone": "+46701234567",
  "customer_fields": {
    "company_size": "50-100",
    "industry": "Technology"
  },
  "trigger_created_messages_to_customer": true
}

On this page