Download AADL Notice
curl --request GET \
--url https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis', 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.oneclickdz.com/v3/bills/transactions/{transactionId}/avis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyBill Payment
Download AADL Notice
The AADL avis de paiement of a transaction, as a PDF
GET
/
v3
/
bills
/
transactions
/
{transactionId}
/
avis
Download AADL Notice
curl --request GET \
--url https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis \
--header 'X-Access-Token: <api-key>'import requests
url = "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis"
headers = {"X-Access-Token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Access-Token': '<api-key>'}};
fetch('https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis', 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.oneclickdz.com/v3/bills/transactions/{transactionId}/avis",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Access-Token: <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"
"net/http"
"io"
)
func main() {
url := "https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Access-Token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis")
.header("X-Access-Token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.oneclickdz.com/v3/bills/transactions/{transactionId}/avis")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Access-Token"] = '<api-key>'
response = http.request(request)
puts response.read_bodyReturns the avis de paiement issued by AADL for the housing file of an
AADL transaction. It is available as soon as the discovery is READY, before and after payment, so you can show the customer the official notice before they pay.
The success response is the PDF file; errors are the JSON envelope. Not available in the sandbox.
Path parameters
string
required
An
AADL transaction whose status is READY or later.Response
| Header | Value |
|---|---|
Content-Type | application/pdf |
Content-Disposition | attachment; filename="avis_{transactionId}.pdf" |
Cache-Control | private, no-store |
Example
curl https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9/avis \
-H "X-Access-Token: YOUR_API_KEY" \
--output avis.pdf
import { writeFile } from "node:fs/promises";
const response = await fetch(
"https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9/avis",
{ headers: { "X-Access-Token": process.env.ONECLICKDZ_API_KEY } },
);
if (!response.ok) {
const body = await response.json();
throw new Error(body.error.code);
}
await writeFile("avis.pdf", Buffer.from(await response.arrayBuffer()));
import os, requests
response = requests.get(
"https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9/avis",
headers={"X-Access-Token": os.environ["ONECLICKDZ_API_KEY"]},
)
if not response.ok:
raise RuntimeError(response.json()["error"]["code"])
with open("avis.pdf", "wb") as f:
f.write(response.content)
<?php
$ch = curl_init("https://api.oneclickdz.com/v3/bills/transactions/68cdf0a2b7c1e4d5f6a7b8c9/avis");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["X-Access-Token: " . getenv("ONECLICKDZ_API_KEY")],
]);
$data = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($status !== 200) {
throw new Exception(json_decode($data, true)["error"]["code"]);
}
file_put_contents("avis.pdf", $data);
?>
Errors
| HTTP | Code | Meaning |
|---|---|---|
| 401 | MISSING_ACCESS_TOKEN / INVALID_ACCESS_TOKEN | Missing or rejected key |
| 404 | NOT_FOUND | Unknown transaction, not yours, not an AADL transaction, or the notice is not available yet |
| 503 | AUTH_UNAVAILABLE | The key could not be verified in time; retry after Retry-After |

