Mettre à jour une adresse
curl --request PATCH \
--url https://qwoty.app/api/addresses/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"name": {},
"address_line1": "<string>",
"address_line2": {},
"city": "<string>",
"state": {},
"postal_code": "<string>",
"country": "<string>",
"contact_id": {},
"comment": {},
"id_crm": {},
"id_erp": {},
"id_accounting": {}
}
'import requests
url = "https://qwoty.app/api/addresses/{id}"
payload = {
"type": "<string>",
"name": {},
"address_line1": "<string>",
"address_line2": {},
"city": "<string>",
"state": {},
"postal_code": "<string>",
"country": "<string>",
"contact_id": {},
"comment": {},
"id_crm": {},
"id_erp": {},
"id_accounting": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
name: {},
address_line1: '<string>',
address_line2: {},
city: '<string>',
state: {},
postal_code: '<string>',
country: '<string>',
contact_id: {},
comment: {},
id_crm: {},
id_erp: {},
id_accounting: {}
})
};
fetch('https://qwoty.app/api/addresses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qwoty.app/api/addresses/{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([
'type' => '<string>',
'name' => [
],
'address_line1' => '<string>',
'address_line2' => [
],
'city' => '<string>',
'state' => [
],
'postal_code' => '<string>',
'country' => '<string>',
'contact_id' => [
],
'comment' => [
],
'id_crm' => [
],
'id_erp' => [
],
'id_accounting' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://qwoty.app/api/addresses/{id}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": {},\n \"address_line1\": \"<string>\",\n \"address_line2\": {},\n \"city\": \"<string>\",\n \"state\": {},\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"contact_id\": {},\n \"comment\": {},\n \"id_crm\": {},\n \"id_erp\": {},\n \"id_accounting\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://qwoty.app/api/addresses/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": {},\n \"address_line1\": \"<string>\",\n \"address_line2\": {},\n \"city\": \"<string>\",\n \"state\": {},\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"contact_id\": {},\n \"comment\": {},\n \"id_crm\": {},\n \"id_erp\": {},\n \"id_accounting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/addresses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"name\": {},\n \"address_line1\": \"<string>\",\n \"address_line2\": {},\n \"city\": \"<string>\",\n \"state\": {},\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"contact_id\": {},\n \"comment\": {},\n \"id_crm\": {},\n \"id_erp\": {},\n \"id_accounting\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "770e8400-e29b-41d4-a716-446655440002",
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "billing",
"name": "Nouveau siège",
"address_line1": "42 Avenue des Champs-Élysées",
"address_line2": null,
"city": "Paris",
"state": null,
"postal_code": "75008",
"country": "FR",
"contact_id": null,
"comment": null,
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-03-24T14:00:00Z"
}
}
{
"success": false,
"error": "Address not found"
}
Adresses
Mettre à jour une adresse
Mettre à jour partiellement une adresse
PATCH
/
api
/
addresses
/
{id}
Mettre à jour une adresse
curl --request PATCH \
--url https://qwoty.app/api/addresses/{id} \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "<string>",
"name": {},
"address_line1": "<string>",
"address_line2": {},
"city": "<string>",
"state": {},
"postal_code": "<string>",
"country": "<string>",
"contact_id": {},
"comment": {},
"id_crm": {},
"id_erp": {},
"id_accounting": {}
}
'import requests
url = "https://qwoty.app/api/addresses/{id}"
payload = {
"type": "<string>",
"name": {},
"address_line1": "<string>",
"address_line2": {},
"city": "<string>",
"state": {},
"postal_code": "<string>",
"country": "<string>",
"contact_id": {},
"comment": {},
"id_crm": {},
"id_erp": {},
"id_accounting": {}
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
type: '<string>',
name: {},
address_line1: '<string>',
address_line2: {},
city: '<string>',
state: {},
postal_code: '<string>',
country: '<string>',
contact_id: {},
comment: {},
id_crm: {},
id_erp: {},
id_accounting: {}
})
};
fetch('https://qwoty.app/api/addresses/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://qwoty.app/api/addresses/{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([
'type' => '<string>',
'name' => [
],
'address_line1' => '<string>',
'address_line2' => [
],
'city' => '<string>',
'state' => [
],
'postal_code' => '<string>',
'country' => '<string>',
'contact_id' => [
],
'comment' => [
],
'id_crm' => [
],
'id_erp' => [
],
'id_accounting' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://qwoty.app/api/addresses/{id}"
payload := strings.NewReader("{\n \"type\": \"<string>\",\n \"name\": {},\n \"address_line1\": \"<string>\",\n \"address_line2\": {},\n \"city\": \"<string>\",\n \"state\": {},\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"contact_id\": {},\n \"comment\": {},\n \"id_crm\": {},\n \"id_erp\": {},\n \"id_accounting\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "<authorization>")
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.patch("https://qwoty.app/api/addresses/{id}")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"<string>\",\n \"name\": {},\n \"address_line1\": \"<string>\",\n \"address_line2\": {},\n \"city\": \"<string>\",\n \"state\": {},\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"contact_id\": {},\n \"comment\": {},\n \"id_crm\": {},\n \"id_erp\": {},\n \"id_accounting\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qwoty.app/api/addresses/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"type\": \"<string>\",\n \"name\": {},\n \"address_line1\": \"<string>\",\n \"address_line2\": {},\n \"city\": \"<string>\",\n \"state\": {},\n \"postal_code\": \"<string>\",\n \"country\": \"<string>\",\n \"contact_id\": {},\n \"comment\": {},\n \"id_crm\": {},\n \"id_erp\": {},\n \"id_accounting\": {}\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"data": {
"id": "770e8400-e29b-41d4-a716-446655440002",
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "billing",
"name": "Nouveau siège",
"address_line1": "42 Avenue des Champs-Élysées",
"address_line2": null,
"city": "Paris",
"state": null,
"postal_code": "75008",
"country": "FR",
"contact_id": null,
"comment": null,
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-03-24T14:00:00Z"
}
}
{
"success": false,
"error": "Address not found"
}
Autorisation
string
requis
Token Bearer. Format :
Bearer qwoty_your_tokenParamètres de chemin
string
requis
UUID de l’adresse à mettre à jour
Corps de la requête
Tous les champs sont optionnels. Seuls les champs fournis seront mis à jour.string
Type d’adresse. Valeurs autorisées :
"billing", "shipping"string | null
Libellé de l’adresse. Définir à
null pour effacer.string
Adresse postale
string | null
Complément d’adresse. Définir à
null pour effacer.string
Ville
string | null
État ou région. Définir à
null pour effacer.string
Code postal
string
Code pays (ISO 3166-1 alpha-2)
string | null
UUID du contact associé. Définir à
null pour effacer.string | null
Commentaire interne. Définir à
null pour effacer.string | null
Identifiant CRM externe
string | null
Identifiant ERP externe
string | null
Identifiant comptable externe
customer_id ne peut pas être modifié après la création.Exemples
curl -X PATCH https://qwoty.app/api/addresses/770e8400-e29b-41d4-a716-446655440002 \
-H "Authorization: Bearer qwoty_your_token" \
-H "Content-Type: application/json" \
-d '{
"name": "Nouveau siège",
"address_line1": "42 Avenue des Champs-Élysées",
"city": "Paris",
"postal_code": "75008",
"country": "FR"
}'
const addressId = '770e8400-e29b-41d4-a716-446655440002'
const response = await fetch(`https://qwoty.app/api/addresses/${addressId}`, {
method: 'PATCH',
headers: {
Authorization: 'Bearer qwoty_your_token',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: 'Nouveau siège',
address_line1: '42 Avenue des Champs-Élysées',
city: 'Paris',
postal_code: '75008',
country: 'FR',
}),
})
const data = await response.json()
import requests
address_id = '770e8400-e29b-41d4-a716-446655440002'
response = requests.patch(
f'https://qwoty.app/api/addresses/{address_id}',
headers={
'Authorization': 'Bearer qwoty_your_token',
'Content-Type': 'application/json',
},
json={
'name': 'Nouveau siège',
'address_line1': '42 Avenue des Champs-Élysées',
'city': 'Paris',
'postal_code': '75008',
'country': 'FR',
},
)
data = response.json()
Réponse
boolean
true si la mise à jour a réussiobject
L’objet adresse mis à jour (même structure que Obtenir une
adresse)
{
"success": true,
"data": {
"id": "770e8400-e29b-41d4-a716-446655440002",
"customer_id": "550e8400-e29b-41d4-a716-446655440000",
"type": "billing",
"name": "Nouveau siège",
"address_line1": "42 Avenue des Champs-Élysées",
"address_line2": null,
"city": "Paris",
"state": null,
"postal_code": "75008",
"country": "FR",
"contact_id": null,
"comment": null,
"id_crm": null,
"id_erp": null,
"id_accounting": null,
"created_at": "2026-01-15T10:30:00Z",
"updated_at": "2026-03-24T14:00:00Z"
}
}
{
"success": false,
"error": "Address not found"
}
Cette page vous a-t-elle été utile ?
⌘I

