Update an addon
curl --request PATCH \
--url https://api.togai.com/addons/{addon_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"billableName": "<string>"
}
'import requests
url = "https://api.togai.com/addons/{addon_id}"
payload = {
"name": "<string>",
"billableName": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', billableName: '<string>'})
};
fetch('https://api.togai.com/addons/{addon_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://api.togai.com/addons/{addon_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'billableName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.togai.com/addons/{addon_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"billableName\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.togai.com/addons/{addon_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"billableName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.togai.com/addons/{addon_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"billableName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"type": "LICENSE",
"id": "addon.1zYnCiM9Bpg.1zYn",
"createdAt": "2023-11-07T05:31:56Z",
"status": "ACTIVE",
"displayName": "<string>",
"billableName": "<string>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}AddOns
Update an addon
Update an existing addon
PATCH
/
addons
/
{addon_id}
Update an addon
curl --request PATCH \
--url https://api.togai.com/addons/{addon_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"billableName": "<string>"
}
'import requests
url = "https://api.togai.com/addons/{addon_id}"
payload = {
"name": "<string>",
"billableName": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: '<string>', billableName: '<string>'})
};
fetch('https://api.togai.com/addons/{addon_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://api.togai.com/addons/{addon_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'billableName' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api.togai.com/addons/{addon_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"billableName\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.patch("https://api.togai.com/addons/{addon_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"billableName\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.togai.com/addons/{addon_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"billableName\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"name": "<string>",
"type": "LICENSE",
"id": "addon.1zYnCiM9Bpg.1zYn",
"createdAt": "2023-11-07T05:31:56Z",
"status": "ACTIVE",
"displayName": "<string>",
"billableName": "<string>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}{
"message": "<Reason message>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Maximum string length:
50Example:
"addon.1zYnCiM9Bpg.lv25y"
Body
application/json
Payload to update addon
Response
Response for Create and Get addons requests
Request to create an addon
Name of addon
Maximum string length:
255LICENSE: Addon can be used in license rate cards FIXED_FEE: Addon can be used in fixed fee rate cards CREDIT_GRANT: Addon can be used in credit grant rate cards
Available options:
LICENSE, FIXED_FEE, CREDIT_GRANT Id of addon
Example:
"addon.1zYnCiM9Bpg.1zYn"
Created Time of addon
status of addon
Available options:
ACTIVE, ARCHIVED Example:
"ACTIVE"
Display name of addon. This is an auto-generated field which contains billableName of addon. If billableName is not provided, name will be used as display name.
Billable name of addon. Billable name takes precedence over name to display in invoice.
Maximum string length:
255