Adds the customer
1 min
POST
/api/episerver/v3.0/customers
Body Parameters
- bodycustomerrequiredDescription
- createdstring<date-time>DescriptionFormatdate-time
- modifiedstring<date-time>DescriptionFormatdate-time
- lastNamestringrequiredDescription
- firstNamestringrequiredDescription
- emailstringrequiredDescription
- birthDatestring<date-time>DescriptionFormatdate-time
- lastOrderstring<date-time>DescriptionFormatdate-time
- customerGroupstringDescription
- preferredLanguagestringDescription
- preferredCurrencystringDescription
- registrationSourcestringDescription
- preferredShippingAddressNamestringDescription
- preferredBillingAddressNamestringDescription
- customerIdstringDescription
- acceptMarketingEmailbooleanDescription
- consentUpdatedstring<date-time>DescriptionFormatdate-time
- extendedPropertiesextendedProperty[]Description
- namestringDescription
- valuestringDescription
- addressesmeAddress[]Description
- customerIdstringDescription
- addressTypeinteger[]Description
- lastNamestringDescription
- firstNamestringDescription
- daytimePhoneNumberstringDescription
- eveningPhoneNumberstringDescription
- emailstringDescription
- line2stringDescription
- regionstringDescription
- countryCodestringDescription
- countryNamestringDescription
- postalCodestringDescription
- regionCodestringDescription
- namestringDescription
- line1stringDescription
- citystringDescription
- extendedPropertiesextendedProperty[]Description
- namestringDescription
- valuestringDescription
Responses
200
400
403
curl
curl --request POST \
--url /api/episerver/v3.0/customers \
--header 'accept: application/problem+json' \
--header 'content-type: application/json' \
--data '{
"lastName": "",
"firstName": "",
"email": ""
}'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/problem+json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"lastName": "",
"firstName": "",
"email": ""
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("/api/episerver/v3.0/customers", 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("/api/episerver/v3.0/customers")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/problem+json"
request["content-type"] = "application/json"
request.body = JSON.dump({
"lastName": "",
"firstName": "",
"email": ""
})
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/episerver/v3.0/customers"
payload = json.dumps({
"lastName": "",
"firstName": "",
"email": ""
})
headers = {
'accept': 'application/problem+json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success
400
// Bad Request
403
// Forbidden