Create, change and fill the line buckets of an order
1 min
POST
https://api.nue.io/cpq/orders/{orderId}/line-buckets:apply
Path Parameters
- orderIdstringrequiredDescription
Body Parameters
- bodyApplyLineBucketsRequestrequiredDescription
- bucketsLineBucketInput[]requiredDescription
- bucketKeystringDescription
- bucketIdstringDescription
- namestringDescription
- billingAccountIdstringDescription
- primaryContactIdstringDescription
- startDatestringDescription
- billingPeriodstringDescription
- paymentTermstringDescription
- paymentMethodstringDescription
- billingStreetstringDescription
- billingCitystringDescription
- billingStatestringDescription
- billingPostalCodestringDescription
- billingCountrystringDescription
- shippingStreetstringDescription
- shippingCitystringDescription
- shippingStatestringDescription
- shippingPostalCodestringDescription
- shippingCountrystringDescription
- fieldsmap<string, string>Description
- allocationsLineAllocationInput[]Description
- lineIdstringrequiredDescription
- includeChildLinesbooleanDescription
- validateOnlybooleanDescriptionDefaultfalse
- failOnUnmappedFieldsbooleanDescription
Responses
200
400
curl
curl --request POST \
--url https://api.nue.io/cpq/orders/{orderId}/line-buckets:apply \
--header 'accept: */*' \
--header 'content-type: application/json' \
--data '{
"buckets": [
{
"allocations": [
{
"lineId": ""
}
]
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "*/*");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"buckets": [
{
"allocations": [
{
"lineId": ""
}
]
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/cpq/orders/{orderId}/line-buckets:apply", 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/cpq/orders/{orderId}/line-buckets:apply")
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({
"buckets": [
{
"allocations": [
{
"lineId": ""
}
]
}
]
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/cpq/orders/{orderId}/line-buckets:apply"
payload = json.dumps({
"buckets": [
{
"allocations": [
{
"lineId": ""
}
]
}
]
})
headers = {
'accept': '*/*',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The buckets after the change
400
// Bad Request