Créer mettre à jour mon adre e de facturation
curl --request PATCH \
--url https://api.example.com/v1/auth/me/billing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyName": "Acme Corp",
"vatNumber": "FR12345678901",
"siret": "12345678900012",
"address": "16 rue Gustave Courbet",
"address2": "Apt 4B",
"city": "Paris",
"state": "Île-de-France",
"zip": "75000",
"country": "France",
"phone": "+33 6 12 34 56 78"
}
'import requests
url = "https://api.example.com/v1/auth/me/billing"
payload = {
"companyName": "Acme Corp",
"vatNumber": "FR12345678901",
"siret": "12345678900012",
"address": "16 rue Gustave Courbet",
"address2": "Apt 4B",
"city": "Paris",
"state": "Île-de-France",
"zip": "75000",
"country": "France",
"phone": "+33 6 12 34 56 78"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyName: 'Acme Corp',
vatNumber: 'FR12345678901',
siret: '12345678900012',
address: '16 rue Gustave Courbet',
address2: 'Apt 4B',
city: 'Paris',
state: 'Île-de-France',
zip: '75000',
country: 'France',
phone: '+33 6 12 34 56 78'
})
};
fetch('https://api.example.com/v1/auth/me/billing', 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://api.example.com/v1/auth/me/billing",
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([
'companyName' => 'Acme Corp',
'vatNumber' => 'FR12345678901',
'siret' => '12345678900012',
'address' => '16 rue Gustave Courbet',
'address2' => 'Apt 4B',
'city' => 'Paris',
'state' => 'Île-de-France',
'zip' => '75000',
'country' => 'France',
'phone' => '+33 6 12 34 56 78'
]),
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.example.com/v1/auth/me/billing"
payload := strings.NewReader("{\n \"companyName\": \"Acme Corp\",\n \"vatNumber\": \"FR12345678901\",\n \"siret\": \"12345678900012\",\n \"address\": \"16 rue Gustave Courbet\",\n \"address2\": \"Apt 4B\",\n \"city\": \"Paris\",\n \"state\": \"Île-de-France\",\n \"zip\": \"75000\",\n \"country\": \"France\",\n \"phone\": \"+33 6 12 34 56 78\"\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))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/auth/me/billing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyName\": \"Acme Corp\",\n \"vatNumber\": \"FR12345678901\",\n \"siret\": \"12345678900012\",\n \"address\": \"16 rue Gustave Courbet\",\n \"address2\": \"Apt 4B\",\n \"city\": \"Paris\",\n \"state\": \"Île-de-France\",\n \"zip\": \"75000\",\n \"country\": \"France\",\n \"phone\": \"+33 6 12 34 56 78\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/auth/me/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyName\": \"Acme Corp\",\n \"vatNumber\": \"FR12345678901\",\n \"siret\": \"12345678900012\",\n \"address\": \"16 rue Gustave Courbet\",\n \"address2\": \"Apt 4B\",\n \"city\": \"Paris\",\n \"state\": \"Île-de-France\",\n \"zip\": \"75000\",\n \"country\": \"France\",\n \"phone\": \"+33 6 12 34 56 78\"\n}"
response = http.request(request)
puts response.read_bodyAPI — Compte
Créer mettre à jour mon adre e de facturation
Creates or updates the 1:1 billing address linked to the user. Any subset of fields can be sent (PATCH semantics).
PATCH
/
v1
/
auth
/
me
/
billing
Créer mettre à jour mon adre e de facturation
curl --request PATCH \
--url https://api.example.com/v1/auth/me/billing \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"companyName": "Acme Corp",
"vatNumber": "FR12345678901",
"siret": "12345678900012",
"address": "16 rue Gustave Courbet",
"address2": "Apt 4B",
"city": "Paris",
"state": "Île-de-France",
"zip": "75000",
"country": "France",
"phone": "+33 6 12 34 56 78"
}
'import requests
url = "https://api.example.com/v1/auth/me/billing"
payload = {
"companyName": "Acme Corp",
"vatNumber": "FR12345678901",
"siret": "12345678900012",
"address": "16 rue Gustave Courbet",
"address2": "Apt 4B",
"city": "Paris",
"state": "Île-de-France",
"zip": "75000",
"country": "France",
"phone": "+33 6 12 34 56 78"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyName: 'Acme Corp',
vatNumber: 'FR12345678901',
siret: '12345678900012',
address: '16 rue Gustave Courbet',
address2: 'Apt 4B',
city: 'Paris',
state: 'Île-de-France',
zip: '75000',
country: 'France',
phone: '+33 6 12 34 56 78'
})
};
fetch('https://api.example.com/v1/auth/me/billing', 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://api.example.com/v1/auth/me/billing",
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([
'companyName' => 'Acme Corp',
'vatNumber' => 'FR12345678901',
'siret' => '12345678900012',
'address' => '16 rue Gustave Courbet',
'address2' => 'Apt 4B',
'city' => 'Paris',
'state' => 'Île-de-France',
'zip' => '75000',
'country' => 'France',
'phone' => '+33 6 12 34 56 78'
]),
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.example.com/v1/auth/me/billing"
payload := strings.NewReader("{\n \"companyName\": \"Acme Corp\",\n \"vatNumber\": \"FR12345678901\",\n \"siret\": \"12345678900012\",\n \"address\": \"16 rue Gustave Courbet\",\n \"address2\": \"Apt 4B\",\n \"city\": \"Paris\",\n \"state\": \"Île-de-France\",\n \"zip\": \"75000\",\n \"country\": \"France\",\n \"phone\": \"+33 6 12 34 56 78\"\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))
}HttpResponse<String> response = Unirest.patch("https://api.example.com/v1/auth/me/billing")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"companyName\": \"Acme Corp\",\n \"vatNumber\": \"FR12345678901\",\n \"siret\": \"12345678900012\",\n \"address\": \"16 rue Gustave Courbet\",\n \"address2\": \"Apt 4B\",\n \"city\": \"Paris\",\n \"state\": \"Île-de-France\",\n \"zip\": \"75000\",\n \"country\": \"France\",\n \"phone\": \"+33 6 12 34 56 78\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/auth/me/billing")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyName\": \"Acme Corp\",\n \"vatNumber\": \"FR12345678901\",\n \"siret\": \"12345678900012\",\n \"address\": \"16 rue Gustave Courbet\",\n \"address2\": \"Apt 4B\",\n \"city\": \"Paris\",\n \"state\": \"Île-de-France\",\n \"zip\": \"75000\",\n \"country\": \"France\",\n \"phone\": \"+33 6 12 34 56 78\"\n}"
response = http.request(request)
puts response.read_bodyAutorisations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Corps
application/json
Maximum string length:
160Exemple:
"Acme Corp"
Maximum string length:
40Exemple:
"FR12345678901"
Maximum string length:
20Exemple:
"12345678900012"
Maximum string length:
200Exemple:
"16 rue Gustave Courbet"
Maximum string length:
200Exemple:
"Apt 4B"
Maximum string length:
120Exemple:
"Paris"
Maximum string length:
120Exemple:
"Île-de-France"
Maximum string length:
20Exemple:
"75000"
Maximum string length:
80Exemple:
"France"
Maximum string length:
40Exemple:
"+33 6 12 34 56 78"
Réponse
200 - undefined
Sujets connexes
Mettre à jour un montage (admin)Mettre à jour mes préférences de notificationMettre à jour une connexion de panelMettre à jour un taux de TVA (admin)Mettre à jour le profil de l’utilisateur authentifié