Create or update a spending limit
1 min
POST
https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits
Body Parameters
- bodypayment.pricing.customer.spending_limit.CustomerSpendingLimit.in
- accountIdstringDescription
- customerIdstringrequiredDescription
- idstringDescription
- labelstringDescription
- effectiveTimeRangepayment.common.TimeRange.inrequiredDescription
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- trueUpInputpayment.pricing.commitments.generators.TrueUpInput.inrequiredDescription
- minimumPaymentnumberrequired
- intervalpayment.pricing.commitments.generators.TrueUpInterval.inrequired
- startCycleinteger<int32>
- endCycleinteger<int32>
- productItemIdsstring[]
- usePriceAfterDiscountsboolean
- createdTimeInSecondsinteger<int64>Description
- updatedTimeInSecondsinteger<int64>Description
Responses
200
- payment.pricing.customer.spending_limit.CustomerSpendingLimit.out
- accountIdstringDescription
- customerIdstringrequiredDescription
- idstringDescription
- labelstringDescription
- effectiveTimeRangepayment.common.TimeRange.outrequiredDescription
- startTimeInSecondsinteger<int64>
- endTimeInSecondsinteger<int64>
- trueUpInputpayment.pricing.commitments.generators.TrueUpInput.outrequiredDescription
- minimumPaymentnumberrequired
- intervalpayment.pricing.commitments.generators.TrueUpInterval.outrequired
- startCycleinteger<int32>
- endCycleinteger<int32>
- productItemIdsstring[]
- usePriceAfterDiscountsboolean
- createdTimeInSecondsinteger<int64>Description
- updatedTimeInSecondsinteger<int64>Description
curl
curl --request POST \
--url https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"customerId": "",
"effectiveTimeRange": {},
"trueUpInput": {
"minimumPayment": "",
"interval": ""
}
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"customerId": "",
"effectiveTimeRange": {},
"trueUpInput": {
"minimumPayment": "",
"interval": ""
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits", 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/customer-pricing/spending-limits")
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({
"customerId": "",
"effectiveTimeRange": {},
"trueUpInput": {
"minimumPayment": "",
"interval": ""
}
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://app.amberflo.io/payments/pricing/amberflo/customer-pricing/spending-limits"
payload = json.dumps({
"customerId": "",
"effectiveTimeRange": {},
"trueUpInput": {
"minimumPayment": "",
"interval": ""
}
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Successful request
{
"accountId": "",
"customerId": "",
"id": "",
"label": "",
"effectiveTimeRange": {
"startTimeInSeconds": "",
"endTimeInSeconds": ""
},
"trueUpInput": {
"minimumPayment": 0,
"interval": "",
"startCycle": "",
"endCycle": "",
"productItemIds": [
""
],
"usePriceAfterDiscounts": false
},
"createdTimeInSeconds": "",
"updatedTimeInSeconds": ""
}