Criar um novo paywall (admin)
curl --request POST \
--url https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"customLink": "<string>",
"price": 123,
"description": "<string>",
"discountPercentage": 123,
"discountedPrice": 123,
"maxInstallments": 123,
"accessMonths": 123,
"removeAfterExpiration": true,
"actionPayload": "<string>",
"allowExternalPurchase": true,
"externalCheckoutUrl": "<string>",
"openingLink": "<string>",
"imageUrl": "<string>",
"isActive": true,
"allowPix": true,
"allowCreditCard": true,
"allowBoleto": true,
"notifyAllAdmins": true,
"trialDays": 123,
"graceDays": 123,
"maxBillingCycles": 123
}
'import requests
url = "https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls"
payload = {
"name": "<string>",
"customLink": "<string>",
"price": 123,
"description": "<string>",
"discountPercentage": 123,
"discountedPrice": 123,
"maxInstallments": 123,
"accessMonths": 123,
"removeAfterExpiration": True,
"actionPayload": "<string>",
"allowExternalPurchase": True,
"externalCheckoutUrl": "<string>",
"openingLink": "<string>",
"imageUrl": "<string>",
"isActive": True,
"allowPix": True,
"allowCreditCard": True,
"allowBoleto": True,
"notifyAllAdmins": True,
"trialDays": 123,
"graceDays": 123,
"maxBillingCycles": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
customLink: '<string>',
price: 123,
description: '<string>',
discountPercentage: 123,
discountedPrice: 123,
maxInstallments: 123,
accessMonths: 123,
removeAfterExpiration: true,
actionPayload: '<string>',
allowExternalPurchase: true,
externalCheckoutUrl: '<string>',
openingLink: '<string>',
imageUrl: '<string>',
isActive: true,
allowPix: true,
allowCreditCard: true,
allowBoleto: true,
notifyAllAdmins: true,
trialDays: 123,
graceDays: 123,
maxBillingCycles: 123
})
};
fetch('https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls', 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://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'customLink' => '<string>',
'price' => 123,
'description' => '<string>',
'discountPercentage' => 123,
'discountedPrice' => 123,
'maxInstallments' => 123,
'accessMonths' => 123,
'removeAfterExpiration' => true,
'actionPayload' => '<string>',
'allowExternalPurchase' => true,
'externalCheckoutUrl' => '<string>',
'openingLink' => '<string>',
'imageUrl' => '<string>',
'isActive' => true,
'allowPix' => true,
'allowCreditCard' => true,
'allowBoleto' => true,
'notifyAllAdmins' => true,
'trialDays' => 123,
'graceDays' => 123,
'maxBillingCycles' => 123
]),
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://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"customLink\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"discountPercentage\": 123,\n \"discountedPrice\": 123,\n \"maxInstallments\": 123,\n \"accessMonths\": 123,\n \"removeAfterExpiration\": true,\n \"actionPayload\": \"<string>\",\n \"allowExternalPurchase\": true,\n \"externalCheckoutUrl\": \"<string>\",\n \"openingLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"isActive\": true,\n \"allowPix\": true,\n \"allowCreditCard\": true,\n \"allowBoleto\": true,\n \"notifyAllAdmins\": true,\n \"trialDays\": 123,\n \"graceDays\": 123,\n \"maxBillingCycles\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"customLink\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"discountPercentage\": 123,\n \"discountedPrice\": 123,\n \"maxInstallments\": 123,\n \"accessMonths\": 123,\n \"removeAfterExpiration\": true,\n \"actionPayload\": \"<string>\",\n \"allowExternalPurchase\": true,\n \"externalCheckoutUrl\": \"<string>\",\n \"openingLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"isActive\": true,\n \"allowPix\": true,\n \"allowCreditCard\": true,\n \"allowBoleto\": true,\n \"notifyAllAdmins\": true,\n \"trialDays\": 123,\n \"graceDays\": 123,\n \"maxBillingCycles\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"customLink\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"discountPercentage\": 123,\n \"discountedPrice\": 123,\n \"maxInstallments\": 123,\n \"accessMonths\": 123,\n \"removeAfterExpiration\": true,\n \"actionPayload\": \"<string>\",\n \"allowExternalPurchase\": true,\n \"externalCheckoutUrl\": \"<string>\",\n \"openingLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"isActive\": true,\n \"allowPix\": true,\n \"allowCreditCard\": true,\n \"allowBoleto\": true,\n \"notifyAllAdmins\": true,\n \"trialDays\": 123,\n \"graceDays\": 123,\n \"maxBillingCycles\": 123\n}"
response = http.request(request)
puts response.read_bodyPaywall
Criar um novo paywall (admin)
POST
/
api
/
v2
/
admin
/
monetization
/
paywalls
Criar um novo paywall (admin)
curl --request POST \
--url https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"customLink": "<string>",
"price": 123,
"description": "<string>",
"discountPercentage": 123,
"discountedPrice": 123,
"maxInstallments": 123,
"accessMonths": 123,
"removeAfterExpiration": true,
"actionPayload": "<string>",
"allowExternalPurchase": true,
"externalCheckoutUrl": "<string>",
"openingLink": "<string>",
"imageUrl": "<string>",
"isActive": true,
"allowPix": true,
"allowCreditCard": true,
"allowBoleto": true,
"notifyAllAdmins": true,
"trialDays": 123,
"graceDays": 123,
"maxBillingCycles": 123
}
'import requests
url = "https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls"
payload = {
"name": "<string>",
"customLink": "<string>",
"price": 123,
"description": "<string>",
"discountPercentage": 123,
"discountedPrice": 123,
"maxInstallments": 123,
"accessMonths": 123,
"removeAfterExpiration": True,
"actionPayload": "<string>",
"allowExternalPurchase": True,
"externalCheckoutUrl": "<string>",
"openingLink": "<string>",
"imageUrl": "<string>",
"isActive": True,
"allowPix": True,
"allowCreditCard": True,
"allowBoleto": True,
"notifyAllAdmins": True,
"trialDays": 123,
"graceDays": 123,
"maxBillingCycles": 123
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
customLink: '<string>',
price: 123,
description: '<string>',
discountPercentage: 123,
discountedPrice: 123,
maxInstallments: 123,
accessMonths: 123,
removeAfterExpiration: true,
actionPayload: '<string>',
allowExternalPurchase: true,
externalCheckoutUrl: '<string>',
openingLink: '<string>',
imageUrl: '<string>',
isActive: true,
allowPix: true,
allowCreditCard: true,
allowBoleto: true,
notifyAllAdmins: true,
trialDays: 123,
graceDays: 123,
maxBillingCycles: 123
})
};
fetch('https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls', 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://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'customLink' => '<string>',
'price' => 123,
'description' => '<string>',
'discountPercentage' => 123,
'discountedPrice' => 123,
'maxInstallments' => 123,
'accessMonths' => 123,
'removeAfterExpiration' => true,
'actionPayload' => '<string>',
'allowExternalPurchase' => true,
'externalCheckoutUrl' => '<string>',
'openingLink' => '<string>',
'imageUrl' => '<string>',
'isActive' => true,
'allowPix' => true,
'allowCreditCard' => true,
'allowBoleto' => true,
'notifyAllAdmins' => true,
'trialDays' => 123,
'graceDays' => 123,
'maxBillingCycles' => 123
]),
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://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"customLink\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"discountPercentage\": 123,\n \"discountedPrice\": 123,\n \"maxInstallments\": 123,\n \"accessMonths\": 123,\n \"removeAfterExpiration\": true,\n \"actionPayload\": \"<string>\",\n \"allowExternalPurchase\": true,\n \"externalCheckoutUrl\": \"<string>\",\n \"openingLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"isActive\": true,\n \"allowPix\": true,\n \"allowCreditCard\": true,\n \"allowBoleto\": true,\n \"notifyAllAdmins\": true,\n \"trialDays\": 123,\n \"graceDays\": 123,\n \"maxBillingCycles\": 123\n}")
req, _ := http.NewRequest("POST", 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.post("https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"customLink\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"discountPercentage\": 123,\n \"discountedPrice\": 123,\n \"maxInstallments\": 123,\n \"accessMonths\": 123,\n \"removeAfterExpiration\": true,\n \"actionPayload\": \"<string>\",\n \"allowExternalPurchase\": true,\n \"externalCheckoutUrl\": \"<string>\",\n \"openingLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"isActive\": true,\n \"allowPix\": true,\n \"allowCreditCard\": true,\n \"allowBoleto\": true,\n \"notifyAllAdmins\": true,\n \"trialDays\": 123,\n \"graceDays\": 123,\n \"maxBillingCycles\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apis.cativalab.digital/tenant/api/v2/admin/monetization/paywalls")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"customLink\": \"<string>\",\n \"price\": 123,\n \"description\": \"<string>\",\n \"discountPercentage\": 123,\n \"discountedPrice\": 123,\n \"maxInstallments\": 123,\n \"accessMonths\": 123,\n \"removeAfterExpiration\": true,\n \"actionPayload\": \"<string>\",\n \"allowExternalPurchase\": true,\n \"externalCheckoutUrl\": \"<string>\",\n \"openingLink\": \"<string>\",\n \"imageUrl\": \"<string>\",\n \"isActive\": true,\n \"allowPix\": true,\n \"allowCreditCard\": true,\n \"allowBoleto\": true,\n \"notifyAllAdmins\": true,\n \"trialDays\": 123,\n \"graceDays\": 123,\n \"maxBillingCycles\": 123\n}"
response = http.request(request)
puts response.read_bodyAutorizações
Partner API key (cativa_...) or a JWT, sent as: Authorization: Bearer .
Corpo
application/json
Opções disponíveis:
0, 1, 2, 3, 6 Opções disponíveis:
0, 1 Opções disponíveis:
0, 1, 3, 6, 12 Resposta
200
OK
⌘I
