Send Quote for e-Signature
1 min
POST
https://api.nue.io/v1/cpq/quotes/{quoteId}:eSign
Path Parameters
- quoteIdstringrequiredExampleDescription
Body Parameters
- bodySendForSignatureRequestrequiredDescription
- templateIdstring<uuid>ExampleDescriptionFormatuuid
- recipientsRecipient[]requiredDescription
- tagstringrequiredExampleDescription
- namestringrequiredExampleDescription
- emailstring<email>requiredExampleDescriptionFormatemail
- rolestringrequiredExampleDescription
- actionstringrequiredExampleDescription
- emailEmailContentrequired
- subjectstringrequiredExampleDescription
- messagestringrequiredExampleDescription
Responses
200
- SendForSignatureResponse
- jobIdstring<uuid>ExampleDescriptionFormatuuid
400
- ErrorResponse
- errorobject
- codestringExampleDescription
- messagestringExampleDescription
- detailsstring[]Example
[ "Document must be in Draft or Pending status to send for signature" ]
Description
401
- ErrorResponse
- errorobject
- codestringExampleDescription
- messagestringExampleDescription
- detailsstring[]Example
[ "Document must be in Draft or Pending status to send for signature" ]
Description
404
- ErrorResponse
- errorobject
- codestringExampleDescription
- messagestringExampleDescription
- detailsstring[]Example
[ "Document must be in Draft or Pending status to send for signature" ]
Description
curl
curl --request POST \
--url https://api.nue.io/v1/cpq/quotes/{quoteId}:eSign \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data-raw '{
"recipients": [
{
"tag": "Customer",
"name": "Jack Chen",
"email": "[email protected]",
"role": "Customer",
"action": "Needs to Sign"
}
],
"email": {
"subject": "Order Form for your e-Signature (Sent by API)",
"message": "This is a request for your electronic signature, please review your order form and electronically sign by following the link below."
}
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"recipients": [
{
"tag": "Customer",
"name": "Jack Chen",
"email": "[email protected]",
"role": "Customer",
"action": "Needs to Sign"
}
],
"email": {
"subject": "Order Form for your e-Signature (Sent by API)",
"message": "This is a request for your electronic signature, please review your order form and electronically sign by following the link below."
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.nue.io/v1/cpq/quotes/{quoteId}:eSign", 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/v1/cpq/quotes/{quoteId}:eSign")
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({
"recipients": [
{
"tag": "Customer",
"name": "Jack Chen",
"email": "[email protected]",
"role": "Customer",
"action": "Needs to Sign"
}
],
"email": {
"subject": "Order Form for your e-Signature (Sent by API)",
"message": "This is a request for your electronic signature, please review your order form and electronically sign by following the link below."
}
})
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/v1/cpq/quotes/{quoteId}:eSign"
payload = json.dumps({
"recipients": [
{
"tag": "Customer",
"name": "Jack Chen",
"email": "[email protected]",
"role": "Customer",
"action": "Needs to Sign"
}
],
"email": {
"subject": "Order Form for your e-Signature (Sent by API)",
"message": "This is a request for your electronic signature, please review your order form and electronically sign by following the link below."
}
})
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// e-Signature job created successfully
{
"jobId": "2125b6ba-0aec-4a8d-8ca1-da0ec6bfedd4"
}GENERATED
// e-Signature job created successfully
{
"jobId": "2125b6ba-0aec-4a8d-8ca1-da0ec6bfedd4"
}Success Response
{
"jobId": "2125b6ba-0aec-4a8d-8ca1-da0ec6bfedd4"
}400
// Bad Request - Invalid quote or recipient information
{
"error": {
"code": "INVALID_DOCUMENT",
"message": "Document not found or cannot be sent for signature",
"details": [
""
]
}
}401
// Unauthorized - Invalid or missing API key
{
"error": {
"code": "INVALID_DOCUMENT",
"message": "Document not found or cannot be sent for signature",
"details": [
""
]
}
}404
// Not Found - Quote does not exist
{
"error": {
"code": "INVALID_DOCUMENT",
"message": "Document not found or cannot be sent for signature",
"details": [
""
]
}
}