Create Order
1 min
POST
https://api.nue.io/cpq/orders
Body Parameters
- bodyNewCreateOrderRequestrequiredExamplesSimple order with one product:
{ "customerId": "001xx000003GYn1AAG", "priceBookId": "01sxx000000ABCDEF", "subscriptionStartDate": "2026-01-01", "subscriptionTerm": 12, "subscriptionTermDimension": "Month", "currencyIsoCode": "USD", "billingPeriod": "Month", "products": [ { "productSku": "PLATFORM-BASE", "uom": "Each", "quantity": 1 } ] }Description- customerIdstringrequiredDescription
- priceBookIdstringDescription
- billingAccountIdstringDescription
- billingPeriodstring<Month | Quarter | Semi-Annual | Annual>DescriptionAllowedMonthQuarterSemi-AnnualAnnual
- billCycleDaystringExampleDescription
- descriptionstringDescription
- currencyIsoCodestringExampleDescription
- subscriptionStartDatestring<date>ExampleDescriptionFormatdate
- subscriptionEndDatestring<date>ExampleDescriptionFormatdate
- subscriptionTermnumberExampleDescription
- subscriptionTermDimensionstring<Month | Year>ExampleDescriptionAllowedMonthYear
- autoRenewbooleanDescription
- paymentTermstringDescription
- opportunityIdstringDescription
- namestringDescription
- partnerPayoutPercentagenumberDescription
- partnerPayoutAmountnumberDescription
- productsAddQuoteProductRequest[]requiredDescription
- productSkustringExampleDescription
- productNamestringExampleDescription
- priceBookEntryIdstringExampleDescription
- quantitynumberExampleDescriptionMinimum0
- uomstringExampleDescription
- startDatestring<date>ExampleDescriptionFormatdate
- endDatestring<date>ExampleDescriptionFormatdate
- subscriptionTermnumberExampleDescriptionMinimum0
- subscriptionTermDimensionstring<Month | Year>ExampleDescriptionAllowedMonthYear
- autoRenewbooleanExampleDescription
- evergreenbooleanDescription
- billingPeriodstringExampleDescription
- billingTimingstring<In Advance | In Arrears>ExampleDescriptionAllowedIn AdvanceIn Arrears
- renewalTermnumberExampleDescriptionMinimum0
- discountnumberExampleDescriptionMinimum0Maximum100
- discountAmountnumberExampleDescriptionMinimum0
- priceTagsPriceTagInput[]Description
- codestringExampleDescription
- idstringExampleDescription
- customPricingAttributesCustomPricingAttribute[]Description
- namestringrequiredExampleDescription
- valuestringrequiredExampleDescription
- addOnsAddQuoteProductRequest[]Description
- Circular-Reference
- productOptionIdstringDescription
- netSalesPricenumberDescription
- paymentTermstringDescription
- coTermAssetstringDescription
- parentLineIdstringExampleDescription
- customFieldsmap<string, string>Example
{ "CostCenter__c": "CC-1042", "Ruby__IncludedUnits__c": 25 }Description - rampValuesRampValueInput[]Description
- rampLineIndexintegerExampleDescription
- startDatestring<date>ExampleDescriptionFormatdate
- fieldValuesmap<string, string>Example
{ "Overage_Rate__c": 3 }Description
- priceTagsPriceTagInput[]Description
- codestringExampleDescription
- idstringExampleDescription
Responses
200
- CreateOrderCompositeResponseDescription
- ordermap<string, string>Description
- orderProductsobject[]Description
400
- ApiErrorResponseDescription
- statusintegerExampleDescription
- errorstringExampleDescription
- messagestringDescription
- errorDetailsErrorDetail[]Description
- errorCodestringExampleDescription
- messagestringDescription
- pathstringExampleDescription
401
- ErrorResponseDescription
- codeintegerExampleDescription
- messagestringExampleDescription
- detailsstringExampleDescription
curl
curl --request POST \
--url https://api.nue.io/cpq/orders \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"customerId": "",
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"customerId": "",
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/cpq/orders", 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")
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({
"customerId": "",
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/cpq/orders"
payload = json.dumps({
"customerId": "",
"products": [
{
"customPricingAttributes": [
{
"name": "Ruby__PricingAttribute_3__c",
"value": "New Business"
}
]
}
]
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Order created successfully
{
"order": "",
"orderProducts": [
{}
]
}400
// Invalid request
{
"status": 400,
"error": "Failed to update quote",
"message": "",
"errorDetails": [
{
"errorCode": "QUOTE_NOT_FOUND",
"message": "",
"path": "body.buckets[2].allocations[0]"
}
]
}401
// Unauthorized
{
"code": 400,
"message": "Bad Request",
"details": "Required field 'name' is missing"
}