Create Billing Schedule
1 min
POST
https://api.nue.io/billing/schedules
Header Parameters
- acceptstringDescriptionDefault*/*Allowed*/*application/json
Body Parameters
- bodyobjectrequiredDescription
- createdThroughstringExampleDescription
- autoActivatebooleanExampleDescription
- scheduleStartDatestring<date>ExampleDescriptionFormatdate
- invoiceDatestring<date>ExampleDescriptionFormatdate
- scheduleTypestring<Recurring | On Demand>requiredExampleDescriptionAllowedRecurringOn Demand
- recurringSchedulestringExampleDescription
- customerFilterstringExampleDescription
- orderFilterstringExampleDescription
- productFilterstringExampleDescription
- zoneIdstringExampleDescription
- descriptionstringrequiredExampleDescription
- cleanCatchUpbooleanExampleDescription
- catchUpModestring<Simulation | Execution>ExampleDescriptionAllowedSimulationExecution
Responses
201
400
- object
- titlestring
- messagestring
- errorCodestring
404
curl
curl --request POST \
--url https://api.nue.io/billing/schedules \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '{
"scheduleType": "Recurring",
"description": "Monthly billing schedule for recurring subscriptions"
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "*/*");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"scheduleType": "Recurring",
"description": "Monthly billing schedule for recurring subscriptions"
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/billing/schedules", 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://api.nue.io/billing/schedules")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["accept"] = "*/*"
request["content-type"] = "application/json"
request.body = JSON.dump({
"scheduleType": "Recurring",
"description": "Monthly billing schedule for recurring subscriptions"
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/billing/schedules"
payload = json.dumps({
"scheduleType": "Recurring",
"description": "Monthly billing schedule for recurring subscriptions"
})
headers = {
'accept': '*/*',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
201
// Created
400
// Bad Request
{
"title": "",
"message": "",
"errorCode": ""
}404
// Not Found