Create or update a cost item price using a cost item price template
1 min
POST
https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template/cost_item_tiered_seat_based
Body Parameters
- bodypayment.pricing.cost.TieredSeatBasedCostItemPriceGenerator.in
- distinctDimensionsstring[]requiredDescription
- idstringrequiredDescription
- leafNodeTypestringrequiredDescription
- priceTierspayment.pricing.price.PriceTier.in[]requiredDescription
- startAfterUnitinteger<int64>
- batchSizeinteger<int64>
- pricePerBatchnumber
- meterApiNamestringrequiredDescription
- usageGranularitypayment.pricing.price.UsageGranularity.inrequiredDescription
- groupDimensionsstring[]Description
- costItemPriceNamestringDescription
- scalarnumberDescription
- startDateInSecondsinteger<int64>requiredDescription
- expirationDateInSecondsinteger<int64>Description
- typestringDescriptionDefaultcost_item_tiered_seat_based
Responses
200
- payment.pricing.cost.TieredSeatBasedCostItemPriceGenerator.out
- distinctDimensionsstring[]requiredDescription
- idstringrequiredDescription
- leafNodeTypestringrequiredDescription
- priceTierspayment.pricing.price.PriceTier.out[]requiredDescription
- startAfterUnitinteger<int64>
- batchSizeinteger<int64>
- pricePerBatchnumber
- meterApiNamestringrequiredDescription
- usageGranularitypayment.pricing.price.UsageGranularity.outrequiredDescription
- groupDimensionsstring[]Description
- costItemPriceNamestringDescription
- scalarnumberDescription
- startDateInSecondsinteger<int64>requiredDescription
- expirationDateInSecondsinteger<int64>Description
- typestringDescriptionDefaultcost_item_tiered_seat_based
curl
curl --request POST \
--url https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template/cost_item_tiered_seat_based \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"distinctDimensions": [],
"id": "",
"leafNodeType": "",
"priceTiers": [
{}
],
"meterApiName": "",
"usageGranularity": "",
"startDateInSeconds": 0,
"type": "cost_item_tiered_seat_based"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"distinctDimensions": [],
"id": "",
"leafNodeType": "",
"priceTiers": [
{}
],
"meterApiName": "",
"usageGranularity": "",
"startDateInSeconds": 0,
"type": "cost_item_tiered_seat_based"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template/cost_item_tiered_seat_based", 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/cost-item-price/template/cost_item_tiered_seat_based")
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({
"distinctDimensions": [],
"id": "",
"leafNodeType": "",
"priceTiers": [
{}
],
"meterApiName": "",
"usageGranularity": "",
"startDateInSeconds": 0,
"type": "cost_item_tiered_seat_based"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/pricing/amberflo/account-pricing/cost-item-price/template/cost_item_tiered_seat_based"
payload = json.dumps({
"distinctDimensions": [],
"id": "",
"leafNodeType": "",
"priceTiers": [
{}
],
"meterApiName": "",
"usageGranularity": "",
"startDateInSeconds": 0,
"type": "cost_item_tiered_seat_based"
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful request
{
"distinctDimensions": [
""
],
"id": "",
"leafNodeType": "",
"priceTiers": [
{
"startAfterUnit": "",
"batchSize": "",
"pricePerBatch": 0
}
],
"meterApiName": "",
"usageGranularity": "",
"groupDimensions": [
""
],
"costItemPriceName": "",
"scalar": 0,
"startDateInSeconds": "",
"expirationDateInSeconds": "",
"type": ""
}