Create or update a plan catalog
1 min
POST
https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog
Body Parameters
- bodypayment.pricing.plans.catalog.PlanCatalog.in
- idstringDescription
- planCatalogItemspayment.pricing.plans.catalog.PlanCatalogItem.in[]Description
- idstringDescription
- planIdstringrequiredDescription
- namestringrequiredDescription
- entitlementsstring[]requiredDescription
- prepaidPaymentsOptionspayment.pricing.plans.catalog.PrepaidPaymentOption.in[]requiredDescription
- idstringDescription
- prepaidPromotionIdstringDescription
- pricenumberrequiredDescription
- discountReflectednumberDescription
- expirationInDaysinteger<int64>
- descriptionstringDescription
- futureMoneynumberDescription
- futureUsagepayment.pricing.plans.catalog.FutureUsage.inDescription
- itemIdstring
- descriptionstring
- trialPeriodInDaysnumberrequiredDescription
- trialPeriodPlanIdstringDescription
- isDefaultbooleanDescription
- isCreditCardRequiredbooleanrequiredDescription
- customPlanCatalogItemspayment.pricing.plans.catalog.CustomPlanCatalogItem.in[]Description
- idstringDescription
- namestringrequiredDescription
- entitlementsstring[]Description
Responses
200
- payment.pricing.plans.catalog.PlanCatalog.out
- idstringDescription
- planCatalogItemspayment.pricing.plans.catalog.PlanCatalogItem.out[]Description
- idstringDescription
- planIdstringrequiredDescription
- namestringrequiredDescription
- entitlementsstring[]requiredDescription
- prepaidPaymentsOptionspayment.pricing.plans.catalog.PrepaidPaymentOption.out[]requiredDescription
- idstringDescription
- prepaidPromotionIdstringDescription
- pricenumberrequiredDescription
- discountReflectednumberDescription
- expirationInDaysinteger<int64>
- descriptionstringDescription
- futureMoneynumberDescription
- futureUsagepayment.pricing.plans.catalog.FutureUsage.outDescription
- itemIdstring
- descriptionstring
- trialPeriodInDaysnumberrequiredDescription
- trialPeriodPlanIdstringDescription
- isDefaultbooleanDescription
- isCreditCardRequiredbooleanrequiredDescription
- customPlanCatalogItemspayment.pricing.plans.catalog.CustomPlanCatalogItem.out[]Description
- idstringDescription
- namestringrequiredDescription
- entitlementsstring[]Description
curl
curl --request POST \
--url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"planCatalogItems": [
{
"planId": "",
"name": "",
"entitlements": [],
"prepaidPaymentsOptions": [
{
"price": ""
}
],
"trialPeriodInDays": "",
"isCreditCardRequired": ""
}
],
"customPlanCatalogItems": [
{
"name": ""
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"planCatalogItems": [
{
"planId": "",
"name": "",
"entitlements": [],
"prepaidPaymentsOptions": [
{
"price": ""
}
],
"trialPeriodInDays": "",
"isCreditCardRequired": ""
}
],
"customPlanCatalogItems": [
{
"name": ""
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));ruby
require "uri"
require "json"
require "net/http"
url = URI("https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"planCatalogItems": [
{
"planId": "",
"name": "",
"entitlements": [],
"prepaidPaymentsOptions": [
{
"price": ""
}
],
"trialPeriodInDays": "",
"isCreditCardRequired": ""
}
],
"customPlanCatalogItems": [
{
"name": ""
}
]
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/plan-catalog"
payload = json.dumps({
"planCatalogItems": [
{
"planId": "",
"name": "",
"entitlements": [],
"prepaidPaymentsOptions": [
{
"price": ""
}
],
"trialPeriodInDays": "",
"isCreditCardRequired": ""
}
],
"customPlanCatalogItems": [
{
"name": ""
}
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful request
{
"id": "",
"planCatalogItems": [
{
"id": "",
"planId": "",
"name": "",
"entitlements": [
""
],
"prepaidPaymentsOptions": [
{
"id": "",
"prepaidPromotionId": "",
"price": 0,
"discountReflected": 0,
"expirationInDays": "",
"description": "",
"futureMoney": 0,
"futureUsage": {
"itemId": "",
"description": ""
}
}
],
"trialPeriodInDays": 0,
"trialPeriodPlanId": "",
"isDefault": false,
"isCreditCardRequired": false
}
],
"customPlanCatalogItems": [
{
"id": "",
"name": "",
"entitlements": [
""
]
}
]
}