Update Order
1 min
POST
https://api.nue.io/cpq/orders/{orderId}:update
Path Parameters
- orderIdstringrequiredDescription
Body Parameters
- bodyUpdateOrderRequestrequiredDescription
- isCommitbooleanExampleDescriptionDefaulttrue
- recalcstring<AUTO | PRICING_ONLY | TAX_ONLY | NONE>ExampleDescriptionDefaultAUTOAllowedAUTOPRICING_ONLYTAX_ONLYNONE
- expectedLastModifiedstring<date-time>DescriptionFormatdate-time
- actionsUpdateAction[]requiredDescription
- actionstring<updateHeaderFields | updateLineItems | deleteLineItems | addLineItems | replacePriceTags | removePriceTags>requiredDescriptionAllowedupdateHeaderFieldsupdateLineItemsdeleteLineItemsaddLineItemsreplacePriceTagsremovePriceTags
- payloadmap<string, string>Description
Responses
200
- UpdateOrderResponseDescription
- ordermap<string, string>Description
- orderProductsobject[]Description
- warningsMessage[]Description
- errorCodestringDescription
- errorTypestringDescription
- messagestringDescription
400
- ApiErrorResponseDescription
- statusintegerExampleDescription
- errorstringExampleDescription
- messagestringDescription
- errorDetailsErrorDetail[]Description
- errorCodestringExampleDescription
- messagestringDescription
- pathstringExampleDescription
500
- ApiErrorResponseDescription
- statusintegerExampleDescription
- errorstringExampleDescription
- messagestringDescription
- errorDetailsErrorDetail[]Description
- errorCodestringExampleDescription
- messagestringDescription
- pathstringExampleDescription
curl
curl --request POST \
--url https://api.nue.io/cpq/orders/{orderId}:update \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"isCommit": true,
"recalc": "AUTO",
"actions": [
{
"action": ""
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"isCommit": true,
"recalc": "AUTO",
"actions": [
{
"action": ""
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/cpq/orders/{orderId}:update", 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}:update")
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({
"isCommit": true,
"recalc": "AUTO",
"actions": [
{
"action": ""
}
]
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/cpq/orders/{orderId}:update"
payload = json.dumps({
"isCommit": True,
"recalc": "AUTO",
"actions": [
{
"action": ""
}
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// The order was updated (or, with isCommit=false, previewed) successfully.
{
"order": "",
"orderProducts": [
{}
],
"warnings": [
{
"errorCode": "",
"errorType": "",
"message": ""
}
]
}400
// Invalid request — unknown action, conflicting actions, invalid or non-updatable field, non-editable line, failed business rule, or a stale expectedLastModified.
{
"status": 400,
"error": "Failed to update quote",
"message": "",
"errorDetails": [
{
"errorCode": "QUOTE_NOT_FOUND",
"message": "",
"path": "body.buckets[2].allocations[0]"
}
]
}500
// Internal server error. Nothing was committed.
{
"status": 400,
"error": "Failed to update quote",
"message": "",
"errorDetails": [
{
"errorCode": "QUOTE_NOT_FOUND",
"message": "",
"path": "body.buckets[2].allocations[0]"
}
]
}