curl --request PUT \
--url https://eu.sequencehq.com/api/quotes/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3",
"title": "My updated quote",
"currency": "GBP",
"dealType": "NEW_BUSINESS",
"preliminaryBillingStartDate": "2022-10-01",
"expiryDays": 30,
"phases": [
{
"name": "My new phase",
"prices": [
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "20.00",
"pricingType": "FIXED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": false,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{
"price": "0.75",
"fee": "25.00"
}
],
"prorateFlatFees": false,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": false
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": false
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": false
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": {
"frequency": "MONTHLY",
"interval": 1
}
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"discounts": [
{
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"type": "PERCENTAGE",
"amount": "50",
"message": "message",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"amount": "50"
}
]
}
],
"contactIds": [
"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"
],
"counterSignerIds": [
"0190dae7-7228-7619-aad8-c51f56733b2b"
],
"integrationIds": [
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF"
}
],
"salesforceOpportunityId": "a00Hr00001BiFbjIAF",
"attachmentAssetIds": [
"0191761e-197f-79b6-b30a-012b54eae71b"
],
"defaultDueDateDays": 30
}
'import requests
url = "https://eu.sequencehq.com/api/quotes/{id}"
payload = {
"customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3",
"title": "My updated quote",
"currency": "GBP",
"dealType": "NEW_BUSINESS",
"preliminaryBillingStartDate": "2022-10-01",
"expiryDays": 30,
"phases": [
{
"name": "My new phase",
"prices": [
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "20.00",
"pricingType": "FIXED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": False,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{
"price": "0.75",
"fee": "25.00"
}
],
"prorateFlatFees": False,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": False
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": False
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": False
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": {
"frequency": "MONTHLY",
"interval": 1
}
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": True,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": True,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"discounts": [
{
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"type": "PERCENTAGE",
"amount": "50",
"message": "message",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"amount": "50"
}
]
}
],
"contactIds": ["9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"],
"counterSignerIds": ["0190dae7-7228-7619-aad8-c51f56733b2b"],
"integrationIds": [
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF"
}
],
"salesforceOpportunityId": "a00Hr00001BiFbjIAF",
"attachmentAssetIds": ["0191761e-197f-79b6-b30a-012b54eae71b"],
"defaultDueDateDays": 30
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '377bf97b-ca1d-4538-be06-4022afa6bde3',
title: 'My updated quote',
currency: 'GBP',
dealType: 'NEW_BUSINESS',
preliminaryBillingStartDate: '2022-10-01',
expiryDays: 30,
phases: [
{
name: 'My new phase',
prices: [
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {price: '150.00', pricingType: 'ONE_TIME'},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {price: '20.00', pricingType: 'FIXED'},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
pricePerUnit: '0.25',
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
isPricePercentage: false,
pricingType: 'LINEAR'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
seatMetricId: 'bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730',
pricePerSeat: '0.25',
prorationStrategy: 'USE_MAXIMUM',
contractedMinimumSeats: 10,
overagesBillingFrequency: 'YEARLY',
tiers: [
{upperBound: '100', price: '1.00', fee: '50.00'},
{price: '0.75', fee: '25.00'}
],
prorateFlatFees: false,
pricingType: 'SEAT_BASED'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
tiers: [
{upperBound: '200', price: '1.00', fee: '50.00', isPricePercentage: false},
{upperBound: '400', price: '0.75', fee: '25.00', isPricePercentage: false},
{price: '0.50', fee: '0.00', isPricePercentage: false}
],
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
usageCalculationMode: 'BILLING_PERIOD',
pricingType: 'GRADUATED'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100',
usageCalculationPeriod: {frequency: 'MONTHLY', interval: 1}
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
tiers: [
{
upperBound: '100',
price: '1.00',
fee: '50.00',
isPricePercentage: true,
maxPrice: '10',
minPrice: '5'
},
{
price: '0.75',
fee: '25.00',
isPricePercentage: true,
maxPrice: '10',
minPrice: '5'
}
],
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
pricingType: 'VOLUME'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
packageSize: '50',
pricePerPackage: '2.00',
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
pricingType: 'PACKAGE'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
}
],
duration: {days: 0, weeks: 0, months: 6, years: 1},
discounts: [
{
restrictToPrices: ['5100e884-e007-4183-8355-4771865cb4d7'],
type: 'PERCENTAGE',
amount: '50',
message: 'message',
seatDiscountType: 'ALL_SEATS'
}
],
minimums: [{restrictToPrices: ['5100e884-e007-4183-8355-4771865cb4d7'], amount: '50'}]
}
],
contactIds: ['9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc'],
counterSignerIds: ['0190dae7-7228-7619-aad8-c51f56733b2b'],
integrationIds: [{service: 'Salesforce', id: 'a00Hr00001BiFbjIAF'}],
salesforceOpportunityId: 'a00Hr00001BiFbjIAF',
attachmentAssetIds: ['0191761e-197f-79b6-b30a-012b54eae71b'],
defaultDueDateDays: 30
})
};
fetch('https://eu.sequencehq.com/api/quotes/{id}', 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://eu.sequencehq.com/api/quotes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => '377bf97b-ca1d-4538-be06-4022afa6bde3',
'title' => 'My updated quote',
'currency' => 'GBP',
'dealType' => 'NEW_BUSINESS',
'preliminaryBillingStartDate' => '2022-10-01',
'expiryDays' => 30,
'phases' => [
[
'name' => 'My new phase',
'prices' => [
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'price' => '150.00',
'pricingType' => 'ONE_TIME'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'price' => '20.00',
'pricingType' => 'FIXED'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'pricePerUnit' => '0.25',
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'isPricePercentage' => false,
'pricingType' => 'LINEAR'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'seatMetricId' => 'bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730',
'pricePerSeat' => '0.25',
'prorationStrategy' => 'USE_MAXIMUM',
'contractedMinimumSeats' => 10,
'overagesBillingFrequency' => 'YEARLY',
'tiers' => [
[
'upperBound' => '100',
'price' => '1.00',
'fee' => '50.00'
],
[
'price' => '0.75',
'fee' => '25.00'
]
],
'prorateFlatFees' => false,
'pricingType' => 'SEAT_BASED'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'tiers' => [
[
'upperBound' => '200',
'price' => '1.00',
'fee' => '50.00',
'isPricePercentage' => false
],
[
'upperBound' => '400',
'price' => '0.75',
'fee' => '25.00',
'isPricePercentage' => false
],
[
'price' => '0.50',
'fee' => '0.00',
'isPricePercentage' => false
]
],
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'usageCalculationMode' => 'BILLING_PERIOD',
'pricingType' => 'GRADUATED'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100',
'usageCalculationPeriod' => [
'frequency' => 'MONTHLY',
'interval' => 1
]
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'tiers' => [
[
'upperBound' => '100',
'price' => '1.00',
'fee' => '50.00',
'isPricePercentage' => true,
'maxPrice' => '10',
'minPrice' => '5'
],
[
'price' => '0.75',
'fee' => '25.00',
'isPricePercentage' => true,
'maxPrice' => '10',
'minPrice' => '5'
]
],
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'pricingType' => 'VOLUME'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'packageSize' => '50',
'pricePerPackage' => '2.00',
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'pricingType' => 'PACKAGE'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
]
],
'duration' => [
'days' => 0,
'weeks' => 0,
'months' => 6,
'years' => 1
],
'discounts' => [
[
'restrictToPrices' => [
'5100e884-e007-4183-8355-4771865cb4d7'
],
'type' => 'PERCENTAGE',
'amount' => '50',
'message' => 'message',
'seatDiscountType' => 'ALL_SEATS'
]
],
'minimums' => [
[
'restrictToPrices' => [
'5100e884-e007-4183-8355-4771865cb4d7'
],
'amount' => '50'
]
]
]
],
'contactIds' => [
'9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc'
],
'counterSignerIds' => [
'0190dae7-7228-7619-aad8-c51f56733b2b'
],
'integrationIds' => [
[
'service' => 'Salesforce',
'id' => 'a00Hr00001BiFbjIAF'
]
],
'salesforceOpportunityId' => 'a00Hr00001BiFbjIAF',
'attachmentAssetIds' => [
'0191761e-197f-79b6-b30a-012b54eae71b'
],
'defaultDueDateDays' => 30
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://eu.sequencehq.com/api/quotes/{id}"
payload := strings.NewReader("{\n \"customerId\": \"377bf97b-ca1d-4538-be06-4022afa6bde3\",\n \"title\": \"My updated quote\",\n \"currency\": \"GBP\",\n \"dealType\": \"NEW_BUSINESS\",\n \"preliminaryBillingStartDate\": \"2022-10-01\",\n \"expiryDays\": 30,\n \"phases\": [\n {\n \"name\": \"My new phase\",\n \"prices\": [\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"150.00\",\n \"pricingType\": \"ONE_TIME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"20.00\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"pricePerUnit\": \"0.25\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"isPricePercentage\": false,\n \"pricingType\": \"LINEAR\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"seatMetricId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"pricePerSeat\": \"0.25\",\n \"prorationStrategy\": \"USE_MAXIMUM\",\n \"contractedMinimumSeats\": 10,\n \"overagesBillingFrequency\": \"YEARLY\",\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\"\n }\n ],\n \"prorateFlatFees\": false,\n \"pricingType\": \"SEAT_BASED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"200\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": false\n },\n {\n \"upperBound\": \"400\",\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": false\n },\n {\n \"price\": \"0.50\",\n \"fee\": \"0.00\",\n \"isPricePercentage\": false\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"usageCalculationMode\": \"BILLING_PERIOD\",\n \"pricingType\": \"GRADUATED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\",\n \"usageCalculationPeriod\": {\n \"frequency\": \"MONTHLY\",\n \"interval\": 1\n }\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"VOLUME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"packageSize\": \"50\",\n \"pricePerPackage\": \"2.00\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"PACKAGE\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n }\n ],\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 6,\n \"years\": 1\n },\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"50\",\n \"message\": \"message\",\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"amount\": \"50\"\n }\n ]\n }\n ],\n \"contactIds\": [\n \"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc\"\n ],\n \"counterSignerIds\": [\n \"0190dae7-7228-7619-aad8-c51f56733b2b\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Salesforce\",\n \"id\": \"a00Hr00001BiFbjIAF\"\n }\n ],\n \"salesforceOpportunityId\": \"a00Hr00001BiFbjIAF\",\n \"attachmentAssetIds\": [\n \"0191761e-197f-79b6-b30a-012b54eae71b\"\n ],\n \"defaultDueDateDays\": 30\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://eu.sequencehq.com/api/quotes/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"377bf97b-ca1d-4538-be06-4022afa6bde3\",\n \"title\": \"My updated quote\",\n \"currency\": \"GBP\",\n \"dealType\": \"NEW_BUSINESS\",\n \"preliminaryBillingStartDate\": \"2022-10-01\",\n \"expiryDays\": 30,\n \"phases\": [\n {\n \"name\": \"My new phase\",\n \"prices\": [\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"150.00\",\n \"pricingType\": \"ONE_TIME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"20.00\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"pricePerUnit\": \"0.25\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"isPricePercentage\": false,\n \"pricingType\": \"LINEAR\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"seatMetricId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"pricePerSeat\": \"0.25\",\n \"prorationStrategy\": \"USE_MAXIMUM\",\n \"contractedMinimumSeats\": 10,\n \"overagesBillingFrequency\": \"YEARLY\",\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\"\n }\n ],\n \"prorateFlatFees\": false,\n \"pricingType\": \"SEAT_BASED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"200\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": false\n },\n {\n \"upperBound\": \"400\",\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": false\n },\n {\n \"price\": \"0.50\",\n \"fee\": \"0.00\",\n \"isPricePercentage\": false\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"usageCalculationMode\": \"BILLING_PERIOD\",\n \"pricingType\": \"GRADUATED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\",\n \"usageCalculationPeriod\": {\n \"frequency\": \"MONTHLY\",\n \"interval\": 1\n }\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"VOLUME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"packageSize\": \"50\",\n \"pricePerPackage\": \"2.00\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"PACKAGE\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n }\n ],\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 6,\n \"years\": 1\n },\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"50\",\n \"message\": \"message\",\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"amount\": \"50\"\n }\n ]\n }\n ],\n \"contactIds\": [\n \"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc\"\n ],\n \"counterSignerIds\": [\n \"0190dae7-7228-7619-aad8-c51f56733b2b\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Salesforce\",\n \"id\": \"a00Hr00001BiFbjIAF\"\n }\n ],\n \"salesforceOpportunityId\": \"a00Hr00001BiFbjIAF\",\n \"attachmentAssetIds\": [\n \"0191761e-197f-79b6-b30a-012b54eae71b\"\n ],\n \"defaultDueDateDays\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/quotes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"377bf97b-ca1d-4538-be06-4022afa6bde3\",\n \"title\": \"My updated quote\",\n \"currency\": \"GBP\",\n \"dealType\": \"NEW_BUSINESS\",\n \"preliminaryBillingStartDate\": \"2022-10-01\",\n \"expiryDays\": 30,\n \"phases\": [\n {\n \"name\": \"My new phase\",\n \"prices\": [\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"150.00\",\n \"pricingType\": \"ONE_TIME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"20.00\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"pricePerUnit\": \"0.25\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"isPricePercentage\": false,\n \"pricingType\": \"LINEAR\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"seatMetricId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"pricePerSeat\": \"0.25\",\n \"prorationStrategy\": \"USE_MAXIMUM\",\n \"contractedMinimumSeats\": 10,\n \"overagesBillingFrequency\": \"YEARLY\",\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\"\n }\n ],\n \"prorateFlatFees\": false,\n \"pricingType\": \"SEAT_BASED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"200\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": false\n },\n {\n \"upperBound\": \"400\",\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": false\n },\n {\n \"price\": \"0.50\",\n \"fee\": \"0.00\",\n \"isPricePercentage\": false\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"usageCalculationMode\": \"BILLING_PERIOD\",\n \"pricingType\": \"GRADUATED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\",\n \"usageCalculationPeriod\": {\n \"frequency\": \"MONTHLY\",\n \"interval\": 1\n }\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"VOLUME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"packageSize\": \"50\",\n \"pricePerPackage\": \"2.00\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"PACKAGE\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n }\n ],\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 6,\n \"years\": 1\n },\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"50\",\n \"message\": \"message\",\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"amount\": \"50\"\n }\n ]\n }\n ],\n \"contactIds\": [\n \"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc\"\n ],\n \"counterSignerIds\": [\n \"0190dae7-7228-7619-aad8-c51f56733b2b\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Salesforce\",\n \"id\": \"a00Hr00001BiFbjIAF\"\n }\n ],\n \"salesforceOpportunityId\": \"a00Hr00001BiFbjIAF\",\n \"attachmentAssetIds\": [\n \"0191761e-197f-79b6-b30a-012b54eae71b\"\n ],\n \"defaultDueDateDays\": 30\n}"
response = http.request(request)
puts response.read_body{
"id": "678ca125-8bc3-478f-9a96-6ba73605cf1e",
"createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da",
"customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3",
"quoteNumber": "Q00001",
"title": "My quote",
"currency": "GBP",
"status": "ACCEPTED",
"dealType": "NEW_BUSINESS",
"preliminaryBillingStartDate": "2022-10-01",
"expiresAt": "2022-10-01",
"publishedAt": "2022-06-28T16:47:00Z",
"readyToSignAt": "2022-06-28T16:47:00Z",
"acceptedAt": "2022-06-28T16:47:00Z",
"executedAt": "2022-06-28T16:47:00Z",
"createdAt": "2022-06-28T16:47:00Z",
"updatedAt": "2022-06-28T16:47:00Z",
"createdFrom": {
"entityType": "QUOTE",
"entityId": "dc0e2104-7df5-4fc1-8f65-1823f427d111"
},
"salesforceOpportunityId": "006Hr00001MfnEIIAZ",
"expiryDays": 30,
"merchantBranding": {
"logoUrl": "logo",
"legalCompanyName": "Acme Corp",
"primaryColour": "colour",
"url": "www.example.com",
"address": {
"line1": "1 Market Street",
"line2": "Suite 100",
"town": "San Francisco",
"state": "CA",
"postcode": "94105",
"country": "US"
},
"email": "accounting@example.com",
"showUsageInCustomerPortal": true,
"supportEmail": "support@example.com",
"supportUrl": "https://www.example.com/support"
},
"phases": [
{
"id": "abe4bf01-9b75-495d-f5fd-ca82b001f3a8",
"name": "Onboarding",
"createdAt": "2022-06-28T16:47:00Z",
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"prices": [
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "20.00",
"pricingType": "FIXED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": false,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{
"price": "0.75",
"fee": "25.00"
}
],
"prorateFlatFees": false,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": false
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": false
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": false
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": {
"frequency": "MONTHLY",
"interval": 1
}
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"discounts": [
{
"id": "018f920a-40d1-7e62-91ca-f3a4b4ac5d9d",
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"amount": "50",
"discountCalculationType": "PERCENTAGE",
"message": "message",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"id": "018f9164-c2d9-7eb2-bb98-11ecb5454055",
"amount": "50",
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z"
}
]
}
],
"archivedAt": "2022-06-28T16:47:00Z",
"approvalWorkflowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contactIds": [
"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"
],
"contacts": [
{
"contactId": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc",
"name": "Jane Doe",
"email": "jane@example.com",
"signedAt": "2022-06-28T16:47:00Z"
}
],
"counterSigners": [
{
"id": "0190da0c-980d-7fa2-9b65-4c79784a95b1",
"name": "Jane Doe",
"email": "jane@example.com",
"signedAt": "2022-06-28T16:47:00Z"
}
],
"isSignaturesEnabled": false,
"integrationIds": [
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF",
"isPending": false
}
],
"customerLegalName": "Acme Corp",
"customerAddress": {
"line1": "1 Fake Street",
"line2": "Fakesville",
"town": "Faketown",
"state": "CA",
"postcode": "F4KE",
"country": "US"
},
"pdfStatus": "NOT_YET_REQUESTED",
"attachmentAssets": [
{
"id": "e007e884-5100-4183-8355-4771865cb4dd",
"createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b",
"createdByType": "SEQUENCE_USER",
"type": "IMAGE",
"format": "PNG",
"fileName": "my-image.png",
"fileSizeBytes": 12345,
"url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
"createdAt": "2022-06-28T16:47:00Z"
}
],
"isExpired": false,
"defaultDueDateDays": 30,
"signatureMode": "EMBEDDED",
"preparingSignatureRequestAt": "2022-06-28T16:47:00Z",
"activeErrors": [
{
"id": "0190b1f2-1234-7000-8000-000000000001",
"errorCode": "DROPBOX_SIGNATURE_REQUEST_REJECTED",
"recoveryAction": "CONTACT_SUPPORT",
"createdAt": "2022-06-28T16:47:00Z",
"errorContext": {}
}
]
}This response has no body data.This response has no body data.This response has no body data.This response has no body data.Update one of your quotes
Update a quote including its phases
curl --request PUT \
--url https://eu.sequencehq.com/api/quotes/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3",
"title": "My updated quote",
"currency": "GBP",
"dealType": "NEW_BUSINESS",
"preliminaryBillingStartDate": "2022-10-01",
"expiryDays": 30,
"phases": [
{
"name": "My new phase",
"prices": [
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "20.00",
"pricingType": "FIXED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": false,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{
"price": "0.75",
"fee": "25.00"
}
],
"prorateFlatFees": false,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": false
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": false
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": false
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": {
"frequency": "MONTHLY",
"interval": 1
}
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"discounts": [
{
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"type": "PERCENTAGE",
"amount": "50",
"message": "message",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"amount": "50"
}
]
}
],
"contactIds": [
"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"
],
"counterSignerIds": [
"0190dae7-7228-7619-aad8-c51f56733b2b"
],
"integrationIds": [
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF"
}
],
"salesforceOpportunityId": "a00Hr00001BiFbjIAF",
"attachmentAssetIds": [
"0191761e-197f-79b6-b30a-012b54eae71b"
],
"defaultDueDateDays": 30
}
'import requests
url = "https://eu.sequencehq.com/api/quotes/{id}"
payload = {
"customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3",
"title": "My updated quote",
"currency": "GBP",
"dealType": "NEW_BUSINESS",
"preliminaryBillingStartDate": "2022-10-01",
"expiryDays": 30,
"phases": [
{
"name": "My new phase",
"prices": [
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "20.00",
"pricingType": "FIXED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": False,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{
"price": "0.75",
"fee": "25.00"
}
],
"prorateFlatFees": False,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": False
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": False
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": False
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": {
"frequency": "MONTHLY",
"interval": 1
}
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": True,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": True,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [
{
"service": "Xero",
"id": "123"
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"discounts": [
{
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"type": "PERCENTAGE",
"amount": "50",
"message": "message",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"amount": "50"
}
]
}
],
"contactIds": ["9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"],
"counterSignerIds": ["0190dae7-7228-7619-aad8-c51f56733b2b"],
"integrationIds": [
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF"
}
],
"salesforceOpportunityId": "a00Hr00001BiFbjIAF",
"attachmentAssetIds": ["0191761e-197f-79b6-b30a-012b54eae71b"],
"defaultDueDateDays": 30
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
customerId: '377bf97b-ca1d-4538-be06-4022afa6bde3',
title: 'My updated quote',
currency: 'GBP',
dealType: 'NEW_BUSINESS',
preliminaryBillingStartDate: '2022-10-01',
expiryDays: 30,
phases: [
{
name: 'My new phase',
prices: [
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {price: '150.00', pricingType: 'ONE_TIME'},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {price: '20.00', pricingType: 'FIXED'},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
pricePerUnit: '0.25',
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
isPricePercentage: false,
pricingType: 'LINEAR'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
seatMetricId: 'bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730',
pricePerSeat: '0.25',
prorationStrategy: 'USE_MAXIMUM',
contractedMinimumSeats: 10,
overagesBillingFrequency: 'YEARLY',
tiers: [
{upperBound: '100', price: '1.00', fee: '50.00'},
{price: '0.75', fee: '25.00'}
],
prorateFlatFees: false,
pricingType: 'SEAT_BASED'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
tiers: [
{upperBound: '200', price: '1.00', fee: '50.00', isPricePercentage: false},
{upperBound: '400', price: '0.75', fee: '25.00', isPricePercentage: false},
{price: '0.50', fee: '0.00', isPricePercentage: false}
],
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
usageCalculationMode: 'BILLING_PERIOD',
pricingType: 'GRADUATED'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100',
usageCalculationPeriod: {frequency: 'MONTHLY', interval: 1}
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
tiers: [
{
upperBound: '100',
price: '1.00',
fee: '50.00',
isPricePercentage: true,
maxPrice: '10',
minPrice: '5'
},
{
price: '0.75',
fee: '25.00',
isPricePercentage: true,
maxPrice: '10',
minPrice: '5'
}
],
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
pricingType: 'VOLUME'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
},
{
temporaryId: '5100e884-e007-4183-8355-4771865cb4d7',
productId: 'e007e884-5100-4183-8355-4771865cb4dd',
name: 'Sample product',
structure: {
packageSize: '50',
pricePerPackage: '2.00',
usageMetricId: '04c62961-04ba-48e6-b985-758bb7d3e712',
pricingType: 'PACKAGE'
},
billingFrequency: 'MONTHLY',
billingType: 'IN_ARREARS',
integrationIds: [{service: 'Xero', id: '123'}],
customMetricParameters: [{parameterId: '2963e49a-c8e0-4673-89f5-7a805c0faf14', value: '10'}],
listPriceId: 'b4d7e884-e007-4183-8355-4771865c5100'
}
],
duration: {days: 0, weeks: 0, months: 6, years: 1},
discounts: [
{
restrictToPrices: ['5100e884-e007-4183-8355-4771865cb4d7'],
type: 'PERCENTAGE',
amount: '50',
message: 'message',
seatDiscountType: 'ALL_SEATS'
}
],
minimums: [{restrictToPrices: ['5100e884-e007-4183-8355-4771865cb4d7'], amount: '50'}]
}
],
contactIds: ['9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc'],
counterSignerIds: ['0190dae7-7228-7619-aad8-c51f56733b2b'],
integrationIds: [{service: 'Salesforce', id: 'a00Hr00001BiFbjIAF'}],
salesforceOpportunityId: 'a00Hr00001BiFbjIAF',
attachmentAssetIds: ['0191761e-197f-79b6-b30a-012b54eae71b'],
defaultDueDateDays: 30
})
};
fetch('https://eu.sequencehq.com/api/quotes/{id}', 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://eu.sequencehq.com/api/quotes/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'customerId' => '377bf97b-ca1d-4538-be06-4022afa6bde3',
'title' => 'My updated quote',
'currency' => 'GBP',
'dealType' => 'NEW_BUSINESS',
'preliminaryBillingStartDate' => '2022-10-01',
'expiryDays' => 30,
'phases' => [
[
'name' => 'My new phase',
'prices' => [
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'price' => '150.00',
'pricingType' => 'ONE_TIME'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'price' => '20.00',
'pricingType' => 'FIXED'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'pricePerUnit' => '0.25',
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'isPricePercentage' => false,
'pricingType' => 'LINEAR'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'seatMetricId' => 'bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730',
'pricePerSeat' => '0.25',
'prorationStrategy' => 'USE_MAXIMUM',
'contractedMinimumSeats' => 10,
'overagesBillingFrequency' => 'YEARLY',
'tiers' => [
[
'upperBound' => '100',
'price' => '1.00',
'fee' => '50.00'
],
[
'price' => '0.75',
'fee' => '25.00'
]
],
'prorateFlatFees' => false,
'pricingType' => 'SEAT_BASED'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'tiers' => [
[
'upperBound' => '200',
'price' => '1.00',
'fee' => '50.00',
'isPricePercentage' => false
],
[
'upperBound' => '400',
'price' => '0.75',
'fee' => '25.00',
'isPricePercentage' => false
],
[
'price' => '0.50',
'fee' => '0.00',
'isPricePercentage' => false
]
],
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'usageCalculationMode' => 'BILLING_PERIOD',
'pricingType' => 'GRADUATED'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100',
'usageCalculationPeriod' => [
'frequency' => 'MONTHLY',
'interval' => 1
]
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'tiers' => [
[
'upperBound' => '100',
'price' => '1.00',
'fee' => '50.00',
'isPricePercentage' => true,
'maxPrice' => '10',
'minPrice' => '5'
],
[
'price' => '0.75',
'fee' => '25.00',
'isPricePercentage' => true,
'maxPrice' => '10',
'minPrice' => '5'
]
],
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'pricingType' => 'VOLUME'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
],
[
'temporaryId' => '5100e884-e007-4183-8355-4771865cb4d7',
'productId' => 'e007e884-5100-4183-8355-4771865cb4dd',
'name' => 'Sample product',
'structure' => [
'packageSize' => '50',
'pricePerPackage' => '2.00',
'usageMetricId' => '04c62961-04ba-48e6-b985-758bb7d3e712',
'pricingType' => 'PACKAGE'
],
'billingFrequency' => 'MONTHLY',
'billingType' => 'IN_ARREARS',
'integrationIds' => [
[
'service' => 'Xero',
'id' => '123'
]
],
'customMetricParameters' => [
[
'parameterId' => '2963e49a-c8e0-4673-89f5-7a805c0faf14',
'value' => '10'
]
],
'listPriceId' => 'b4d7e884-e007-4183-8355-4771865c5100'
]
],
'duration' => [
'days' => 0,
'weeks' => 0,
'months' => 6,
'years' => 1
],
'discounts' => [
[
'restrictToPrices' => [
'5100e884-e007-4183-8355-4771865cb4d7'
],
'type' => 'PERCENTAGE',
'amount' => '50',
'message' => 'message',
'seatDiscountType' => 'ALL_SEATS'
]
],
'minimums' => [
[
'restrictToPrices' => [
'5100e884-e007-4183-8355-4771865cb4d7'
],
'amount' => '50'
]
]
]
],
'contactIds' => [
'9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc'
],
'counterSignerIds' => [
'0190dae7-7228-7619-aad8-c51f56733b2b'
],
'integrationIds' => [
[
'service' => 'Salesforce',
'id' => 'a00Hr00001BiFbjIAF'
]
],
'salesforceOpportunityId' => 'a00Hr00001BiFbjIAF',
'attachmentAssetIds' => [
'0191761e-197f-79b6-b30a-012b54eae71b'
],
'defaultDueDateDays' => 30
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://eu.sequencehq.com/api/quotes/{id}"
payload := strings.NewReader("{\n \"customerId\": \"377bf97b-ca1d-4538-be06-4022afa6bde3\",\n \"title\": \"My updated quote\",\n \"currency\": \"GBP\",\n \"dealType\": \"NEW_BUSINESS\",\n \"preliminaryBillingStartDate\": \"2022-10-01\",\n \"expiryDays\": 30,\n \"phases\": [\n {\n \"name\": \"My new phase\",\n \"prices\": [\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"150.00\",\n \"pricingType\": \"ONE_TIME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"20.00\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"pricePerUnit\": \"0.25\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"isPricePercentage\": false,\n \"pricingType\": \"LINEAR\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"seatMetricId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"pricePerSeat\": \"0.25\",\n \"prorationStrategy\": \"USE_MAXIMUM\",\n \"contractedMinimumSeats\": 10,\n \"overagesBillingFrequency\": \"YEARLY\",\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\"\n }\n ],\n \"prorateFlatFees\": false,\n \"pricingType\": \"SEAT_BASED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"200\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": false\n },\n {\n \"upperBound\": \"400\",\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": false\n },\n {\n \"price\": \"0.50\",\n \"fee\": \"0.00\",\n \"isPricePercentage\": false\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"usageCalculationMode\": \"BILLING_PERIOD\",\n \"pricingType\": \"GRADUATED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\",\n \"usageCalculationPeriod\": {\n \"frequency\": \"MONTHLY\",\n \"interval\": 1\n }\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"VOLUME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"packageSize\": \"50\",\n \"pricePerPackage\": \"2.00\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"PACKAGE\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n }\n ],\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 6,\n \"years\": 1\n },\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"50\",\n \"message\": \"message\",\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"amount\": \"50\"\n }\n ]\n }\n ],\n \"contactIds\": [\n \"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc\"\n ],\n \"counterSignerIds\": [\n \"0190dae7-7228-7619-aad8-c51f56733b2b\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Salesforce\",\n \"id\": \"a00Hr00001BiFbjIAF\"\n }\n ],\n \"salesforceOpportunityId\": \"a00Hr00001BiFbjIAF\",\n \"attachmentAssetIds\": [\n \"0191761e-197f-79b6-b30a-012b54eae71b\"\n ],\n \"defaultDueDateDays\": 30\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.put("https://eu.sequencehq.com/api/quotes/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"customerId\": \"377bf97b-ca1d-4538-be06-4022afa6bde3\",\n \"title\": \"My updated quote\",\n \"currency\": \"GBP\",\n \"dealType\": \"NEW_BUSINESS\",\n \"preliminaryBillingStartDate\": \"2022-10-01\",\n \"expiryDays\": 30,\n \"phases\": [\n {\n \"name\": \"My new phase\",\n \"prices\": [\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"150.00\",\n \"pricingType\": \"ONE_TIME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"20.00\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"pricePerUnit\": \"0.25\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"isPricePercentage\": false,\n \"pricingType\": \"LINEAR\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"seatMetricId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"pricePerSeat\": \"0.25\",\n \"prorationStrategy\": \"USE_MAXIMUM\",\n \"contractedMinimumSeats\": 10,\n \"overagesBillingFrequency\": \"YEARLY\",\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\"\n }\n ],\n \"prorateFlatFees\": false,\n \"pricingType\": \"SEAT_BASED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"200\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": false\n },\n {\n \"upperBound\": \"400\",\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": false\n },\n {\n \"price\": \"0.50\",\n \"fee\": \"0.00\",\n \"isPricePercentage\": false\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"usageCalculationMode\": \"BILLING_PERIOD\",\n \"pricingType\": \"GRADUATED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\",\n \"usageCalculationPeriod\": {\n \"frequency\": \"MONTHLY\",\n \"interval\": 1\n }\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"VOLUME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"packageSize\": \"50\",\n \"pricePerPackage\": \"2.00\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"PACKAGE\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n }\n ],\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 6,\n \"years\": 1\n },\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"50\",\n \"message\": \"message\",\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"amount\": \"50\"\n }\n ]\n }\n ],\n \"contactIds\": [\n \"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc\"\n ],\n \"counterSignerIds\": [\n \"0190dae7-7228-7619-aad8-c51f56733b2b\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Salesforce\",\n \"id\": \"a00Hr00001BiFbjIAF\"\n }\n ],\n \"salesforceOpportunityId\": \"a00Hr00001BiFbjIAF\",\n \"attachmentAssetIds\": [\n \"0191761e-197f-79b6-b30a-012b54eae71b\"\n ],\n \"defaultDueDateDays\": 30\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://eu.sequencehq.com/api/quotes/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"customerId\": \"377bf97b-ca1d-4538-be06-4022afa6bde3\",\n \"title\": \"My updated quote\",\n \"currency\": \"GBP\",\n \"dealType\": \"NEW_BUSINESS\",\n \"preliminaryBillingStartDate\": \"2022-10-01\",\n \"expiryDays\": 30,\n \"phases\": [\n {\n \"name\": \"My new phase\",\n \"prices\": [\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"150.00\",\n \"pricingType\": \"ONE_TIME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"price\": \"20.00\",\n \"pricingType\": \"FIXED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"pricePerUnit\": \"0.25\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"isPricePercentage\": false,\n \"pricingType\": \"LINEAR\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"seatMetricId\": \"bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730\",\n \"pricePerSeat\": \"0.25\",\n \"prorationStrategy\": \"USE_MAXIMUM\",\n \"contractedMinimumSeats\": 10,\n \"overagesBillingFrequency\": \"YEARLY\",\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\"\n }\n ],\n \"prorateFlatFees\": false,\n \"pricingType\": \"SEAT_BASED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"200\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": false\n },\n {\n \"upperBound\": \"400\",\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": false\n },\n {\n \"price\": \"0.50\",\n \"fee\": \"0.00\",\n \"isPricePercentage\": false\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"usageCalculationMode\": \"BILLING_PERIOD\",\n \"pricingType\": \"GRADUATED\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\",\n \"usageCalculationPeriod\": {\n \"frequency\": \"MONTHLY\",\n \"interval\": 1\n }\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"tiers\": [\n {\n \"upperBound\": \"100\",\n \"price\": \"1.00\",\n \"fee\": \"50.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n },\n {\n \"price\": \"0.75\",\n \"fee\": \"25.00\",\n \"isPricePercentage\": true,\n \"maxPrice\": \"10\",\n \"minPrice\": \"5\"\n }\n ],\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"VOLUME\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n },\n {\n \"temporaryId\": \"5100e884-e007-4183-8355-4771865cb4d7\",\n \"productId\": \"e007e884-5100-4183-8355-4771865cb4dd\",\n \"name\": \"Sample product\",\n \"structure\": {\n \"packageSize\": \"50\",\n \"pricePerPackage\": \"2.00\",\n \"usageMetricId\": \"04c62961-04ba-48e6-b985-758bb7d3e712\",\n \"pricingType\": \"PACKAGE\"\n },\n \"billingFrequency\": \"MONTHLY\",\n \"billingType\": \"IN_ARREARS\",\n \"integrationIds\": [\n {\n \"service\": \"Xero\",\n \"id\": \"123\"\n }\n ],\n \"customMetricParameters\": [\n {\n \"parameterId\": \"2963e49a-c8e0-4673-89f5-7a805c0faf14\",\n \"value\": \"10\"\n }\n ],\n \"listPriceId\": \"b4d7e884-e007-4183-8355-4771865c5100\"\n }\n ],\n \"duration\": {\n \"days\": 0,\n \"weeks\": 0,\n \"months\": 6,\n \"years\": 1\n },\n \"discounts\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"type\": \"PERCENTAGE\",\n \"amount\": \"50\",\n \"message\": \"message\",\n \"seatDiscountType\": \"ALL_SEATS\"\n }\n ],\n \"minimums\": [\n {\n \"restrictToPrices\": [\n \"5100e884-e007-4183-8355-4771865cb4d7\"\n ],\n \"amount\": \"50\"\n }\n ]\n }\n ],\n \"contactIds\": [\n \"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc\"\n ],\n \"counterSignerIds\": [\n \"0190dae7-7228-7619-aad8-c51f56733b2b\"\n ],\n \"integrationIds\": [\n {\n \"service\": \"Salesforce\",\n \"id\": \"a00Hr00001BiFbjIAF\"\n }\n ],\n \"salesforceOpportunityId\": \"a00Hr00001BiFbjIAF\",\n \"attachmentAssetIds\": [\n \"0191761e-197f-79b6-b30a-012b54eae71b\"\n ],\n \"defaultDueDateDays\": 30\n}"
response = http.request(request)
puts response.read_body{
"id": "678ca125-8bc3-478f-9a96-6ba73605cf1e",
"createdBy": "4ffd439e-32e5-4046-bb40-3cb81f40e5da",
"customerId": "377bf97b-ca1d-4538-be06-4022afa6bde3",
"quoteNumber": "Q00001",
"title": "My quote",
"currency": "GBP",
"status": "ACCEPTED",
"dealType": "NEW_BUSINESS",
"preliminaryBillingStartDate": "2022-10-01",
"expiresAt": "2022-10-01",
"publishedAt": "2022-06-28T16:47:00Z",
"readyToSignAt": "2022-06-28T16:47:00Z",
"acceptedAt": "2022-06-28T16:47:00Z",
"executedAt": "2022-06-28T16:47:00Z",
"createdAt": "2022-06-28T16:47:00Z",
"updatedAt": "2022-06-28T16:47:00Z",
"createdFrom": {
"entityType": "QUOTE",
"entityId": "dc0e2104-7df5-4fc1-8f65-1823f427d111"
},
"salesforceOpportunityId": "006Hr00001MfnEIIAZ",
"expiryDays": 30,
"merchantBranding": {
"logoUrl": "logo",
"legalCompanyName": "Acme Corp",
"primaryColour": "colour",
"url": "www.example.com",
"address": {
"line1": "1 Market Street",
"line2": "Suite 100",
"town": "San Francisco",
"state": "CA",
"postcode": "94105",
"country": "US"
},
"email": "accounting@example.com",
"showUsageInCustomerPortal": true,
"supportEmail": "support@example.com",
"supportUrl": "https://www.example.com/support"
},
"phases": [
{
"id": "abe4bf01-9b75-495d-f5fd-ca82b001f3a8",
"name": "Onboarding",
"createdAt": "2022-06-28T16:47:00Z",
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"prices": [
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "20.00",
"pricingType": "FIXED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": false,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{
"price": "0.75",
"fee": "25.00"
}
],
"prorateFlatFees": false,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": false
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": false
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": false
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": {
"frequency": "MONTHLY",
"interval": 1
}
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"discounts": [
{
"id": "018f920a-40d1-7e62-91ca-f3a4b4ac5d9d",
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"amount": "50",
"discountCalculationType": "PERCENTAGE",
"message": "message",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"id": "018f9164-c2d9-7eb2-bb98-11ecb5454055",
"amount": "50",
"restrictToPrices": [
"5100e884-e007-4183-8355-4771865cb4d7"
],
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z"
}
]
}
],
"archivedAt": "2022-06-28T16:47:00Z",
"approvalWorkflowId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"contactIds": [
"9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"
],
"contacts": [
{
"contactId": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc",
"name": "Jane Doe",
"email": "jane@example.com",
"signedAt": "2022-06-28T16:47:00Z"
}
],
"counterSigners": [
{
"id": "0190da0c-980d-7fa2-9b65-4c79784a95b1",
"name": "Jane Doe",
"email": "jane@example.com",
"signedAt": "2022-06-28T16:47:00Z"
}
],
"isSignaturesEnabled": false,
"integrationIds": [
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF",
"isPending": false
}
],
"customerLegalName": "Acme Corp",
"customerAddress": {
"line1": "1 Fake Street",
"line2": "Fakesville",
"town": "Faketown",
"state": "CA",
"postcode": "F4KE",
"country": "US"
},
"pdfStatus": "NOT_YET_REQUESTED",
"attachmentAssets": [
{
"id": "e007e884-5100-4183-8355-4771865cb4dd",
"createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b",
"createdByType": "SEQUENCE_USER",
"type": "IMAGE",
"format": "PNG",
"fileName": "my-image.png",
"fileSizeBytes": 12345,
"url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
"createdAt": "2022-06-28T16:47:00Z"
}
],
"isExpired": false,
"defaultDueDateDays": 30,
"signatureMode": "EMBEDDED",
"preparingSignatureRequestAt": "2022-06-28T16:47:00Z",
"activeErrors": [
{
"id": "0190b1f2-1234-7000-8000-000000000001",
"errorCode": "DROPBOX_SIGNATURE_REQUEST_REJECTED",
"recoveryAction": "CONTACT_SUPPORT",
"createdAt": "2022-06-28T16:47:00Z",
"errorContext": {}
}
]
}This response has no body data.This response has no body data.This response has no body data.This response has no body data.Headers
Your API credentials. Eg. Basic {credentials}.
Use this header to select an API version
2024-07-30 Path Parameters
Quote ID
Body
Phases for this quote, in sequential order
Show child attributes
Show child attributes
[
{
"name": "My new phase",
"prices": [
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [{ "service": "Xero", "id": "123" }],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": { "price": "20.00", "pricingType": "FIXED" },
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [{ "service": "Xero", "id": "123" }],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": false,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [{ "service": "Xero", "id": "123" }],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{ "price": "0.75", "fee": "25.00" }
],
"prorateFlatFees": false,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [{ "service": "Xero", "id": "123" }],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": false
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": false
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": false
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [{ "service": "Xero", "id": "123" }],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [{ "service": "Xero", "id": "123" }],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"temporaryId": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"integrationIds": [{ "service": "Xero", "id": "123" }],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"discounts": [
{
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"type": "PERCENTAGE",
"amount": "50",
"message": "message",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"amount": "50"
}
]
}
]
IDs of contacts who will receive this quote (and sign this quote if using e-signatures)
["9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"]
ID of Customer to which this quote pertains
"377bf97b-ca1d-4538-be06-4022afa6bde3"
The quote title
"My updated quote"
Quote currency
AED, ARS, AUD, BRL, BGN, CAD, CHF, CLP, CNY, COP, CZK, DKK, EGP, EUR, GBP, HKD, ILS, INR, ISK, JPY, KRW, MXN, NOK, NZD, PLN, SAR, SEK, SGD, THB, USD, UYU, ZAR "GBP"
Quote deal type
NEW_BUSINESS, RENEWAL "NEW_BUSINESS"
Preliminary start date of contract
"2022-10-01"
Number of days after publishing in which quote will expire
30
IDs of internal counter signers who will receive this quote (and sign this quote if using e-signatures)
["0190dae7-7228-7619-aad8-c51f56733b2b"]
IDs of external entities that are linked to this quote
Show child attributes
Show child attributes
[
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF"
}
]
Salesforce ID of the opportunity that created this quote
"a00Hr00001BiFbjIAF"
IDs of assets that are attached to this quote
["0191761e-197f-79b6-b30a-012b54eae71b"]
Default number of days between issue date and due date. Passed onto a billing schedule created from the Quote.
30
Response
OK
Unique ID
"678ca125-8bc3-478f-9a96-6ba73605cf1e"
The Sequence user who created this quote
"4ffd439e-32e5-4046-bb40-3cb81f40e5da"
An alpha-numeric value that identifies the quote
"Q00001"
The status of the quote
DRAFT, PUBLISHED, PREPARING_SIGNATURE_REQUEST, READY_TO_SIGN, ACCEPTED, EXECUTED "ACCEPTED"
Creation timestamp. Formatted as an ISO 8601 timestamp.
"2022-06-28T16:47:00Z"
Timestamp when quote was last updated. Formatted as an ISO 8601 timestamp.
"2022-06-28T16:47:00Z"
Merchant information and branding (for quote rendering)
Show child attributes
Show child attributes
{
"logoUrl": "logo",
"legalCompanyName": "Acme Corp",
"primaryColour": "colour",
"url": "www.example.com",
"address": {
"line1": "1 Market Street",
"line2": "Suite 100",
"town": "San Francisco",
"state": "CA",
"postcode": "94105",
"country": "US"
},
"email": "accounting@example.com",
"showUsageInCustomerPortal": true,
"supportEmail": "support@example.com",
"supportUrl": "https://www.example.com/support"
}
Phases for this quote, in sequential order
Show child attributes
Show child attributes
[
{
"id": "abe4bf01-9b75-495d-f5fd-ca82b001f3a8",
"name": "Onboarding",
"createdAt": "2022-06-28T16:47:00Z",
"duration": {
"days": 0,
"weeks": 0,
"months": 6,
"years": 1
},
"prices": [
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"price": "150.00",
"pricingType": "ONE_TIME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": { "price": "20.00", "pricingType": "FIXED" },
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"pricePerUnit": "0.25",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"isPricePercentage": false,
"pricingType": "LINEAR"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"seatMetricId": "bc61d4b8-e9d6-4f4a-9bcf-f5dae874c730",
"pricePerSeat": "0.25",
"prorationStrategy": "USE_MAXIMUM",
"contractedMinimumSeats": 10,
"overagesBillingFrequency": "YEARLY",
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00"
},
{ "price": "0.75", "fee": "25.00" }
],
"prorateFlatFees": false,
"pricingType": "SEAT_BASED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "200",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": false
},
{
"upperBound": "400",
"price": "0.75",
"fee": "25.00",
"isPricePercentage": false
},
{
"price": "0.50",
"fee": "0.00",
"isPricePercentage": false
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"usageCalculationMode": "BILLING_PERIOD",
"pricingType": "GRADUATED"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100",
"usageCalculationPeriod": { "frequency": "MONTHLY", "interval": 1 }
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"tiers": [
{
"upperBound": "100",
"price": "1.00",
"fee": "50.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
},
{
"price": "0.75",
"fee": "25.00",
"isPricePercentage": true,
"maxPrice": "10",
"minPrice": "5"
}
],
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "VOLUME"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
},
{
"id": "5100e884-e007-4183-8355-4771865cb4d7",
"productId": "e007e884-5100-4183-8355-4771865cb4dd",
"name": "Sample product",
"structure": {
"packageSize": "50",
"pricePerPackage": "2.00",
"usageMetricId": "04c62961-04ba-48e6-b985-758bb7d3e712",
"pricingType": "PACKAGE"
},
"billingFrequency": "MONTHLY",
"billingType": "IN_ARREARS",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"integrationIds": [
{
"service": "Xero",
"id": "123",
"isPending": false
}
],
"customMetricParameters": [
{
"parameterId": "2963e49a-c8e0-4673-89f5-7a805c0faf14",
"value": "10"
}
],
"listPriceId": "b4d7e884-e007-4183-8355-4771865c5100"
}
],
"discounts": [
{
"id": "018f920a-40d1-7e62-91ca-f3a4b4ac5d9d",
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"amount": "50",
"discountCalculationType": "PERCENTAGE",
"message": "message",
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z",
"seatDiscountType": "ALL_SEATS"
}
],
"minimums": [
{
"id": "018f9164-c2d9-7eb2-bb98-11ecb5454055",
"amount": "50",
"restrictToPrices": ["5100e884-e007-4183-8355-4771865cb4d7"],
"createdAt": "2021-08-25T12:00:00Z",
"updatedAt": "2021-08-25T12:00:00Z"
}
]
}
]
IDs of contacts who will receive this quote (and sign this quote if using e-signatures)
["9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc"]
List of contacts requested to sign this quote
Show child attributes
Show child attributes
[
{
"contactId": "9a1e38a9-4dc9-776f-f974-4e7ee9f4d6cc",
"name": "Jane Doe",
"email": "jane@example.com",
"signedAt": "2022-06-28T16:47:00Z"
}
]
List of internal persons who countersign every quote
Show child attributes
Show child attributes
[
{
"id": "0190da0c-980d-7fa2-9b65-4c79784a95b1",
"name": "Jane Doe",
"email": "jane@example.com",
"signedAt": "2022-06-28T16:47:00Z"
}
]
Enable e-signatures to allow customers to sign this quote through Dropbox Sign.
false
IDs of external entities that are linked to this quote
Show child attributes
Show child attributes
[
{
"service": "Salesforce",
"id": "a00Hr00001BiFbjIAF",
"isPending": false
}
]
Status of quote PDF generation for this variant
NOT_YET_REQUESTED, REQUESTED, IN_PROGRESS, FAILED, GENERATED "NOT_YET_REQUESTED"
Assets attached to this quote
Show child attributes
Show child attributes
[
{
"id": "e007e884-5100-4183-8355-4771865cb4dd",
"createdBy": "94703530-1293-479b-bd37-ccad42fd9c8b",
"createdByType": "SEQUENCE_USER",
"type": "IMAGE",
"format": "PNG",
"fileName": "my-image.png",
"fileSizeBytes": 12345,
"url": "https://assets.sequencehq.com/018f9ad5-4192-76d7-aea5-d80a9018eded/images/e007e884-5100-4183-8355-4771865cb4dd.png",
"createdAt": "2022-06-28T16:47:00Z"
}
]
True if the quote expiry date has passed
false
Active (unresolved) errors on the current quote variant. Empty when the quote is healthy.
Show child attributes
Show child attributes
[
{
"id": "0190b1f2-1234-7000-8000-000000000001",
"errorCode": "DROPBOX_SIGNATURE_REQUEST_REJECTED",
"recoveryAction": "CONTACT_SUPPORT",
"createdAt": "2022-06-28T16:47:00Z",
"errorContext": {}
}
]
ID of Customer to which this quote pertains
"377bf97b-ca1d-4538-be06-4022afa6bde3"
The quote title
"My quote"
Quote currency
AED, ARS, AUD, BRL, BGN, CAD, CHF, CLP, CNY, COP, CZK, DKK, EGP, EUR, GBP, HKD, ILS, INR, ISK, JPY, KRW, MXN, NOK, NZD, PLN, SAR, SEK, SGD, THB, USD, UYU, ZAR "GBP"
Quote deal type
NEW_BUSINESS, RENEWAL "NEW_BUSINESS"
Preliminary start date of contract
"2022-10-01"
Date when quote expires
"2022-10-01"
Timestamp when quote was published. Formatted as an ISO 8601 timestamp.
"2022-06-28T16:47:00Z"
Timestamp when quote was ready to sign. Formatted as an ISO 8601 timestamp.
"2022-06-28T16:47:00Z"
Timestamp when quote was accepted. Formatted as an ISO 8601 timestamp.
"2022-06-28T16:47:00Z"
Timestamp when quote was executed. Formatted as an ISO 8601 timestamp.
"2022-06-28T16:47:00Z"
Entity from which this quote was created
Show child attributes
Show child attributes
{
"entityType": "QUOTE",
"entityId": "dc0e2104-7df5-4fc1-8f65-1823f427d111"
}
Salesforce ID of the opportunity that created this quote
"006Hr00001MfnEIIAZ"
Number of days after publishing in which quote will expire
30
Date and time the quote was archived
"2022-06-28T16:47:00Z"
The ID of the active approval workflow for this quote, if one is in progress
"a1b2c3d4-e5f6-7890-abcd-ef1234567890"
Customer legal name
"Acme Corp"
Show child attributes
Show child attributes
{
"line1": "1 Market Street",
"line2": "Suite 100",
"town": "San Francisco",
"state": "CA",
"postcode": "94105",
"country": "US"
}
Default number of days between issue date and due date. Passed onto a billing schedule created from the Quote.
30
The signature mode used when the quote is published. Can be EMBEDDED, NON_EMBEDDED. It is null if the quote is a draft or if e-signatures are disabled for the quote.
EMBEDDED, NON_EMBEDDED "EMBEDDED"
Timestamp when quote ready-to-sign operation was triggered.
"2022-06-28T16:47:00Z"