Customers
Update customer
Developer API operation for PATCH /dev/v1/customers/.
PATCH
/
dev
/
v1
/
customers
/
{id}
Update customer
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"name": "<string>",
"phone": "<string>",
"country_code": "<string>",
"street_address": "<string>",
"city": "<string>",
"postal_code": "<string>",
"customer_balance": {},
"customerBalance": {},
"customer_balance_description": "<string>",
"customerBalanceDescription": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
name: '<string>',
phone: '<string>',
country_code: '<string>',
street_address: '<string>',
city: '<string>',
postal_code: '<string>',
customer_balance: {},
customerBalance: {},
customer_balance_description: '<string>',
customerBalanceDescription: '<string>'
})
};
fetch('https://api.shoppex.io/dev/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/customers/{id}"
payload = {
"email": "<string>",
"name": "<string>",
"phone": "<string>",
"country_code": "<string>",
"street_address": "<string>",
"city": "<string>",
"postal_code": "<string>",
"customer_balance": {},
"customerBalance": {},
"customer_balance_description": "<string>",
"customerBalanceDescription": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'name' => '<string>',
'phone' => '<string>',
'country_code' => '<string>',
'street_address' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'customer_balance' => [
],
'customerBalance' => [
],
'customer_balance_description' => '<string>',
'customerBalanceDescription' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "https://api.shoppex.io/dev/v1/customers/{id}"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"customer_balance\": {},\n \"customerBalance\": {},\n \"customer_balance_description\": \"<string>\",\n \"customerBalanceDescription\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"data": {}
}Authorizations
Use your Shoppex API key in the Authorization header.
Path Parameters
Body
application/jsonmultipart/form-datatext/plain
Response
200 - application/json
Successful response
⌘I
Update customer
curl --request PATCH \
--url https://api.shoppex.io/dev/v1/customers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"email": "<string>",
"name": "<string>",
"phone": "<string>",
"country_code": "<string>",
"street_address": "<string>",
"city": "<string>",
"postal_code": "<string>",
"customer_balance": {},
"customerBalance": {},
"customer_balance_description": "<string>",
"customerBalanceDescription": "<string>"
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
email: '<string>',
name: '<string>',
phone: '<string>',
country_code: '<string>',
street_address: '<string>',
city: '<string>',
postal_code: '<string>',
customer_balance: {},
customerBalance: {},
customer_balance_description: '<string>',
customerBalanceDescription: '<string>'
})
};
fetch('https://api.shoppex.io/dev/v1/customers/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/customers/{id}"
payload = {
"email": "<string>",
"name": "<string>",
"phone": "<string>",
"country_code": "<string>",
"street_address": "<string>",
"city": "<string>",
"postal_code": "<string>",
"customer_balance": {},
"customerBalance": {},
"customer_balance_description": "<string>",
"customerBalanceDescription": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/customers/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'email' => '<string>',
'name' => '<string>',
'phone' => '<string>',
'country_code' => '<string>',
'street_address' => '<string>',
'city' => '<string>',
'postal_code' => '<string>',
'customer_balance' => [
],
'customerBalance' => [
],
'customer_balance_description' => '<string>',
'customerBalanceDescription' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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 := "https://api.shoppex.io/dev/v1/customers/{id}"
payload := strings.NewReader("{\n \"email\": \"<string>\",\n \"name\": \"<string>\",\n \"phone\": \"<string>\",\n \"country_code\": \"<string>\",\n \"street_address\": \"<string>\",\n \"city\": \"<string>\",\n \"postal_code\": \"<string>\",\n \"customer_balance\": {},\n \"customerBalance\": {},\n \"customer_balance_description\": \"<string>\",\n \"customerBalanceDescription\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}{
"data": {}
}