Delete a document template
curl --request DELETE \
--url https://api.exowpee.com/v1/template/company-templates/{companyTemplate} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/template/company-templates/{companyTemplate}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/template/company-templates/{companyTemplate}', 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.exowpee.com/v1/template/company-templates/{companyTemplate}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/template/company-templates/{companyTemplate}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}Invoice and document templates
Delete a document template
Deletes a company template (it can be restored later). If it is the active one, a replacement of the same type must be named and becomes active.
DELETE
/
template
/
company-templates
/
{companyTemplate}
Delete a document template
curl --request DELETE \
--url https://api.exowpee.com/v1/template/company-templates/{companyTemplate} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/template/company-templates/{companyTemplate}"
headers = {"Authorization": "Bearer <token>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/template/company-templates/{companyTemplate}', 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.exowpee.com/v1/template/company-templates/{companyTemplate}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.exowpee.com/v1/template/company-templates/{companyTemplate}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"message": "<string>",
"errors": {}
}Company space
For: Administrator, Manager · Permission:
company_templates.delete
Conditions
- When the template is active, replacement_company_template_id is required; it must be another template of the same company and the same document type, otherwise the call is refused.
- The replacement is only used when the deleted template is active; it is ignored for an inactive template.
- Deletes the template from the lists; it can be brought back with the restore action.
- When the template was active, it is switched off and the replacement becomes the active template of that type.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Identifier of the company template, the company's own copy of a template (27-character KSUID string).
Query Parameters
Identifier of another template of the same company and the same document type, which becomes the active template. Required when the template being deleted is active; ignored otherwise. 27-character KSUID string.
Maximum string length:
27Response
No content