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/templatePurpose
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
| Parameter | Type | Description |
|---|---|---|
uuid | string | Unique identifier for the integration configuration (template-specific) |
quote_template_id | integer | The ID of the quote template to use |
customer_name | string | The name of the customer for the new quote |
trigger_created_messages_to_customer | boolean | Trigger initial messages to the customer |
Contact Information
At least one of customer_email or customer_phone is required.
| Parameter | Type | Description |
|---|---|---|
customer_email | string | null | Customer's email address (must be valid format if provided). Required if customer_phone is null |
customer_phone | string | null | Customer's phone number (validated format). Required if customer_email is null |
Optional Parameters
| Parameter | Type | Description |
|---|---|---|
customer_fields | object | An 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 Code | Description |
|---|---|
404 Not Found | Integration uuid not found, or quote_template_id not found or not associated with the integration |
422 Unprocessable Entity | Validation errors in the request body (missing required fields, invalid email/phone format) |
500 Internal Server Error | An 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
}