Factures
Détails d'une facture
Récupérez le détail d’une commande/facture via son UUID.
Détails d'une facture
curl --request GET \
--url https://kennhosting.com/api/v1/invoices/{order_uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://kennhosting.com/api/v1/invoices/{order_uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://kennhosting.com/api/v1/invoices/{order_uuid}', 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://kennhosting.com/api/v1/invoices/{order_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://kennhosting.com/api/v1/invoices/{order_uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://kennhosting.com/api/v1/invoices/{order_uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://kennhosting.com/api/v1/invoices/{order_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_bodyRequête
GET /v1/invoices/{order_uuid}
Authorization: Bearer kh_live_xxxx
Paramètres de chemin
| Paramètre | Type | Requis | Description |
|---|---|---|---|
order_uuid | UUID | Oui | UUID de la commande |
Réponse
{
"success": true,
"data": {
"id": 14,
"uuid": "192b4bd5-76b7-44aa-b323-2801115adaf5",
"user_id": 2,
"order_number": "KH-AWROJCRIZE",
"status": "payment_required",
"checkout_mode": "auto",
"order_type": "standalone_domain",
"billing_period": "annual",
"total_amount": "3705.00",
"discount_amount": "0.00",
"original_amount": "3705.00",
"items": [],
"service": null,
"payments": [],
"created_at": "2026-04-11T11:41:02.000000Z",
"updated_at": "2026-04-11T11:41:02.000000Z"
}
}
Order avec les relations items.plan, service et payments.
Permissions requises
invoices:read⌘I
Détails d'une facture
curl --request GET \
--url https://kennhosting.com/api/v1/invoices/{order_uuid} \
--header 'Authorization: Bearer <token>'import requests
url = "https://kennhosting.com/api/v1/invoices/{order_uuid}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://kennhosting.com/api/v1/invoices/{order_uuid}', 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://kennhosting.com/api/v1/invoices/{order_uuid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://kennhosting.com/api/v1/invoices/{order_uuid}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://kennhosting.com/api/v1/invoices/{order_uuid}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://kennhosting.com/api/v1/invoices/{order_uuid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body