Estimates
Send estimate by email
Sends the estimate by email to the provided address, or to the recipient contact’s email if no address is provided.
POST
/
v1
/
estimates
/
{estimateId}
/
send
Send estimate by email
curl --request POST \
--url https://api.infinity.swiss/v1/estimates/{estimateId}/send \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"description": "<string>"
}
'import requests
url = "https://api.infinity.swiss/v1/estimates/{estimateId}/send"
payload = {
"email": "jsmith@example.com",
"description": "<string>"
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', description: '<string>'})
};
fetch('https://api.infinity.swiss/v1/estimates/{estimateId}/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.infinity.swiss/v1/estimates/{estimateId}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infinity.swiss/v1/estimates/{estimateId}/send"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.infinity.swiss/v1/estimates/{estimateId}/send")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infinity.swiss/v1/estimates/{estimateId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"estimate": {
"id": "<string>",
"isDraft": true,
"number": "<string>",
"organisation": "<string>",
"template": "<string>",
"openingDate": "2023-12-25",
"dueDate": "2023-12-25",
"positions": [
{
"type": "product",
"name": "<string>",
"singleAmount": 12000,
"quantity": 2,
"contraAccount": 5499,
"id": "<string>",
"unit": "<string>",
"taxCode": "",
"articleNumber": "<string>",
"description": "<string>",
"date": "<string>",
"discountRate": 50,
"customTextColumns": {
"customTextColumn1": "<string>",
"customTextColumn2": "<string>",
"customTextColumn3": "<string>"
},
"totalAmount": 123,
"vatDebt": 123,
"originalCurrency": "<string>",
"exchangeRate": 123
}
],
"totalAmount": 123,
"totalNetAmount": 123,
"totalVatDebt": 123,
"recipient": "<string>",
"customRecipientText": "<string>",
"title": "<string>",
"payableInDays": 123,
"introductoryText": "<string>",
"closingText": "<string>",
"originalCurrency": "<string>",
"exchangeRate": 123,
"columns": [],
"emailDeliveries": [
{
"recipientEmail": "jsmith@example.com",
"status": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"publicPdfUrl": "<string>",
"signingPerson": "<string>",
"signedAt": "2023-11-07T05:31:56Z",
"invoicesFromQuote": [
"<string>"
]
}
}{
"code": "<string>",
"invalidFields": [
"<string>"
]
}{
"code": "general/unauthorised"
}{
"code": "customer-invoice/not-found"
}If
email is omitted, the estimate is sent to the recipient contact’s primary email address. Each delivery attempt is logged on the estimate and surfaced in the emailDeliveries array of subsequent responses.Authorizations
API token for authentication. Obtain from your Infinity account settings.
Path Parameters
The id of the estimate to send.
Body
application/json
Optional email override and description.
Response
The estimate was sent successfully.
The full representation of an estimate (quote).
Show child attributes
Show child attributes
⌘I
Send estimate by email
curl --request POST \
--url https://api.infinity.swiss/v1/estimates/{estimateId}/send \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '
{
"email": "jsmith@example.com",
"description": "<string>"
}
'import requests
url = "https://api.infinity.swiss/v1/estimates/{estimateId}/send"
payload = {
"email": "jsmith@example.com",
"description": "<string>"
}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({email: 'jsmith@example.com', description: '<string>'})
};
fetch('https://api.infinity.swiss/v1/estimates/{estimateId}/send', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.infinity.swiss/v1/estimates/{estimateId}/send",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'email' => 'jsmith@example.com',
'description' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.infinity.swiss/v1/estimates/{estimateId}/send"
payload := strings.NewReader("{\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.infinity.swiss/v1/estimates/{estimateId}/send")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infinity.swiss/v1/estimates/{estimateId}/send")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"email\": \"jsmith@example.com\",\n \"description\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"estimate": {
"id": "<string>",
"isDraft": true,
"number": "<string>",
"organisation": "<string>",
"template": "<string>",
"openingDate": "2023-12-25",
"dueDate": "2023-12-25",
"positions": [
{
"type": "product",
"name": "<string>",
"singleAmount": 12000,
"quantity": 2,
"contraAccount": 5499,
"id": "<string>",
"unit": "<string>",
"taxCode": "",
"articleNumber": "<string>",
"description": "<string>",
"date": "<string>",
"discountRate": 50,
"customTextColumns": {
"customTextColumn1": "<string>",
"customTextColumn2": "<string>",
"customTextColumn3": "<string>"
},
"totalAmount": 123,
"vatDebt": 123,
"originalCurrency": "<string>",
"exchangeRate": 123
}
],
"totalAmount": 123,
"totalNetAmount": 123,
"totalVatDebt": 123,
"recipient": "<string>",
"customRecipientText": "<string>",
"title": "<string>",
"payableInDays": 123,
"introductoryText": "<string>",
"closingText": "<string>",
"originalCurrency": "<string>",
"exchangeRate": 123,
"columns": [],
"emailDeliveries": [
{
"recipientEmail": "jsmith@example.com",
"status": "<string>",
"timestamp": "2023-11-07T05:31:56Z"
}
],
"publicPdfUrl": "<string>",
"signingPerson": "<string>",
"signedAt": "2023-11-07T05:31:56Z",
"invoicesFromQuote": [
"<string>"
]
}
}{
"code": "<string>",
"invalidFields": [
"<string>"
]
}{
"code": "general/unauthorised"
}{
"code": "customer-invoice/not-found"
}