Set Customer's Address
curl --request POST \
--url http://127.0.0.1:8080/v1/c/customer/{customer_id}/address \
--header 'Content-Type: application/json' \
--header 'wb-key: <api-key>' \
--data '
{
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
}
'import requests
url = "http://127.0.0.1:8080/v1/c/customer/{customer_id}/address"
payload = {
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
}
headers = {
"wb-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'wb-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
city: '<string>',
country: '<string>',
line_1: '<string>',
zip: '<string>',
line_2: '<string>',
state: '<string>'
})
};
fetch('http://127.0.0.1:8080/v1/c/customer/{customer_id}/address', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/customer/{customer_id}/address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => '<string>',
'country' => '<string>',
'line_1' => '<string>',
'zip' => '<string>',
'line_2' => '<string>',
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"wb-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8080/v1/c/customer/{customer_id}/address"
payload := strings.NewReader("{\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"line_1\": \"<string>\",\n \"zip\": \"<string>\",\n \"line_2\": \"<string>\",\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("wb-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:8080/v1/c/customer/{customer_id}/address")
.header("wb-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"line_1\": \"<string>\",\n \"zip\": \"<string>\",\n \"line_2\": \"<string>\",\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer/{customer_id}/address")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["wb-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"line_1\": \"<string>\",\n \"zip\": \"<string>\",\n \"line_2\": \"<string>\",\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
}Customer
Add Address
This API updates the customer Address
POST
/
v1
/
c
/
customer
/
{customer_id}
/
address
Set Customer's Address
curl --request POST \
--url http://127.0.0.1:8080/v1/c/customer/{customer_id}/address \
--header 'Content-Type: application/json' \
--header 'wb-key: <api-key>' \
--data '
{
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
}
'import requests
url = "http://127.0.0.1:8080/v1/c/customer/{customer_id}/address"
payload = {
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
}
headers = {
"wb-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'wb-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
city: '<string>',
country: '<string>',
line_1: '<string>',
zip: '<string>',
line_2: '<string>',
state: '<string>'
})
};
fetch('http://127.0.0.1:8080/v1/c/customer/{customer_id}/address', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://127.0.0.1:8080/v1/c/customer/{customer_id}/address",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'city' => '<string>',
'country' => '<string>',
'line_1' => '<string>',
'zip' => '<string>',
'line_2' => '<string>',
'state' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"wb-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1:8080/v1/c/customer/{customer_id}/address"
payload := strings.NewReader("{\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"line_1\": \"<string>\",\n \"zip\": \"<string>\",\n \"line_2\": \"<string>\",\n \"state\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("wb-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1:8080/v1/c/customer/{customer_id}/address")
.header("wb-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"line_1\": \"<string>\",\n \"zip\": \"<string>\",\n \"line_2\": \"<string>\",\n \"state\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1:8080/v1/c/customer/{customer_id}/address")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["wb-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"city\": \"<string>\",\n \"country\": \"<string>\",\n \"line_1\": \"<string>\",\n \"zip\": \"<string>\",\n \"line_2\": \"<string>\",\n \"state\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"city": "<string>",
"country": "<string>",
"line_1": "<string>",
"zip": "<string>",
"line_2": "<string>",
"state": "<string>"
}Authorizations
api-keywb_user_cookie
Path Parameters
Id of the Customer
Body
application/json
Physical address. Used by both Customer and WbCustomer entities.
City name
ISO 3166 2-letter Country code
First line of address
Zip or Postal code
Second line of the address. Optional
State, or another appropriate administrative region Empty string value will be treated as NULL
Response
200 - application/json
Customer Address Details
Physical address. Used by both Customer and WbCustomer entities.
City name
ISO 3166 2-letter Country code
First line of address
Zip or Postal code
Second line of the address. Optional
State, or another appropriate administrative region Empty string value will be treated as NULL
⌘I