Template Get Api
curl --request GET \
--url https://api.justpaid.io/api/v1/template/{template_uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justpaid.io/api/v1/template/{template_uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justpaid.io/api/v1/template/{template_uuid}', 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.justpaid.io/api/v1/template/{template_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.justpaid.io/api/v1/template/{template_uuid}"
req, _ := http.NewRequest("GET", 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.get("https://api.justpaid.io/api/v1/template/{template_uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justpaid.io/api/v1/template/{template_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "Enterprise Plan",
"description": "Complete solution for large organizations",
"is_active": true,
"options": [
{
"uuid": "456e4567-e89b-12d3-a456-426614174000",
"name": "Basic Option",
"description": "Basic features package",
"services": [
{
"uuid": "789e4567-e89b-12d3-a456-426614174000",
"service_type": "fixed fee",
"billing_cycle": "monthly",
"unit_price": 100,
"default_quantity": 1,
"plan_item_uuid": "abc-123",
"plan_item_name": "Basic Service",
"plan_item_description": "Basic service description",
"discount_percent": 10,
"discount_duration": 3
}
]
}
],
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:00:00Z"
}{
"detail": "Template with UUID X not found"
}Template
Template Get Api
Retrieves a specific template by UUID.
GET
/
api
/
v1
/
template
/
{template_uuid}
Template Get Api
curl --request GET \
--url https://api.justpaid.io/api/v1/template/{template_uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.justpaid.io/api/v1/template/{template_uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.justpaid.io/api/v1/template/{template_uuid}', 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.justpaid.io/api/v1/template/{template_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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.justpaid.io/api/v1/template/{template_uuid}"
req, _ := http.NewRequest("GET", 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.get("https://api.justpaid.io/api/v1/template/{template_uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.justpaid.io/api/v1/template/{template_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"uuid": "123e4567-e89b-12d3-a456-426614174000",
"name": "Enterprise Plan",
"description": "Complete solution for large organizations",
"is_active": true,
"options": [
{
"uuid": "456e4567-e89b-12d3-a456-426614174000",
"name": "Basic Option",
"description": "Basic features package",
"services": [
{
"uuid": "789e4567-e89b-12d3-a456-426614174000",
"service_type": "fixed fee",
"billing_cycle": "monthly",
"unit_price": 100,
"default_quantity": 1,
"plan_item_uuid": "abc-123",
"plan_item_name": "Basic Service",
"plan_item_description": "Basic service description",
"discount_percent": 10,
"discount_duration": 3
}
]
}
],
"created_at": "2024-03-21T10:00:00Z",
"updated_at": "2024-03-21T10:00:00Z"
}{
"detail": "Template with UUID X not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Response
Template retrieved successfully
Schema for retrieving template information.
Attributes: uuid (UUID): The unique identifier for the template. name (str): The name of the template. description (str): The description of the template. is_active (bool): Whether the template is active. options (List[OptionOut]): List of options associated with this template.
The unique identifier for the template.
The name of the template.
The description of the template.
Whether the template is active.
List of options associated with this template.
Show child attributes
Show child attributes
Was this page helpful?
