Export a PricingModel
curl --request GET \
--url https://app.flowglad.com/api/v1/pricing-models/{id}/export \
--header 'Authorization: <api-key>'import requests
url = "https://app.flowglad.com/api/v1/pricing-models/{id}/export"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.flowglad.com/api/v1/pricing-models/{id}/export', 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://app.flowglad.com/api/v1/pricing-models/{id}/export",
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: <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"
"net/http"
"io"
)
func main() {
url := "https://app.flowglad.com/api/v1/pricing-models/{id}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.flowglad.com/api/v1/pricing-models/{id}/export")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flowglad.com/api/v1/pricing-models/{id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"pricingModel": {
"isDefault": false,
"name": "<string>",
"features": [
{
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"active": true
}
],
"products": [
{
"product": {
"name": "<string>",
"active": true,
"slug": "<string>",
"description": "<string>",
"imageURL": "<string>",
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"default": true
},
"price": {
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": null,
"usageMeterId": null,
"name": "<string>",
"trialPeriodDays": 4503599627370495,
"active": true,
"slug": "<string>"
},
"features": [
"<string>"
]
}
],
"usageMeters": [
{
"usageMeter": {
"name": "<string>",
"slug": "<string>"
},
"prices": [
{
"intervalCount": 123,
"type": "<string>",
"trialPeriodDays": null,
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": 123,
"name": "<string>",
"active": true,
"slug": "<string>"
}
]
}
],
"resources": [
{
"slug": "<string>",
"name": "<string>",
"active": true
}
]
},
"updatedAt": 0
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Pricing Models
Export a PricingModel
GET
/
api
/
v1
/
pricing-models
/
{id}
/
export
Export a PricingModel
curl --request GET \
--url https://app.flowglad.com/api/v1/pricing-models/{id}/export \
--header 'Authorization: <api-key>'import requests
url = "https://app.flowglad.com/api/v1/pricing-models/{id}/export"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://app.flowglad.com/api/v1/pricing-models/{id}/export', 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://app.flowglad.com/api/v1/pricing-models/{id}/export",
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: <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"
"net/http"
"io"
)
func main() {
url := "https://app.flowglad.com/api/v1/pricing-models/{id}/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.flowglad.com/api/v1/pricing-models/{id}/export")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.flowglad.com/api/v1/pricing-models/{id}/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"pricingModel": {
"isDefault": false,
"name": "<string>",
"features": [
{
"type": "<string>",
"slug": "<string>",
"name": "<string>",
"description": "<string>",
"active": true
}
],
"products": [
{
"product": {
"name": "<string>",
"active": true,
"slug": "<string>",
"description": "<string>",
"imageURL": "<string>",
"singularQuantityLabel": "<string>",
"pluralQuantityLabel": "<string>",
"default": true
},
"price": {
"intervalCount": 123,
"type": "<string>",
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": null,
"usageMeterId": null,
"name": "<string>",
"trialPeriodDays": 4503599627370495,
"active": true,
"slug": "<string>"
},
"features": [
"<string>"
]
}
],
"usageMeters": [
{
"usageMeter": {
"name": "<string>",
"slug": "<string>"
},
"prices": [
{
"intervalCount": 123,
"type": "<string>",
"trialPeriodDays": null,
"isDefault": true,
"unitPrice": 4503599627370495,
"usageEventsPerUnit": 123,
"name": "<string>",
"active": true,
"slug": "<string>"
}
]
}
],
"resources": [
{
"slug": "<string>",
"name": "<string>",
"active": true
}
]
},
"updatedAt": 0
}{
"code": "BAD_REQUEST",
"message": "Invalid input data",
"issues": []
}{
"code": "UNAUTHORIZED",
"message": "Authorization not provided",
"issues": []
}{
"code": "FORBIDDEN",
"message": "Insufficient access",
"issues": []
}{
"code": "NOT_FOUND",
"message": "Not found",
"issues": []
}{
"code": "INTERNAL_SERVER_ERROR",
"message": "Internal server error",
"issues": []
}Authorizations
Path Parameters
Was this page helpful?
⌘I