Update Contact
1 min
PATCH
https://api.nue.io/contacts/{contactId}
Path Parameters
- contactIdstringrequiredDescription
Body Parameters
- bodyobjectrequired
- birthdaystring<date>DescriptionFormatdate
- billingCitystringDescription
- billingCountrystringDescription
- billingPostalCodestringDescription
- billingStatestringDescription
- billingStreetstringDescription
- emailstring<email>DescriptionFormatemail
- firstNamestringDescription
- lastNamestringDescription
- middleNamestringDescription
- mobilePhonestringDescription
- namestringDescription
- phonestringDescription
- shippingCitystringDescription
- shippingCountrystringDescription
- shippingPostalCodestringDescription
- shippingStatestringDescription
- shippingStreetstringDescription
- suffixstringDescription
- titlestringDescription
Responses
200
- object
- statusstringDescription
- dataobject
- billingCitystringDescription
- billingCountrystringDescription
- billingPostalCodestringDescription
- billingStatestringDescription
- billingStreetstringDescription
- birthdaystring<date>DescriptionFormatdate
- createdByIdstringDescription
- createdDatestring<date-time>DescriptionFormatdate-time
- customerIdstringDescription
- emailstring<email>DescriptionFormatemail
- firstNamestringDescription
- idstringDescription
- lastModifiedByIdstringDescription
- lastModifiedDatestring<date-time>DescriptionFormatdate-time
- lastNamestringDescription
- middleNamestringDescription
- mobilePhonestringDescription
- namestringDescription
- phonestringDescription
- shippingCitystringDescription
- shippingCountrystringDescription
- shippingPostalCodestringDescription
- shippingStatestringDescription
- shippingStreetstringDescription
- taxExemptstringDescription
- timezonestringDescription
- typestringDescription
- websitestring<url>DescriptionFormaturl
- warningsobject[]Description
- codestringDescription
- messagestringDescription
400
401
404
curl
curl --request PATCH \
--url https://api.nue.io/contacts/{contactId} \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'PATCH',
headers: myHeaders,
redirect: 'follow'
};
fetch("https://api.nue.io/contacts/{contactId}", 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/contacts/{contactId}")
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"
response = https.request(request)
puts response.read_body
python
import requests
import json
url = "https://api.nue.io/contacts/{contactId}"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("PATCH", url, headers=headers, data=payload)
print(response.text)
200
// Contact updated successfully
{
"status": "",
"data": {
"billingCity": "",
"billingCountry": "",
"billingPostalCode": "",
"billingState": "",
"billingStreet": "",
"birthday": "",
"createdById": "",
"createdDate": "",
"customerId": "",
"email": "",
"firstName": "",
"id": "",
"lastModifiedById": "",
"lastModifiedDate": "",
"lastName": "",
"middleName": "",
"mobilePhone": "",
"name": "",
"phone": "",
"shippingCity": "",
"shippingCountry": "",
"shippingPostalCode": "",
"shippingState": "",
"shippingStreet": "",
"taxExempt": "",
"timezone": "",
"type": "",
"website": ""
},
"warnings": [
{
"code": "",
"message": ""
}
]
}400
// Bad Request - The request was malformed or contained invalid parameters
401
// Unauthorized - Authentication information is missing or invalid
404
// Not Found - The requested contact was not found