Update Payment Rule
1 min
PATCH
https://api.nue.io/billing/payment-rules/{id}
Path Parameters
- idstring<uuid>requiredFormatuuidPattern[0-9a-fA-F-]{36}
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/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
200
400
- object
- titlestring
- messagestring
- errorCodestring
404
curl
curl --request PATCH \
--url https://api.nue.io/billing/payment-rules/{id} \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"name": "",
"startDate": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"name": "",
"startDate": ""
});
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/billing/payment-rules/{id}", 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/{id}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["accept"] = "application/json"
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/{id}"
payload = json.dumps({
"name": "",
"startDate": ""
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
200
// OK
400
// Bad Request
{
"title": "",
"message": "",
"errorCode": ""
}404
// Not Found