Add or update addresss for myself.
1 min
POST
/api/episerver/v3.0/me/addresses
Header Parameters
- acceptstringDescriptionDefaultapplication/jsonAllowedapplication/jsonapplication/problem+json
Body Parameters
- bodymeAddressrequiredDescription
- customerIdstringDescription
- addressTypeinteger[]Description
- lastNamestringDescription
- firstNamestringDescription
- daytimePhoneNumberstringDescription
- eveningPhoneNumberstringDescription
- emailstringDescription
- line2stringDescription
- regionstringDescription
- countryCodestringDescription
- countryNamestringDescription
- postalCodestringDescription
- regionCodestringDescription
- namestringDescription
- line1stringDescription
- citystringDescription
- extendedPropertiesextendedProperty[]Description
- namestringDescription
- valuestringDescription
Responses
200
- meAddressDescription
- customerIdstringDescription
- addressTypeinteger[]Description
- lastNamestringDescription
- firstNamestringDescription
- daytimePhoneNumberstringDescription
- eveningPhoneNumberstringDescription
- emailstringDescription
- line2stringDescription
- regionstringDescription
- countryCodestringDescription
- countryNamestringDescription
- postalCodestringDescription
- regionCodestringDescription
- namestringDescription
- line1stringDescription
- citystringDescription
- extendedPropertiesextendedProperty[]Description
- namestringDescription
- valuestringDescription
400
403
curl
curl --request POST \
--url /api/episerver/v3.0/me/addresses \
--header 'accept: application/json'javascript
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var requestOptions = {
method: 'POST',
headers: myHeaders,
redirect: 'follow'
};
fetch("/api/episerver/v3.0/me/addresses", 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/me/addresses")
http = Net::HTTP.new(url.host, url.port);
request = Net::HTTP::Post.new(url)
request["accept"] = "application/json"
request["content-type"] = "application/json"
response = http.request(request)
puts response.read_body
python
import requests
import json
url = "/api/episerver/v3.0/me/addresses"
payload = {}
headers = {
'accept': 'application/json',
'content-type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
200
// Success
{
"customerId": "",
"addressType": [
0
],
"lastName": "",
"firstName": "",
"daytimePhoneNumber": "",
"eveningPhoneNumber": "",
"email": "",
"line2": "",
"region": "",
"countryCode": "",
"countryName": "",
"postalCode": "",
"regionCode": "",
"name": "",
"line1": "",
"city": "",
"extendedProperties": [
{
"name": "",
"value": ""
}
]
}400
// Bad Request
403
// Forbidden