Estimates
Set estimate status
Updates the status of the estimate.
PUT
/
v1
/
estimates
/
{estimateId}
/
status
Set estimate status
curl --request PUT \
--url https://api.infinity.swiss/v1/estimates/{estimateId}/status \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '{}'import requests
url = "https://api.infinity.swiss/v1/estimates/{estimateId}/status"
payload = {}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.infinity.swiss/v1/estimates/{estimateId}/status', 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}/status",
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([
]),
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}/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", 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.put("https://api.infinity.swiss/v1/estimates/{estimateId}/status")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infinity.swiss/v1/estimates/{estimateId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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"
}Estimates move through three lifecycle states:
open— the default state for a newly issued estimate.accepted— the customer has accepted the offer; the estimate can now be converted to an invoice.rejected— the customer has declined the offer.
Authorizations
API token for authentication. Obtain from your Infinity account settings.
Path Parameters
The id of the estimate to update.
Body
application/json
The new status.
Request body for setting the status of an estimate.
The lifecycle status of an estimate.
Available options:
open, accepted, rejected Response
The estimate status was updated successfully.
The full representation of an estimate (quote).
Show child attributes
Show child attributes
Previous
Convert estimate to invoiceCreates a new customer invoice based on the estimate. The original estimate is preserved and links back to the new invoice via the conversion. Draft estimates cannot be converted.
Next
⌘I
Set estimate status
curl --request PUT \
--url https://api.infinity.swiss/v1/estimates/{estimateId}/status \
--header 'Content-Type: application/json' \
--header 'x-api-token: <api-key>' \
--data '{}'import requests
url = "https://api.infinity.swiss/v1/estimates/{estimateId}/status"
payload = {}
headers = {
"x-api-token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.infinity.swiss/v1/estimates/{estimateId}/status', 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}/status",
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([
]),
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}/status"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", 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.put("https://api.infinity.swiss/v1/estimates/{estimateId}/status")
.header("x-api-token", "<api-key>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.infinity.swiss/v1/estimates/{estimateId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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"
}