Activate a document template
curl --request POST \
--url https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate', 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}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/activate"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"company_id": "<string>",
"template_id": "<string>",
"template_version_id": "<string>",
"template_type": "<string>",
"name": "<string>",
"is_active": true,
"settings": {},
"purchased_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"template": {
"id": "<string>",
"type": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"status": "<string>",
"source_type": "<string>"
},
"template_version": {
"id": "<string>",
"version": "<string>"
},
"update_available": true
}
}Invoice and document templates
Activate a document template
Makes a template the one used for its document type, switching off the previously active one.
POST
/
template
/
company-templates
/
{companyTemplate}
/
activate
Activate a document template
curl --request POST \
--url https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate', 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}/activate",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/activate"
req, _ := http.NewRequest("POST", 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.post("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.exowpee.com/v1/template/company-templates/{companyTemplate}/activate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"company_id": "<string>",
"template_id": "<string>",
"template_version_id": "<string>",
"template_type": "<string>",
"name": "<string>",
"is_active": true,
"settings": {},
"purchased_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"deleted_at": "2023-11-07T05:31:56Z",
"template": {
"id": "<string>",
"type": "<string>",
"name": "<string>",
"slug": "<string>",
"description": "<string>",
"thumbnail": "<string>",
"status": "<string>",
"source_type": "<string>"
},
"template_version": {
"id": "<string>",
"version": "<string>"
},
"update_available": true
}
}Company space
For: Administrator, Manager · Permission:
company_templates.activate
Conditions
- Activating a template that is already active changes nothing.
- Switches off the company’s other active template of the same document type; only one template per type can be active.
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).
Response
200 - application/json
CompanyTemplateResource
Items of this page.
Show child attributes
Show child attributes