Create quote
Create a new quote.
curl --request POST \
--url https://api.hyperline.co/v1/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "cus_QalW2vTAdkR6IY",
"template_id": "quot_9hNWq4c84Z146W",
"status": "draft",
"owner_email": "joe@acme.com",
"invoicing_entity_id": "ive_47484fjdhy5",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"comments": "Please find the contract and subscription details we discussed.",
"terms": "By signing this quote, you accept our conditions of use for the use of our products and services.",
"amount": 20000,
"contract_value": 18000,
"collect_payment_details": true,
"collect_custom_property_ids": [],
"contract_clause_ids": [
"ccl_QalW2vTAdkR6IY"
],
"require_tax_id": false,
"display_quote_value": true,
"display_quote_value_with_tax": false,
"display_taxes": true,
"display_price_tiers": "matching",
"display_phase_value": false,
"display_discounts_on_total": false,
"display_first_invoice_amount": false,
"display_documents_in_preview": false,
"subscription_update_display": "quote_update_details",
"display_subscription_on_update": false,
"generate_draft_invoices": false,
"automatically_start_subscription": true,
"expires_at": "2024-04-28T14:12:09.293Z",
"subscription": {
"phases": [
{
"end_strategy": "duration",
"billing_date_setting": "phase_start",
"products": [
{
"id": "itm_FJKlqUb8COXw55",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"name": "Product name",
"description": "A description of the product.",
"description_display_interval_dates": false,
"payment_interval": {
"period": "once"
},
"payment_schedule": "start",
"price": {
"type": "fee",
"amount": 200
},
"prices": [
{
"type": "volume",
"from": 0,
"to": 20,
"amount": 200,
"unit_count": 1,
"on_tier_incomplete": null
},
{
"type": "volume",
"from": 20,
"to": null,
"amount": 150,
"unit_count": 1,
"on_tier_incomplete": null
}
],
"count": 2,
"unit_name": "user",
"min_committed_count": 2,
"min_amount": 123,
"max_amount": 123,
"bill_usage_difference": false,
"credits_expiration_in_days": 123,
"expire_credits_at_end_of_period": false,
"credits_balance_auto_creation_enabled": true,
"estimated_count": 200
}
],
"activation_strategy": "manual",
"name": "Initial term",
"type": "standard",
"status": "pending",
"order": 0,
"duration": {
"count": 1,
"period": "years"
},
"initial_billing_at": "2024-12-20T16:04:11Z",
"starts_at": "2024-12-20T16:04:11Z",
"ends_at": "2024-12-20T16:04:11Z",
"billing_cycle_alignment": "anniversary",
"do_not_invoice_phase": false,
"minimum_invoice_fee": 10000,
"minimum_invoice_fee_products": [
"itm_aaaaaaaaaaaaaa"
],
"transition_calculation_method": "prorata",
"transition_invoicing_schedule": "immediately",
"coupons": [
{
"id": "<string>",
"duration_count": 123,
"expires_at": "2024-12-20T16:04:11Z",
"apply_at": "2024-12-20T16:04:11Z",
"product_ids": [
"<string>"
]
}
]
}
],
"name": "<string>",
"purchase_order": "<string>",
"invoicing_entity_id": "ive_jerrb484RHn",
"crm_opportunity_id": "<string>",
"commitment_interval": {
"period": "years",
"count": 1
},
"renew_automatically": true,
"renew_for": {
"period": "years",
"count": 1
},
"minimum_invoice_fee": 250,
"starts_at": "2024-12-20T16:04:11Z",
"contract_start": "2024-01-15T00:00:00Z",
"contract_end": "2025-01-15T00:00:00Z",
"initial_billing_at": "2024-12-20T16:04:11Z",
"shipping_address_id": "cad_abc123",
"display_shipping_details": true,
"cancel_at": "2024-12-20T16:04:11Z",
"cancellation_amount": 123,
"properties": {},
"custom_properties": {},
"tax_only": true,
"generate_draft_invoices": true,
"generate_document": true,
"document_name": "<string>",
"add_tax_to_document": true,
"do_not_charge_subscription": true,
"invoice_custom_note": "<string>"
}
}
'import requests
url = "https://api.hyperline.co/v1/quotes"
payload = {
"customer_id": "cus_QalW2vTAdkR6IY",
"template_id": "quot_9hNWq4c84Z146W",
"status": "draft",
"owner_email": "joe@acme.com",
"invoicing_entity_id": "ive_47484fjdhy5",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"comments": "Please find the contract and subscription details we discussed.",
"terms": "By signing this quote, you accept our conditions of use for the use of our products and services.",
"amount": 20000,
"contract_value": 18000,
"collect_payment_details": True,
"collect_custom_property_ids": [],
"contract_clause_ids": ["ccl_QalW2vTAdkR6IY"],
"require_tax_id": False,
"display_quote_value": True,
"display_quote_value_with_tax": False,
"display_taxes": True,
"display_price_tiers": "matching",
"display_phase_value": False,
"display_discounts_on_total": False,
"display_first_invoice_amount": False,
"display_documents_in_preview": False,
"subscription_update_display": "quote_update_details",
"display_subscription_on_update": False,
"generate_draft_invoices": False,
"automatically_start_subscription": True,
"expires_at": "2024-04-28T14:12:09.293Z",
"subscription": {
"phases": [
{
"end_strategy": "duration",
"billing_date_setting": "phase_start",
"products": [
{
"id": "itm_FJKlqUb8COXw55",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"name": "Product name",
"description": "A description of the product.",
"description_display_interval_dates": False,
"payment_interval": { "period": "once" },
"payment_schedule": "start",
"price": {
"type": "fee",
"amount": 200
},
"prices": [
{
"type": "volume",
"from": 0,
"to": 20,
"amount": 200,
"unit_count": 1,
"on_tier_incomplete": None
},
{
"type": "volume",
"from": 20,
"to": None,
"amount": 150,
"unit_count": 1,
"on_tier_incomplete": None
}
],
"count": 2,
"unit_name": "user",
"min_committed_count": 2,
"min_amount": 123,
"max_amount": 123,
"bill_usage_difference": False,
"credits_expiration_in_days": 123,
"expire_credits_at_end_of_period": False,
"credits_balance_auto_creation_enabled": True,
"estimated_count": 200
}
],
"activation_strategy": "manual",
"name": "Initial term",
"type": "standard",
"status": "pending",
"order": 0,
"duration": {
"count": 1,
"period": "years"
},
"initial_billing_at": "2024-12-20T16:04:11Z",
"starts_at": "2024-12-20T16:04:11Z",
"ends_at": "2024-12-20T16:04:11Z",
"billing_cycle_alignment": "anniversary",
"do_not_invoice_phase": False,
"minimum_invoice_fee": 10000,
"minimum_invoice_fee_products": ["itm_aaaaaaaaaaaaaa"],
"transition_calculation_method": "prorata",
"transition_invoicing_schedule": "immediately",
"coupons": [
{
"id": "<string>",
"duration_count": 123,
"expires_at": "2024-12-20T16:04:11Z",
"apply_at": "2024-12-20T16:04:11Z",
"product_ids": ["<string>"]
}
]
}
],
"name": "<string>",
"purchase_order": "<string>",
"invoicing_entity_id": "ive_jerrb484RHn",
"crm_opportunity_id": "<string>",
"commitment_interval": {
"period": "years",
"count": 1
},
"renew_automatically": True,
"renew_for": {
"period": "years",
"count": 1
},
"minimum_invoice_fee": 250,
"starts_at": "2024-12-20T16:04:11Z",
"contract_start": "2024-01-15T00:00:00Z",
"contract_end": "2025-01-15T00:00:00Z",
"initial_billing_at": "2024-12-20T16:04:11Z",
"shipping_address_id": "cad_abc123",
"display_shipping_details": True,
"cancel_at": "2024-12-20T16:04:11Z",
"cancellation_amount": 123,
"properties": {},
"custom_properties": {},
"tax_only": True,
"generate_draft_invoices": True,
"generate_document": True,
"document_name": "<string>",
"add_tax_to_document": True,
"do_not_charge_subscription": True,
"invoice_custom_note": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: 'cus_QalW2vTAdkR6IY',
template_id: 'quot_9hNWq4c84Z146W',
status: 'draft',
owner_email: 'joe@acme.com',
invoicing_entity_id: 'ive_47484fjdhy5',
catalog_version_id: 'pcv_9x8v7u6t5s4r',
comments: 'Please find the contract and subscription details we discussed.',
terms: 'By signing this quote, you accept our conditions of use for the use of our products and services.',
amount: 20000,
contract_value: 18000,
collect_payment_details: true,
collect_custom_property_ids: [],
contract_clause_ids: ['ccl_QalW2vTAdkR6IY'],
require_tax_id: false,
display_quote_value: true,
display_quote_value_with_tax: false,
display_taxes: true,
display_price_tiers: 'matching',
display_phase_value: false,
display_discounts_on_total: false,
display_first_invoice_amount: false,
display_documents_in_preview: false,
subscription_update_display: 'quote_update_details',
display_subscription_on_update: false,
generate_draft_invoices: false,
automatically_start_subscription: true,
expires_at: '2024-04-28T14:12:09.293Z',
subscription: {
phases: [
{
end_strategy: 'duration',
billing_date_setting: 'phase_start',
products: [
{
id: 'itm_FJKlqUb8COXw55',
catalog_version_id: 'pcv_9x8v7u6t5s4r',
name: 'Product name',
description: 'A description of the product.',
description_display_interval_dates: false,
payment_interval: {period: 'once'},
payment_schedule: 'start',
price: {type: 'fee', amount: 200},
prices: [
{
type: 'volume',
from: 0,
to: 20,
amount: 200,
unit_count: 1,
on_tier_incomplete: null
},
{
type: 'volume',
from: 20,
to: null,
amount: 150,
unit_count: 1,
on_tier_incomplete: null
}
],
count: 2,
unit_name: 'user',
min_committed_count: 2,
min_amount: 123,
max_amount: 123,
bill_usage_difference: false,
credits_expiration_in_days: 123,
expire_credits_at_end_of_period: false,
credits_balance_auto_creation_enabled: true,
estimated_count: 200
}
],
activation_strategy: 'manual',
name: 'Initial term',
type: 'standard',
status: 'pending',
order: 0,
duration: {count: 1, period: 'years'},
initial_billing_at: '2024-12-20T16:04:11Z',
starts_at: '2024-12-20T16:04:11Z',
ends_at: '2024-12-20T16:04:11Z',
billing_cycle_alignment: 'anniversary',
do_not_invoice_phase: false,
minimum_invoice_fee: 10000,
minimum_invoice_fee_products: ['itm_aaaaaaaaaaaaaa'],
transition_calculation_method: 'prorata',
transition_invoicing_schedule: 'immediately',
coupons: [
{
id: '<string>',
duration_count: 123,
expires_at: '2024-12-20T16:04:11Z',
apply_at: '2024-12-20T16:04:11Z',
product_ids: ['<string>']
}
]
}
],
name: '<string>',
purchase_order: '<string>',
invoicing_entity_id: 'ive_jerrb484RHn',
crm_opportunity_id: '<string>',
commitment_interval: {period: 'years', count: 1},
renew_automatically: true,
renew_for: {period: 'years', count: 1},
minimum_invoice_fee: 250,
starts_at: '2024-12-20T16:04:11Z',
contract_start: '2024-01-15T00:00:00Z',
contract_end: '2025-01-15T00:00:00Z',
initial_billing_at: '2024-12-20T16:04:11Z',
shipping_address_id: 'cad_abc123',
display_shipping_details: true,
cancel_at: '2024-12-20T16:04:11Z',
cancellation_amount: 123,
properties: {},
custom_properties: {},
tax_only: true,
generate_draft_invoices: true,
generate_document: true,
document_name: '<string>',
add_tax_to_document: true,
do_not_charge_subscription: true,
invoice_custom_note: '<string>'
}
})
};
fetch('https://api.hyperline.co/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperline.co/v1/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => 'cus_QalW2vTAdkR6IY',
'template_id' => 'quot_9hNWq4c84Z146W',
'status' => 'draft',
'owner_email' => 'joe@acme.com',
'invoicing_entity_id' => 'ive_47484fjdhy5',
'catalog_version_id' => 'pcv_9x8v7u6t5s4r',
'comments' => 'Please find the contract and subscription details we discussed.',
'terms' => 'By signing this quote, you accept our conditions of use for the use of our products and services.',
'amount' => 20000,
'contract_value' => 18000,
'collect_payment_details' => true,
'collect_custom_property_ids' => [
],
'contract_clause_ids' => [
'ccl_QalW2vTAdkR6IY'
],
'require_tax_id' => false,
'display_quote_value' => true,
'display_quote_value_with_tax' => false,
'display_taxes' => true,
'display_price_tiers' => 'matching',
'display_phase_value' => false,
'display_discounts_on_total' => false,
'display_first_invoice_amount' => false,
'display_documents_in_preview' => false,
'subscription_update_display' => 'quote_update_details',
'display_subscription_on_update' => false,
'generate_draft_invoices' => false,
'automatically_start_subscription' => true,
'expires_at' => '2024-04-28T14:12:09.293Z',
'subscription' => [
'phases' => [
[
'end_strategy' => 'duration',
'billing_date_setting' => 'phase_start',
'products' => [
[
'id' => 'itm_FJKlqUb8COXw55',
'catalog_version_id' => 'pcv_9x8v7u6t5s4r',
'name' => 'Product name',
'description' => 'A description of the product.',
'description_display_interval_dates' => false,
'payment_interval' => [
'period' => 'once'
],
'payment_schedule' => 'start',
'price' => [
'type' => 'fee',
'amount' => 200
],
'prices' => [
[
'type' => 'volume',
'from' => 0,
'to' => 20,
'amount' => 200,
'unit_count' => 1,
'on_tier_incomplete' => null
],
[
'type' => 'volume',
'from' => 20,
'to' => null,
'amount' => 150,
'unit_count' => 1,
'on_tier_incomplete' => null
]
],
'count' => 2,
'unit_name' => 'user',
'min_committed_count' => 2,
'min_amount' => 123,
'max_amount' => 123,
'bill_usage_difference' => false,
'credits_expiration_in_days' => 123,
'expire_credits_at_end_of_period' => false,
'credits_balance_auto_creation_enabled' => true,
'estimated_count' => 200
]
],
'activation_strategy' => 'manual',
'name' => 'Initial term',
'type' => 'standard',
'status' => 'pending',
'order' => 0,
'duration' => [
'count' => 1,
'period' => 'years'
],
'initial_billing_at' => '2024-12-20T16:04:11Z',
'starts_at' => '2024-12-20T16:04:11Z',
'ends_at' => '2024-12-20T16:04:11Z',
'billing_cycle_alignment' => 'anniversary',
'do_not_invoice_phase' => false,
'minimum_invoice_fee' => 10000,
'minimum_invoice_fee_products' => [
'itm_aaaaaaaaaaaaaa'
],
'transition_calculation_method' => 'prorata',
'transition_invoicing_schedule' => 'immediately',
'coupons' => [
[
'id' => '<string>',
'duration_count' => 123,
'expires_at' => '2024-12-20T16:04:11Z',
'apply_at' => '2024-12-20T16:04:11Z',
'product_ids' => [
'<string>'
]
]
]
]
],
'name' => '<string>',
'purchase_order' => '<string>',
'invoicing_entity_id' => 'ive_jerrb484RHn',
'crm_opportunity_id' => '<string>',
'commitment_interval' => [
'period' => 'years',
'count' => 1
],
'renew_automatically' => true,
'renew_for' => [
'period' => 'years',
'count' => 1
],
'minimum_invoice_fee' => 250,
'starts_at' => '2024-12-20T16:04:11Z',
'contract_start' => '2024-01-15T00:00:00Z',
'contract_end' => '2025-01-15T00:00:00Z',
'initial_billing_at' => '2024-12-20T16:04:11Z',
'shipping_address_id' => 'cad_abc123',
'display_shipping_details' => true,
'cancel_at' => '2024-12-20T16:04:11Z',
'cancellation_amount' => 123,
'properties' => [
],
'custom_properties' => [
],
'tax_only' => true,
'generate_draft_invoices' => true,
'generate_document' => true,
'document_name' => '<string>',
'add_tax_to_document' => true,
'do_not_charge_subscription' => true,
'invoice_custom_note' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperline.co/v1/quotes"
payload := strings.NewReader("{\n \"customer_id\": \"cus_QalW2vTAdkR6IY\",\n \"template_id\": \"quot_9hNWq4c84Z146W\",\n \"status\": \"draft\",\n \"owner_email\": \"joe@acme.com\",\n \"invoicing_entity_id\": \"ive_47484fjdhy5\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"comments\": \"Please find the contract and subscription details we discussed.\",\n \"terms\": \"By signing this quote, you accept our conditions of use for the use of our products and services.\",\n \"amount\": 20000,\n \"contract_value\": 18000,\n \"collect_payment_details\": true,\n \"collect_custom_property_ids\": [],\n \"contract_clause_ids\": [\n \"ccl_QalW2vTAdkR6IY\"\n ],\n \"require_tax_id\": false,\n \"display_quote_value\": true,\n \"display_quote_value_with_tax\": false,\n \"display_taxes\": true,\n \"display_price_tiers\": \"matching\",\n \"display_phase_value\": false,\n \"display_discounts_on_total\": false,\n \"display_first_invoice_amount\": false,\n \"display_documents_in_preview\": false,\n \"subscription_update_display\": \"quote_update_details\",\n \"display_subscription_on_update\": false,\n \"generate_draft_invoices\": false,\n \"automatically_start_subscription\": true,\n \"expires_at\": \"2024-04-28T14:12:09.293Z\",\n \"subscription\": {\n \"phases\": [\n {\n \"end_strategy\": \"duration\",\n \"billing_date_setting\": \"phase_start\",\n \"products\": [\n {\n \"id\": \"itm_FJKlqUb8COXw55\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"name\": \"Product name\",\n \"description\": \"A description of the product.\",\n \"description_display_interval_dates\": false,\n \"payment_interval\": {\n \"period\": \"once\"\n },\n \"payment_schedule\": \"start\",\n \"price\": {\n \"type\": \"fee\",\n \"amount\": 200\n },\n \"prices\": [\n {\n \"type\": \"volume\",\n \"from\": 0,\n \"to\": 20,\n \"amount\": 200,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n },\n {\n \"type\": \"volume\",\n \"from\": 20,\n \"to\": null,\n \"amount\": 150,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n }\n ],\n \"count\": 2,\n \"unit_name\": \"user\",\n \"min_committed_count\": 2,\n \"min_amount\": 123,\n \"max_amount\": 123,\n \"bill_usage_difference\": false,\n \"credits_expiration_in_days\": 123,\n \"expire_credits_at_end_of_period\": false,\n \"credits_balance_auto_creation_enabled\": true,\n \"estimated_count\": 200\n }\n ],\n \"activation_strategy\": \"manual\",\n \"name\": \"Initial term\",\n \"type\": \"standard\",\n \"status\": \"pending\",\n \"order\": 0,\n \"duration\": {\n \"count\": 1,\n \"period\": \"years\"\n },\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"ends_at\": \"2024-12-20T16:04:11Z\",\n \"billing_cycle_alignment\": \"anniversary\",\n \"do_not_invoice_phase\": false,\n \"minimum_invoice_fee\": 10000,\n \"minimum_invoice_fee_products\": [\n \"itm_aaaaaaaaaaaaaa\"\n ],\n \"transition_calculation_method\": \"prorata\",\n \"transition_invoicing_schedule\": \"immediately\",\n \"coupons\": [\n {\n \"id\": \"<string>\",\n \"duration_count\": 123,\n \"expires_at\": \"2024-12-20T16:04:11Z\",\n \"apply_at\": \"2024-12-20T16:04:11Z\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n }\n ],\n \"name\": \"<string>\",\n \"purchase_order\": \"<string>\",\n \"invoicing_entity_id\": \"ive_jerrb484RHn\",\n \"crm_opportunity_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"renew_automatically\": true,\n \"renew_for\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"minimum_invoice_fee\": 250,\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"contract_start\": \"2024-01-15T00:00:00Z\",\n \"contract_end\": \"2025-01-15T00:00:00Z\",\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"shipping_address_id\": \"cad_abc123\",\n \"display_shipping_details\": true,\n \"cancel_at\": \"2024-12-20T16:04:11Z\",\n \"cancellation_amount\": 123,\n \"properties\": {},\n \"custom_properties\": {},\n \"tax_only\": true,\n \"generate_draft_invoices\": true,\n \"generate_document\": true,\n \"document_name\": \"<string>\",\n \"add_tax_to_document\": true,\n \"do_not_charge_subscription\": true,\n \"invoice_custom_note\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperline.co/v1/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"cus_QalW2vTAdkR6IY\",\n \"template_id\": \"quot_9hNWq4c84Z146W\",\n \"status\": \"draft\",\n \"owner_email\": \"joe@acme.com\",\n \"invoicing_entity_id\": \"ive_47484fjdhy5\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"comments\": \"Please find the contract and subscription details we discussed.\",\n \"terms\": \"By signing this quote, you accept our conditions of use for the use of our products and services.\",\n \"amount\": 20000,\n \"contract_value\": 18000,\n \"collect_payment_details\": true,\n \"collect_custom_property_ids\": [],\n \"contract_clause_ids\": [\n \"ccl_QalW2vTAdkR6IY\"\n ],\n \"require_tax_id\": false,\n \"display_quote_value\": true,\n \"display_quote_value_with_tax\": false,\n \"display_taxes\": true,\n \"display_price_tiers\": \"matching\",\n \"display_phase_value\": false,\n \"display_discounts_on_total\": false,\n \"display_first_invoice_amount\": false,\n \"display_documents_in_preview\": false,\n \"subscription_update_display\": \"quote_update_details\",\n \"display_subscription_on_update\": false,\n \"generate_draft_invoices\": false,\n \"automatically_start_subscription\": true,\n \"expires_at\": \"2024-04-28T14:12:09.293Z\",\n \"subscription\": {\n \"phases\": [\n {\n \"end_strategy\": \"duration\",\n \"billing_date_setting\": \"phase_start\",\n \"products\": [\n {\n \"id\": \"itm_FJKlqUb8COXw55\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"name\": \"Product name\",\n \"description\": \"A description of the product.\",\n \"description_display_interval_dates\": false,\n \"payment_interval\": {\n \"period\": \"once\"\n },\n \"payment_schedule\": \"start\",\n \"price\": {\n \"type\": \"fee\",\n \"amount\": 200\n },\n \"prices\": [\n {\n \"type\": \"volume\",\n \"from\": 0,\n \"to\": 20,\n \"amount\": 200,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n },\n {\n \"type\": \"volume\",\n \"from\": 20,\n \"to\": null,\n \"amount\": 150,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n }\n ],\n \"count\": 2,\n \"unit_name\": \"user\",\n \"min_committed_count\": 2,\n \"min_amount\": 123,\n \"max_amount\": 123,\n \"bill_usage_difference\": false,\n \"credits_expiration_in_days\": 123,\n \"expire_credits_at_end_of_period\": false,\n \"credits_balance_auto_creation_enabled\": true,\n \"estimated_count\": 200\n }\n ],\n \"activation_strategy\": \"manual\",\n \"name\": \"Initial term\",\n \"type\": \"standard\",\n \"status\": \"pending\",\n \"order\": 0,\n \"duration\": {\n \"count\": 1,\n \"period\": \"years\"\n },\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"ends_at\": \"2024-12-20T16:04:11Z\",\n \"billing_cycle_alignment\": \"anniversary\",\n \"do_not_invoice_phase\": false,\n \"minimum_invoice_fee\": 10000,\n \"minimum_invoice_fee_products\": [\n \"itm_aaaaaaaaaaaaaa\"\n ],\n \"transition_calculation_method\": \"prorata\",\n \"transition_invoicing_schedule\": \"immediately\",\n \"coupons\": [\n {\n \"id\": \"<string>\",\n \"duration_count\": 123,\n \"expires_at\": \"2024-12-20T16:04:11Z\",\n \"apply_at\": \"2024-12-20T16:04:11Z\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n }\n ],\n \"name\": \"<string>\",\n \"purchase_order\": \"<string>\",\n \"invoicing_entity_id\": \"ive_jerrb484RHn\",\n \"crm_opportunity_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"renew_automatically\": true,\n \"renew_for\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"minimum_invoice_fee\": 250,\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"contract_start\": \"2024-01-15T00:00:00Z\",\n \"contract_end\": \"2025-01-15T00:00:00Z\",\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"shipping_address_id\": \"cad_abc123\",\n \"display_shipping_details\": true,\n \"cancel_at\": \"2024-12-20T16:04:11Z\",\n \"cancellation_amount\": 123,\n \"properties\": {},\n \"custom_properties\": {},\n \"tax_only\": true,\n \"generate_draft_invoices\": true,\n \"generate_document\": true,\n \"document_name\": \"<string>\",\n \"add_tax_to_document\": true,\n \"do_not_charge_subscription\": true,\n \"invoice_custom_note\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"cus_QalW2vTAdkR6IY\",\n \"template_id\": \"quot_9hNWq4c84Z146W\",\n \"status\": \"draft\",\n \"owner_email\": \"joe@acme.com\",\n \"invoicing_entity_id\": \"ive_47484fjdhy5\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"comments\": \"Please find the contract and subscription details we discussed.\",\n \"terms\": \"By signing this quote, you accept our conditions of use for the use of our products and services.\",\n \"amount\": 20000,\n \"contract_value\": 18000,\n \"collect_payment_details\": true,\n \"collect_custom_property_ids\": [],\n \"contract_clause_ids\": [\n \"ccl_QalW2vTAdkR6IY\"\n ],\n \"require_tax_id\": false,\n \"display_quote_value\": true,\n \"display_quote_value_with_tax\": false,\n \"display_taxes\": true,\n \"display_price_tiers\": \"matching\",\n \"display_phase_value\": false,\n \"display_discounts_on_total\": false,\n \"display_first_invoice_amount\": false,\n \"display_documents_in_preview\": false,\n \"subscription_update_display\": \"quote_update_details\",\n \"display_subscription_on_update\": false,\n \"generate_draft_invoices\": false,\n \"automatically_start_subscription\": true,\n \"expires_at\": \"2024-04-28T14:12:09.293Z\",\n \"subscription\": {\n \"phases\": [\n {\n \"end_strategy\": \"duration\",\n \"billing_date_setting\": \"phase_start\",\n \"products\": [\n {\n \"id\": \"itm_FJKlqUb8COXw55\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"name\": \"Product name\",\n \"description\": \"A description of the product.\",\n \"description_display_interval_dates\": false,\n \"payment_interval\": {\n \"period\": \"once\"\n },\n \"payment_schedule\": \"start\",\n \"price\": {\n \"type\": \"fee\",\n \"amount\": 200\n },\n \"prices\": [\n {\n \"type\": \"volume\",\n \"from\": 0,\n \"to\": 20,\n \"amount\": 200,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n },\n {\n \"type\": \"volume\",\n \"from\": 20,\n \"to\": null,\n \"amount\": 150,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n }\n ],\n \"count\": 2,\n \"unit_name\": \"user\",\n \"min_committed_count\": 2,\n \"min_amount\": 123,\n \"max_amount\": 123,\n \"bill_usage_difference\": false,\n \"credits_expiration_in_days\": 123,\n \"expire_credits_at_end_of_period\": false,\n \"credits_balance_auto_creation_enabled\": true,\n \"estimated_count\": 200\n }\n ],\n \"activation_strategy\": \"manual\",\n \"name\": \"Initial term\",\n \"type\": \"standard\",\n \"status\": \"pending\",\n \"order\": 0,\n \"duration\": {\n \"count\": 1,\n \"period\": \"years\"\n },\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"ends_at\": \"2024-12-20T16:04:11Z\",\n \"billing_cycle_alignment\": \"anniversary\",\n \"do_not_invoice_phase\": false,\n \"minimum_invoice_fee\": 10000,\n \"minimum_invoice_fee_products\": [\n \"itm_aaaaaaaaaaaaaa\"\n ],\n \"transition_calculation_method\": \"prorata\",\n \"transition_invoicing_schedule\": \"immediately\",\n \"coupons\": [\n {\n \"id\": \"<string>\",\n \"duration_count\": 123,\n \"expires_at\": \"2024-12-20T16:04:11Z\",\n \"apply_at\": \"2024-12-20T16:04:11Z\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n }\n ],\n \"name\": \"<string>\",\n \"purchase_order\": \"<string>\",\n \"invoicing_entity_id\": \"ive_jerrb484RHn\",\n \"crm_opportunity_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"renew_automatically\": true,\n \"renew_for\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"minimum_invoice_fee\": 250,\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"contract_start\": \"2024-01-15T00:00:00Z\",\n \"contract_end\": \"2025-01-15T00:00:00Z\",\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"shipping_address_id\": \"cad_abc123\",\n \"display_shipping_details\": true,\n \"cancel_at\": \"2024-12-20T16:04:11Z\",\n \"cancellation_amount\": 123,\n \"properties\": {},\n \"custom_properties\": {},\n \"tax_only\": true,\n \"generate_draft_invoices\": true,\n \"generate_document\": true,\n \"document_name\": \"<string>\",\n \"add_tax_to_document\": true,\n \"do_not_charge_subscription\": true,\n \"invoice_custom_note\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "quo_hXQCd5y8P3GYXa",
"type": "subscription",
"status": "draft",
"amount": 200000,
"customer_id": "cus_QalW2vTAdkR6IY",
"invoicing_entity_id": "ive_47484fjdhy5",
"configurations": [
{
"id": "<string>",
"customer_id": "<string>",
"position": 123,
"amount": 123,
"applied_at": "2024-12-20T16:04:11Z",
"type": "subscription",
"subscription_id": "<string>",
"contract_terms": {
"status": "active",
"activation_strategy": "start_date",
"end_strategy": "duration",
"starts_at": "2024-12-31T23:00:00.000Z",
"ends_at": "2025-06-30T21:59:59.999Z",
"duration": {
"count": 6,
"period": "months"
},
"renew_automatically": true,
"renew_for_duration": {
"count": 1,
"period": "years"
},
"current_period_started_at": "2025-06-30T22:00:00.000Z",
"current_period_ends_at": "2026-06-30T21:59:59.999Z"
},
"estimates": [
{
"product_id": "itm_3kXODIM1sBwBbJ",
"price_configuration_id": "prc_8f3kXODIM1sBwB",
"phase_order": 0,
"period_start": "2026-01-01T00:00:00.000Z",
"period_end": "2026-12-31T23:59:59.999Z",
"estimated_count": 200,
"estimated_amount": 2000,
"estimated_total_amount": 24000
}
]
}
],
"template_id": "quot_9hNWq4c84Z146W",
"crm_opportunity_id": "opp_Z2oSqnBCUoo1bQ",
"custom_properties": {},
"contract_value": 18000,
"number": "327",
"comments": "Please find the contract and subscription details we discussed.",
"terms": "By signing this quote, you accept our conditions of use for the use of our products and services.",
"owner_email": "joe@acme.com",
"collect_payment_details": true,
"collect_custom_property_ids": [],
"require_tax_id": false,
"display_quote_value": true,
"display_quote_value_with_tax": false,
"display_taxes": true,
"display_price_tiers": "matching",
"display_phase_value": false,
"display_discounts_on_total": false,
"display_first_invoice_amount": false,
"display_documents_in_preview": false,
"subscription_update_display": "quote_update_details",
"post_signature_activation_enabled": true,
"generate_draft_invoices": false,
"attachments": [
{
"id": "quof_5GYXy8P3QCdaXh",
"name": "General Conditions of Sale",
"mimetype": "application/pdf"
}
],
"signed_file": null,
"url": "https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa",
"created_at": "2024-04-23T09:10:00.220Z",
"updated_at": "2024-04-23T10:22:08.100Z",
"expires_at": null,
"subscription_id": "<string>",
"display_subscription_on_update": false,
"warnings": [
{
"code": "subscription_template_configuration_not_found",
"subscription_template_id": "subt_ieLWHmDZVMoznt",
"currency": "EUR",
"country": "DE"
}
],
"invoice_id": "<string>",
"child_subscription_ids": [
"<string>"
]
}Authorizations
Body
- From a template
- Custom
- One-off
Email address of the Hyperline user acting as the quote owner. The user must be a member of your Hyperline account. The owner requests approval when the quote is finalized using an API key or finalized during creation. If not specified, the Hyperline account owner will be assigned.
"joe@acme.com"
Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count. For subscription quotes, defaults to the computed subscription value if not specified. For one-off quotes, this field is ignored — the amount is always derived from the linked invoice's amount_excluding_tax.
20000
What the customer pays over the contract, each coupon counted on the invoices it applies to. Computed from the subscription for subscription and subscription_update quotes, unless set manually. Not set on one_off quotes. When specified, overrides the computed value.
18000
Controls which price tiers are displayed on the quote.
all: Display all pricing tiers.matching: Only display the tiers used to compute the price based on quantity.none: Hide all pricing tiers.
all, matching, none "matching"
Quote expiration date. UTC date time string in the ISO 8601 format.
"2024-04-28T14:12:09.293Z"
Response
- Draft
- Awaiting approval
- Ready for signature
- Signed
- Voided
Quote type.
subscription: The quote will create one or more subscriptions.subscription_update: The quote will update one or more existing subscriptions.one_off: The quote will issue one or more one-off invoices.mixed: Mixed configuration types.null: Empty quote.
subscription, subscription_update, one_off, mixed Quote status.
draft: The quote is a draft.pending_approval: The quote is pending manager review and approval.changes_requested: Some changes have been requested following manager review.approved: The quote is approved and ready to be sent to the customer.pending_signature: The quote is awaiting the customer's signature.signed: The quote is signed and fully finalized.voided: The quote is voided.
draft "draft"
Estimated contract value. When computed, a subscription phase with neither an end date nor a fixed duration is counted over a conventional horizon: the contract's length for a single phase on a contract that has one, otherwise 12 months or the longest billing interval if longer. That horizon is not an end date: the subscription can run past it. Usage-based and connected seat lines are priced at their estimated quantity when it exceeds the committed quantity and, for seats, the live seat count.
200000
Sections displayed on subscription update quotes: quote_update_details, subscription_details, or both. Takes precedence over display_subscription_on_update.
quote_update_details, subscription_details, both "quote_update_details"
Quote creation date. UTC date time string in the ISO 8601 format.
"2024-04-23T09:10:00.220Z"
Quote update date. UTC date time string in the ISO 8601 format.
"2024-04-23T10:22:08.100Z"
Quote expiration date. UTC date time string in the ISO 8601 format.
null
Was this page helpful?
curl --request POST \
--url https://api.hyperline.co/v1/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"customer_id": "cus_QalW2vTAdkR6IY",
"template_id": "quot_9hNWq4c84Z146W",
"status": "draft",
"owner_email": "joe@acme.com",
"invoicing_entity_id": "ive_47484fjdhy5",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"comments": "Please find the contract and subscription details we discussed.",
"terms": "By signing this quote, you accept our conditions of use for the use of our products and services.",
"amount": 20000,
"contract_value": 18000,
"collect_payment_details": true,
"collect_custom_property_ids": [],
"contract_clause_ids": [
"ccl_QalW2vTAdkR6IY"
],
"require_tax_id": false,
"display_quote_value": true,
"display_quote_value_with_tax": false,
"display_taxes": true,
"display_price_tiers": "matching",
"display_phase_value": false,
"display_discounts_on_total": false,
"display_first_invoice_amount": false,
"display_documents_in_preview": false,
"subscription_update_display": "quote_update_details",
"display_subscription_on_update": false,
"generate_draft_invoices": false,
"automatically_start_subscription": true,
"expires_at": "2024-04-28T14:12:09.293Z",
"subscription": {
"phases": [
{
"end_strategy": "duration",
"billing_date_setting": "phase_start",
"products": [
{
"id": "itm_FJKlqUb8COXw55",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"name": "Product name",
"description": "A description of the product.",
"description_display_interval_dates": false,
"payment_interval": {
"period": "once"
},
"payment_schedule": "start",
"price": {
"type": "fee",
"amount": 200
},
"prices": [
{
"type": "volume",
"from": 0,
"to": 20,
"amount": 200,
"unit_count": 1,
"on_tier_incomplete": null
},
{
"type": "volume",
"from": 20,
"to": null,
"amount": 150,
"unit_count": 1,
"on_tier_incomplete": null
}
],
"count": 2,
"unit_name": "user",
"min_committed_count": 2,
"min_amount": 123,
"max_amount": 123,
"bill_usage_difference": false,
"credits_expiration_in_days": 123,
"expire_credits_at_end_of_period": false,
"credits_balance_auto_creation_enabled": true,
"estimated_count": 200
}
],
"activation_strategy": "manual",
"name": "Initial term",
"type": "standard",
"status": "pending",
"order": 0,
"duration": {
"count": 1,
"period": "years"
},
"initial_billing_at": "2024-12-20T16:04:11Z",
"starts_at": "2024-12-20T16:04:11Z",
"ends_at": "2024-12-20T16:04:11Z",
"billing_cycle_alignment": "anniversary",
"do_not_invoice_phase": false,
"minimum_invoice_fee": 10000,
"minimum_invoice_fee_products": [
"itm_aaaaaaaaaaaaaa"
],
"transition_calculation_method": "prorata",
"transition_invoicing_schedule": "immediately",
"coupons": [
{
"id": "<string>",
"duration_count": 123,
"expires_at": "2024-12-20T16:04:11Z",
"apply_at": "2024-12-20T16:04:11Z",
"product_ids": [
"<string>"
]
}
]
}
],
"name": "<string>",
"purchase_order": "<string>",
"invoicing_entity_id": "ive_jerrb484RHn",
"crm_opportunity_id": "<string>",
"commitment_interval": {
"period": "years",
"count": 1
},
"renew_automatically": true,
"renew_for": {
"period": "years",
"count": 1
},
"minimum_invoice_fee": 250,
"starts_at": "2024-12-20T16:04:11Z",
"contract_start": "2024-01-15T00:00:00Z",
"contract_end": "2025-01-15T00:00:00Z",
"initial_billing_at": "2024-12-20T16:04:11Z",
"shipping_address_id": "cad_abc123",
"display_shipping_details": true,
"cancel_at": "2024-12-20T16:04:11Z",
"cancellation_amount": 123,
"properties": {},
"custom_properties": {},
"tax_only": true,
"generate_draft_invoices": true,
"generate_document": true,
"document_name": "<string>",
"add_tax_to_document": true,
"do_not_charge_subscription": true,
"invoice_custom_note": "<string>"
}
}
'import requests
url = "https://api.hyperline.co/v1/quotes"
payload = {
"customer_id": "cus_QalW2vTAdkR6IY",
"template_id": "quot_9hNWq4c84Z146W",
"status": "draft",
"owner_email": "joe@acme.com",
"invoicing_entity_id": "ive_47484fjdhy5",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"comments": "Please find the contract and subscription details we discussed.",
"terms": "By signing this quote, you accept our conditions of use for the use of our products and services.",
"amount": 20000,
"contract_value": 18000,
"collect_payment_details": True,
"collect_custom_property_ids": [],
"contract_clause_ids": ["ccl_QalW2vTAdkR6IY"],
"require_tax_id": False,
"display_quote_value": True,
"display_quote_value_with_tax": False,
"display_taxes": True,
"display_price_tiers": "matching",
"display_phase_value": False,
"display_discounts_on_total": False,
"display_first_invoice_amount": False,
"display_documents_in_preview": False,
"subscription_update_display": "quote_update_details",
"display_subscription_on_update": False,
"generate_draft_invoices": False,
"automatically_start_subscription": True,
"expires_at": "2024-04-28T14:12:09.293Z",
"subscription": {
"phases": [
{
"end_strategy": "duration",
"billing_date_setting": "phase_start",
"products": [
{
"id": "itm_FJKlqUb8COXw55",
"catalog_version_id": "pcv_9x8v7u6t5s4r",
"name": "Product name",
"description": "A description of the product.",
"description_display_interval_dates": False,
"payment_interval": { "period": "once" },
"payment_schedule": "start",
"price": {
"type": "fee",
"amount": 200
},
"prices": [
{
"type": "volume",
"from": 0,
"to": 20,
"amount": 200,
"unit_count": 1,
"on_tier_incomplete": None
},
{
"type": "volume",
"from": 20,
"to": None,
"amount": 150,
"unit_count": 1,
"on_tier_incomplete": None
}
],
"count": 2,
"unit_name": "user",
"min_committed_count": 2,
"min_amount": 123,
"max_amount": 123,
"bill_usage_difference": False,
"credits_expiration_in_days": 123,
"expire_credits_at_end_of_period": False,
"credits_balance_auto_creation_enabled": True,
"estimated_count": 200
}
],
"activation_strategy": "manual",
"name": "Initial term",
"type": "standard",
"status": "pending",
"order": 0,
"duration": {
"count": 1,
"period": "years"
},
"initial_billing_at": "2024-12-20T16:04:11Z",
"starts_at": "2024-12-20T16:04:11Z",
"ends_at": "2024-12-20T16:04:11Z",
"billing_cycle_alignment": "anniversary",
"do_not_invoice_phase": False,
"minimum_invoice_fee": 10000,
"minimum_invoice_fee_products": ["itm_aaaaaaaaaaaaaa"],
"transition_calculation_method": "prorata",
"transition_invoicing_schedule": "immediately",
"coupons": [
{
"id": "<string>",
"duration_count": 123,
"expires_at": "2024-12-20T16:04:11Z",
"apply_at": "2024-12-20T16:04:11Z",
"product_ids": ["<string>"]
}
]
}
],
"name": "<string>",
"purchase_order": "<string>",
"invoicing_entity_id": "ive_jerrb484RHn",
"crm_opportunity_id": "<string>",
"commitment_interval": {
"period": "years",
"count": 1
},
"renew_automatically": True,
"renew_for": {
"period": "years",
"count": 1
},
"minimum_invoice_fee": 250,
"starts_at": "2024-12-20T16:04:11Z",
"contract_start": "2024-01-15T00:00:00Z",
"contract_end": "2025-01-15T00:00:00Z",
"initial_billing_at": "2024-12-20T16:04:11Z",
"shipping_address_id": "cad_abc123",
"display_shipping_details": True,
"cancel_at": "2024-12-20T16:04:11Z",
"cancellation_amount": 123,
"properties": {},
"custom_properties": {},
"tax_only": True,
"generate_draft_invoices": True,
"generate_document": True,
"document_name": "<string>",
"add_tax_to_document": True,
"do_not_charge_subscription": True,
"invoice_custom_note": "<string>"
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customer_id: 'cus_QalW2vTAdkR6IY',
template_id: 'quot_9hNWq4c84Z146W',
status: 'draft',
owner_email: 'joe@acme.com',
invoicing_entity_id: 'ive_47484fjdhy5',
catalog_version_id: 'pcv_9x8v7u6t5s4r',
comments: 'Please find the contract and subscription details we discussed.',
terms: 'By signing this quote, you accept our conditions of use for the use of our products and services.',
amount: 20000,
contract_value: 18000,
collect_payment_details: true,
collect_custom_property_ids: [],
contract_clause_ids: ['ccl_QalW2vTAdkR6IY'],
require_tax_id: false,
display_quote_value: true,
display_quote_value_with_tax: false,
display_taxes: true,
display_price_tiers: 'matching',
display_phase_value: false,
display_discounts_on_total: false,
display_first_invoice_amount: false,
display_documents_in_preview: false,
subscription_update_display: 'quote_update_details',
display_subscription_on_update: false,
generate_draft_invoices: false,
automatically_start_subscription: true,
expires_at: '2024-04-28T14:12:09.293Z',
subscription: {
phases: [
{
end_strategy: 'duration',
billing_date_setting: 'phase_start',
products: [
{
id: 'itm_FJKlqUb8COXw55',
catalog_version_id: 'pcv_9x8v7u6t5s4r',
name: 'Product name',
description: 'A description of the product.',
description_display_interval_dates: false,
payment_interval: {period: 'once'},
payment_schedule: 'start',
price: {type: 'fee', amount: 200},
prices: [
{
type: 'volume',
from: 0,
to: 20,
amount: 200,
unit_count: 1,
on_tier_incomplete: null
},
{
type: 'volume',
from: 20,
to: null,
amount: 150,
unit_count: 1,
on_tier_incomplete: null
}
],
count: 2,
unit_name: 'user',
min_committed_count: 2,
min_amount: 123,
max_amount: 123,
bill_usage_difference: false,
credits_expiration_in_days: 123,
expire_credits_at_end_of_period: false,
credits_balance_auto_creation_enabled: true,
estimated_count: 200
}
],
activation_strategy: 'manual',
name: 'Initial term',
type: 'standard',
status: 'pending',
order: 0,
duration: {count: 1, period: 'years'},
initial_billing_at: '2024-12-20T16:04:11Z',
starts_at: '2024-12-20T16:04:11Z',
ends_at: '2024-12-20T16:04:11Z',
billing_cycle_alignment: 'anniversary',
do_not_invoice_phase: false,
minimum_invoice_fee: 10000,
minimum_invoice_fee_products: ['itm_aaaaaaaaaaaaaa'],
transition_calculation_method: 'prorata',
transition_invoicing_schedule: 'immediately',
coupons: [
{
id: '<string>',
duration_count: 123,
expires_at: '2024-12-20T16:04:11Z',
apply_at: '2024-12-20T16:04:11Z',
product_ids: ['<string>']
}
]
}
],
name: '<string>',
purchase_order: '<string>',
invoicing_entity_id: 'ive_jerrb484RHn',
crm_opportunity_id: '<string>',
commitment_interval: {period: 'years', count: 1},
renew_automatically: true,
renew_for: {period: 'years', count: 1},
minimum_invoice_fee: 250,
starts_at: '2024-12-20T16:04:11Z',
contract_start: '2024-01-15T00:00:00Z',
contract_end: '2025-01-15T00:00:00Z',
initial_billing_at: '2024-12-20T16:04:11Z',
shipping_address_id: 'cad_abc123',
display_shipping_details: true,
cancel_at: '2024-12-20T16:04:11Z',
cancellation_amount: 123,
properties: {},
custom_properties: {},
tax_only: true,
generate_draft_invoices: true,
generate_document: true,
document_name: '<string>',
add_tax_to_document: true,
do_not_charge_subscription: true,
invoice_custom_note: '<string>'
}
})
};
fetch('https://api.hyperline.co/v1/quotes', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.hyperline.co/v1/quotes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'customer_id' => 'cus_QalW2vTAdkR6IY',
'template_id' => 'quot_9hNWq4c84Z146W',
'status' => 'draft',
'owner_email' => 'joe@acme.com',
'invoicing_entity_id' => 'ive_47484fjdhy5',
'catalog_version_id' => 'pcv_9x8v7u6t5s4r',
'comments' => 'Please find the contract and subscription details we discussed.',
'terms' => 'By signing this quote, you accept our conditions of use for the use of our products and services.',
'amount' => 20000,
'contract_value' => 18000,
'collect_payment_details' => true,
'collect_custom_property_ids' => [
],
'contract_clause_ids' => [
'ccl_QalW2vTAdkR6IY'
],
'require_tax_id' => false,
'display_quote_value' => true,
'display_quote_value_with_tax' => false,
'display_taxes' => true,
'display_price_tiers' => 'matching',
'display_phase_value' => false,
'display_discounts_on_total' => false,
'display_first_invoice_amount' => false,
'display_documents_in_preview' => false,
'subscription_update_display' => 'quote_update_details',
'display_subscription_on_update' => false,
'generate_draft_invoices' => false,
'automatically_start_subscription' => true,
'expires_at' => '2024-04-28T14:12:09.293Z',
'subscription' => [
'phases' => [
[
'end_strategy' => 'duration',
'billing_date_setting' => 'phase_start',
'products' => [
[
'id' => 'itm_FJKlqUb8COXw55',
'catalog_version_id' => 'pcv_9x8v7u6t5s4r',
'name' => 'Product name',
'description' => 'A description of the product.',
'description_display_interval_dates' => false,
'payment_interval' => [
'period' => 'once'
],
'payment_schedule' => 'start',
'price' => [
'type' => 'fee',
'amount' => 200
],
'prices' => [
[
'type' => 'volume',
'from' => 0,
'to' => 20,
'amount' => 200,
'unit_count' => 1,
'on_tier_incomplete' => null
],
[
'type' => 'volume',
'from' => 20,
'to' => null,
'amount' => 150,
'unit_count' => 1,
'on_tier_incomplete' => null
]
],
'count' => 2,
'unit_name' => 'user',
'min_committed_count' => 2,
'min_amount' => 123,
'max_amount' => 123,
'bill_usage_difference' => false,
'credits_expiration_in_days' => 123,
'expire_credits_at_end_of_period' => false,
'credits_balance_auto_creation_enabled' => true,
'estimated_count' => 200
]
],
'activation_strategy' => 'manual',
'name' => 'Initial term',
'type' => 'standard',
'status' => 'pending',
'order' => 0,
'duration' => [
'count' => 1,
'period' => 'years'
],
'initial_billing_at' => '2024-12-20T16:04:11Z',
'starts_at' => '2024-12-20T16:04:11Z',
'ends_at' => '2024-12-20T16:04:11Z',
'billing_cycle_alignment' => 'anniversary',
'do_not_invoice_phase' => false,
'minimum_invoice_fee' => 10000,
'minimum_invoice_fee_products' => [
'itm_aaaaaaaaaaaaaa'
],
'transition_calculation_method' => 'prorata',
'transition_invoicing_schedule' => 'immediately',
'coupons' => [
[
'id' => '<string>',
'duration_count' => 123,
'expires_at' => '2024-12-20T16:04:11Z',
'apply_at' => '2024-12-20T16:04:11Z',
'product_ids' => [
'<string>'
]
]
]
]
],
'name' => '<string>',
'purchase_order' => '<string>',
'invoicing_entity_id' => 'ive_jerrb484RHn',
'crm_opportunity_id' => '<string>',
'commitment_interval' => [
'period' => 'years',
'count' => 1
],
'renew_automatically' => true,
'renew_for' => [
'period' => 'years',
'count' => 1
],
'minimum_invoice_fee' => 250,
'starts_at' => '2024-12-20T16:04:11Z',
'contract_start' => '2024-01-15T00:00:00Z',
'contract_end' => '2025-01-15T00:00:00Z',
'initial_billing_at' => '2024-12-20T16:04:11Z',
'shipping_address_id' => 'cad_abc123',
'display_shipping_details' => true,
'cancel_at' => '2024-12-20T16:04:11Z',
'cancellation_amount' => 123,
'properties' => [
],
'custom_properties' => [
],
'tax_only' => true,
'generate_draft_invoices' => true,
'generate_document' => true,
'document_name' => '<string>',
'add_tax_to_document' => true,
'do_not_charge_subscription' => true,
'invoice_custom_note' => '<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.hyperline.co/v1/quotes"
payload := strings.NewReader("{\n \"customer_id\": \"cus_QalW2vTAdkR6IY\",\n \"template_id\": \"quot_9hNWq4c84Z146W\",\n \"status\": \"draft\",\n \"owner_email\": \"joe@acme.com\",\n \"invoicing_entity_id\": \"ive_47484fjdhy5\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"comments\": \"Please find the contract and subscription details we discussed.\",\n \"terms\": \"By signing this quote, you accept our conditions of use for the use of our products and services.\",\n \"amount\": 20000,\n \"contract_value\": 18000,\n \"collect_payment_details\": true,\n \"collect_custom_property_ids\": [],\n \"contract_clause_ids\": [\n \"ccl_QalW2vTAdkR6IY\"\n ],\n \"require_tax_id\": false,\n \"display_quote_value\": true,\n \"display_quote_value_with_tax\": false,\n \"display_taxes\": true,\n \"display_price_tiers\": \"matching\",\n \"display_phase_value\": false,\n \"display_discounts_on_total\": false,\n \"display_first_invoice_amount\": false,\n \"display_documents_in_preview\": false,\n \"subscription_update_display\": \"quote_update_details\",\n \"display_subscription_on_update\": false,\n \"generate_draft_invoices\": false,\n \"automatically_start_subscription\": true,\n \"expires_at\": \"2024-04-28T14:12:09.293Z\",\n \"subscription\": {\n \"phases\": [\n {\n \"end_strategy\": \"duration\",\n \"billing_date_setting\": \"phase_start\",\n \"products\": [\n {\n \"id\": \"itm_FJKlqUb8COXw55\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"name\": \"Product name\",\n \"description\": \"A description of the product.\",\n \"description_display_interval_dates\": false,\n \"payment_interval\": {\n \"period\": \"once\"\n },\n \"payment_schedule\": \"start\",\n \"price\": {\n \"type\": \"fee\",\n \"amount\": 200\n },\n \"prices\": [\n {\n \"type\": \"volume\",\n \"from\": 0,\n \"to\": 20,\n \"amount\": 200,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n },\n {\n \"type\": \"volume\",\n \"from\": 20,\n \"to\": null,\n \"amount\": 150,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n }\n ],\n \"count\": 2,\n \"unit_name\": \"user\",\n \"min_committed_count\": 2,\n \"min_amount\": 123,\n \"max_amount\": 123,\n \"bill_usage_difference\": false,\n \"credits_expiration_in_days\": 123,\n \"expire_credits_at_end_of_period\": false,\n \"credits_balance_auto_creation_enabled\": true,\n \"estimated_count\": 200\n }\n ],\n \"activation_strategy\": \"manual\",\n \"name\": \"Initial term\",\n \"type\": \"standard\",\n \"status\": \"pending\",\n \"order\": 0,\n \"duration\": {\n \"count\": 1,\n \"period\": \"years\"\n },\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"ends_at\": \"2024-12-20T16:04:11Z\",\n \"billing_cycle_alignment\": \"anniversary\",\n \"do_not_invoice_phase\": false,\n \"minimum_invoice_fee\": 10000,\n \"minimum_invoice_fee_products\": [\n \"itm_aaaaaaaaaaaaaa\"\n ],\n \"transition_calculation_method\": \"prorata\",\n \"transition_invoicing_schedule\": \"immediately\",\n \"coupons\": [\n {\n \"id\": \"<string>\",\n \"duration_count\": 123,\n \"expires_at\": \"2024-12-20T16:04:11Z\",\n \"apply_at\": \"2024-12-20T16:04:11Z\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n }\n ],\n \"name\": \"<string>\",\n \"purchase_order\": \"<string>\",\n \"invoicing_entity_id\": \"ive_jerrb484RHn\",\n \"crm_opportunity_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"renew_automatically\": true,\n \"renew_for\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"minimum_invoice_fee\": 250,\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"contract_start\": \"2024-01-15T00:00:00Z\",\n \"contract_end\": \"2025-01-15T00:00:00Z\",\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"shipping_address_id\": \"cad_abc123\",\n \"display_shipping_details\": true,\n \"cancel_at\": \"2024-12-20T16:04:11Z\",\n \"cancellation_amount\": 123,\n \"properties\": {},\n \"custom_properties\": {},\n \"tax_only\": true,\n \"generate_draft_invoices\": true,\n \"generate_document\": true,\n \"document_name\": \"<string>\",\n \"add_tax_to_document\": true,\n \"do_not_charge_subscription\": true,\n \"invoice_custom_note\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.hyperline.co/v1/quotes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"customer_id\": \"cus_QalW2vTAdkR6IY\",\n \"template_id\": \"quot_9hNWq4c84Z146W\",\n \"status\": \"draft\",\n \"owner_email\": \"joe@acme.com\",\n \"invoicing_entity_id\": \"ive_47484fjdhy5\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"comments\": \"Please find the contract and subscription details we discussed.\",\n \"terms\": \"By signing this quote, you accept our conditions of use for the use of our products and services.\",\n \"amount\": 20000,\n \"contract_value\": 18000,\n \"collect_payment_details\": true,\n \"collect_custom_property_ids\": [],\n \"contract_clause_ids\": [\n \"ccl_QalW2vTAdkR6IY\"\n ],\n \"require_tax_id\": false,\n \"display_quote_value\": true,\n \"display_quote_value_with_tax\": false,\n \"display_taxes\": true,\n \"display_price_tiers\": \"matching\",\n \"display_phase_value\": false,\n \"display_discounts_on_total\": false,\n \"display_first_invoice_amount\": false,\n \"display_documents_in_preview\": false,\n \"subscription_update_display\": \"quote_update_details\",\n \"display_subscription_on_update\": false,\n \"generate_draft_invoices\": false,\n \"automatically_start_subscription\": true,\n \"expires_at\": \"2024-04-28T14:12:09.293Z\",\n \"subscription\": {\n \"phases\": [\n {\n \"end_strategy\": \"duration\",\n \"billing_date_setting\": \"phase_start\",\n \"products\": [\n {\n \"id\": \"itm_FJKlqUb8COXw55\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"name\": \"Product name\",\n \"description\": \"A description of the product.\",\n \"description_display_interval_dates\": false,\n \"payment_interval\": {\n \"period\": \"once\"\n },\n \"payment_schedule\": \"start\",\n \"price\": {\n \"type\": \"fee\",\n \"amount\": 200\n },\n \"prices\": [\n {\n \"type\": \"volume\",\n \"from\": 0,\n \"to\": 20,\n \"amount\": 200,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n },\n {\n \"type\": \"volume\",\n \"from\": 20,\n \"to\": null,\n \"amount\": 150,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n }\n ],\n \"count\": 2,\n \"unit_name\": \"user\",\n \"min_committed_count\": 2,\n \"min_amount\": 123,\n \"max_amount\": 123,\n \"bill_usage_difference\": false,\n \"credits_expiration_in_days\": 123,\n \"expire_credits_at_end_of_period\": false,\n \"credits_balance_auto_creation_enabled\": true,\n \"estimated_count\": 200\n }\n ],\n \"activation_strategy\": \"manual\",\n \"name\": \"Initial term\",\n \"type\": \"standard\",\n \"status\": \"pending\",\n \"order\": 0,\n \"duration\": {\n \"count\": 1,\n \"period\": \"years\"\n },\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"ends_at\": \"2024-12-20T16:04:11Z\",\n \"billing_cycle_alignment\": \"anniversary\",\n \"do_not_invoice_phase\": false,\n \"minimum_invoice_fee\": 10000,\n \"minimum_invoice_fee_products\": [\n \"itm_aaaaaaaaaaaaaa\"\n ],\n \"transition_calculation_method\": \"prorata\",\n \"transition_invoicing_schedule\": \"immediately\",\n \"coupons\": [\n {\n \"id\": \"<string>\",\n \"duration_count\": 123,\n \"expires_at\": \"2024-12-20T16:04:11Z\",\n \"apply_at\": \"2024-12-20T16:04:11Z\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n }\n ],\n \"name\": \"<string>\",\n \"purchase_order\": \"<string>\",\n \"invoicing_entity_id\": \"ive_jerrb484RHn\",\n \"crm_opportunity_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"renew_automatically\": true,\n \"renew_for\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"minimum_invoice_fee\": 250,\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"contract_start\": \"2024-01-15T00:00:00Z\",\n \"contract_end\": \"2025-01-15T00:00:00Z\",\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"shipping_address_id\": \"cad_abc123\",\n \"display_shipping_details\": true,\n \"cancel_at\": \"2024-12-20T16:04:11Z\",\n \"cancellation_amount\": 123,\n \"properties\": {},\n \"custom_properties\": {},\n \"tax_only\": true,\n \"generate_draft_invoices\": true,\n \"generate_document\": true,\n \"document_name\": \"<string>\",\n \"add_tax_to_document\": true,\n \"do_not_charge_subscription\": true,\n \"invoice_custom_note\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hyperline.co/v1/quotes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customer_id\": \"cus_QalW2vTAdkR6IY\",\n \"template_id\": \"quot_9hNWq4c84Z146W\",\n \"status\": \"draft\",\n \"owner_email\": \"joe@acme.com\",\n \"invoicing_entity_id\": \"ive_47484fjdhy5\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"comments\": \"Please find the contract and subscription details we discussed.\",\n \"terms\": \"By signing this quote, you accept our conditions of use for the use of our products and services.\",\n \"amount\": 20000,\n \"contract_value\": 18000,\n \"collect_payment_details\": true,\n \"collect_custom_property_ids\": [],\n \"contract_clause_ids\": [\n \"ccl_QalW2vTAdkR6IY\"\n ],\n \"require_tax_id\": false,\n \"display_quote_value\": true,\n \"display_quote_value_with_tax\": false,\n \"display_taxes\": true,\n \"display_price_tiers\": \"matching\",\n \"display_phase_value\": false,\n \"display_discounts_on_total\": false,\n \"display_first_invoice_amount\": false,\n \"display_documents_in_preview\": false,\n \"subscription_update_display\": \"quote_update_details\",\n \"display_subscription_on_update\": false,\n \"generate_draft_invoices\": false,\n \"automatically_start_subscription\": true,\n \"expires_at\": \"2024-04-28T14:12:09.293Z\",\n \"subscription\": {\n \"phases\": [\n {\n \"end_strategy\": \"duration\",\n \"billing_date_setting\": \"phase_start\",\n \"products\": [\n {\n \"id\": \"itm_FJKlqUb8COXw55\",\n \"catalog_version_id\": \"pcv_9x8v7u6t5s4r\",\n \"name\": \"Product name\",\n \"description\": \"A description of the product.\",\n \"description_display_interval_dates\": false,\n \"payment_interval\": {\n \"period\": \"once\"\n },\n \"payment_schedule\": \"start\",\n \"price\": {\n \"type\": \"fee\",\n \"amount\": 200\n },\n \"prices\": [\n {\n \"type\": \"volume\",\n \"from\": 0,\n \"to\": 20,\n \"amount\": 200,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n },\n {\n \"type\": \"volume\",\n \"from\": 20,\n \"to\": null,\n \"amount\": 150,\n \"unit_count\": 1,\n \"on_tier_incomplete\": null\n }\n ],\n \"count\": 2,\n \"unit_name\": \"user\",\n \"min_committed_count\": 2,\n \"min_amount\": 123,\n \"max_amount\": 123,\n \"bill_usage_difference\": false,\n \"credits_expiration_in_days\": 123,\n \"expire_credits_at_end_of_period\": false,\n \"credits_balance_auto_creation_enabled\": true,\n \"estimated_count\": 200\n }\n ],\n \"activation_strategy\": \"manual\",\n \"name\": \"Initial term\",\n \"type\": \"standard\",\n \"status\": \"pending\",\n \"order\": 0,\n \"duration\": {\n \"count\": 1,\n \"period\": \"years\"\n },\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"ends_at\": \"2024-12-20T16:04:11Z\",\n \"billing_cycle_alignment\": \"anniversary\",\n \"do_not_invoice_phase\": false,\n \"minimum_invoice_fee\": 10000,\n \"minimum_invoice_fee_products\": [\n \"itm_aaaaaaaaaaaaaa\"\n ],\n \"transition_calculation_method\": \"prorata\",\n \"transition_invoicing_schedule\": \"immediately\",\n \"coupons\": [\n {\n \"id\": \"<string>\",\n \"duration_count\": 123,\n \"expires_at\": \"2024-12-20T16:04:11Z\",\n \"apply_at\": \"2024-12-20T16:04:11Z\",\n \"product_ids\": [\n \"<string>\"\n ]\n }\n ]\n }\n ],\n \"name\": \"<string>\",\n \"purchase_order\": \"<string>\",\n \"invoicing_entity_id\": \"ive_jerrb484RHn\",\n \"crm_opportunity_id\": \"<string>\",\n \"commitment_interval\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"renew_automatically\": true,\n \"renew_for\": {\n \"period\": \"years\",\n \"count\": 1\n },\n \"minimum_invoice_fee\": 250,\n \"starts_at\": \"2024-12-20T16:04:11Z\",\n \"contract_start\": \"2024-01-15T00:00:00Z\",\n \"contract_end\": \"2025-01-15T00:00:00Z\",\n \"initial_billing_at\": \"2024-12-20T16:04:11Z\",\n \"shipping_address_id\": \"cad_abc123\",\n \"display_shipping_details\": true,\n \"cancel_at\": \"2024-12-20T16:04:11Z\",\n \"cancellation_amount\": 123,\n \"properties\": {},\n \"custom_properties\": {},\n \"tax_only\": true,\n \"generate_draft_invoices\": true,\n \"generate_document\": true,\n \"document_name\": \"<string>\",\n \"add_tax_to_document\": true,\n \"do_not_charge_subscription\": true,\n \"invoice_custom_note\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"id": "quo_hXQCd5y8P3GYXa",
"type": "subscription",
"status": "draft",
"amount": 200000,
"customer_id": "cus_QalW2vTAdkR6IY",
"invoicing_entity_id": "ive_47484fjdhy5",
"configurations": [
{
"id": "<string>",
"customer_id": "<string>",
"position": 123,
"amount": 123,
"applied_at": "2024-12-20T16:04:11Z",
"type": "subscription",
"subscription_id": "<string>",
"contract_terms": {
"status": "active",
"activation_strategy": "start_date",
"end_strategy": "duration",
"starts_at": "2024-12-31T23:00:00.000Z",
"ends_at": "2025-06-30T21:59:59.999Z",
"duration": {
"count": 6,
"period": "months"
},
"renew_automatically": true,
"renew_for_duration": {
"count": 1,
"period": "years"
},
"current_period_started_at": "2025-06-30T22:00:00.000Z",
"current_period_ends_at": "2026-06-30T21:59:59.999Z"
},
"estimates": [
{
"product_id": "itm_3kXODIM1sBwBbJ",
"price_configuration_id": "prc_8f3kXODIM1sBwB",
"phase_order": 0,
"period_start": "2026-01-01T00:00:00.000Z",
"period_end": "2026-12-31T23:59:59.999Z",
"estimated_count": 200,
"estimated_amount": 2000,
"estimated_total_amount": 24000
}
]
}
],
"template_id": "quot_9hNWq4c84Z146W",
"crm_opportunity_id": "opp_Z2oSqnBCUoo1bQ",
"custom_properties": {},
"contract_value": 18000,
"number": "327",
"comments": "Please find the contract and subscription details we discussed.",
"terms": "By signing this quote, you accept our conditions of use for the use of our products and services.",
"owner_email": "joe@acme.com",
"collect_payment_details": true,
"collect_custom_property_ids": [],
"require_tax_id": false,
"display_quote_value": true,
"display_quote_value_with_tax": false,
"display_taxes": true,
"display_price_tiers": "matching",
"display_phase_value": false,
"display_discounts_on_total": false,
"display_first_invoice_amount": false,
"display_documents_in_preview": false,
"subscription_update_display": "quote_update_details",
"post_signature_activation_enabled": true,
"generate_draft_invoices": false,
"attachments": [
{
"id": "quof_5GYXy8P3QCdaXh",
"name": "General Conditions of Sale",
"mimetype": "application/pdf"
}
],
"signed_file": null,
"url": "https://billing.hyperline.co/quote/quo_hXQCd5y8P3GYXa",
"created_at": "2024-04-23T09:10:00.220Z",
"updated_at": "2024-04-23T10:22:08.100Z",
"expires_at": null,
"subscription_id": "<string>",
"display_subscription_on_update": false,
"warnings": [
{
"code": "subscription_template_configuration_not_found",
"subscription_template_id": "subt_ieLWHmDZVMoznt",
"currency": "EUR",
"country": "DE"
}
],
"invoice_id": "<string>",
"child_subscription_ids": [
"<string>"
]
}
