Create Payment Rule
1 min
POST
https://api.nue.io/billing/payment-rules
Header Parameters
- acceptstringDescriptionDefault*/*Allowed*/*application/json
Body Parameters
- bodyPaymentRuleRequestrequiredDescription
- namestringrequiredDescription
- startDatestring<date>requiredDescriptionFormatdate
- endDatestring<date>DescriptionFormatdate
- statusstring<Draft | Active>DescriptionAllowedDraftActive
- conditionsPaymentRuleCondition[]Description
- idstring<uuid>Formatuuid
- namestring
- actionstring
- externalSystemTypestring
- externalSystemIdstring
- filtersPaymentRuleFilter[]
- apiNamestring
- namestring
- operandstring
- operatorstring
- typestring
- valuestring
- nestedApiNamestring
- nestedTypestring
- descriptionstringDescription
Responses
201
400
- object
- titlestring
- messagestring
- errorCodestring
404
curl
curl --request POST \
--url https://api.nue.io/billing/payment-rules \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '{
"name": "",
"startDate": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "*/*");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"name": "",
"startDate": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/billing/payment-rules", 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/payment-rules")
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({
"name": "",
"startDate": ""
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/billing/payment-rules"
payload = json.dumps({
"name": "",
"startDate": ""
})
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