Aller au contenu principal
QualiForma
CatalogueDevenir formateurQualiopiIADéveloppeurs
Connexion
  • Catalogue
  • Devenir formateur
  • Qualiopi
  • IA
  • Développeurs
  • Connexion
  • Vue d'ensemble

Démarrage

  • Quickstart
  • Authentification

Référence

  • API Reference (Scalar)

Endpoints

  • Tous les endpoints

Cœur LMS

  • Tenants
  • Utilisateurs
  • Formations
  • Inscriptions
  • Sessions live

Conformité Qualiopi

  • Dashboard Qualiopi
  • Conformité
  • Émargement
  • Questionnaires
  • Réclamations
  • Plans d'amélioration
  • Parcours adaptatifs
  • Compétences formateurs
  • BPF
  • Médiateurs

Paiements & Facturation

  • Paiements
  • Facturation Factur-X
  • Webhooks

Design System

  • Vue d'ensemble
  • Couleurs
  • Typographie
  • Espacement
  • Elevation
  • Motion
  • Radius
  • Composants
  • · Formulaires
  • · Feedback
  • · Navigation
  • · Progression
  • · Données
Swagger UI (s'ouvre dans un nouvel onglet)
  1. Développeurs
  2. Endpoints
  3. Billing

Billing — Facturation Factur-X & eIDAS

Facturation conforme Factur-X (PDF/A-3 + XML EN16931), signature électronique qualifiée eIDAS QES via Scell.io, gestion des avoirs et TVA EU (OSS).

Conformité

  • Factur-X : chaque facture émise est un PDF/A-3 contenant un XML structuré EN16931 (profil BASIC, EN16931 ou EXTENDED) embarqué — lisible humain et machine. Réglementation française e-invoicing 2026-2027.
  • eIDAS QES : signature électronique qualifiée appliquée à l’émission via Scell.io. Niveau de preuve maximal opposable en cas de litige.
  • TVA EU : support OSS (One Stop Shop) pour facturation intra-UE, taux multiples par ligne, mentions automatiques (exonération, autoliquidation).

Endpoints détaillés

get/api/v1/billing/invoices

Lister les factures

Liste paginée des factures du tenant. Filtrable par statut, intervalle de dates et client.

  • Billing

Paramètres

NomTypeRequisExempleDescription
pagequerynon1Numéro de page (défaut : 1)
perPagequerynon20Éléments par page (max 100)
statusquerynonISSUEDDRAFT | ISSUED | PAID | CANCELLED | OVERDUE
fromDatequerynon2026-01-01Date d’émission ≥ (ISO 8601)
toDatequerynon2026-12-31Date d’émission ≤ (ISO 8601)
clientIdquerynoncli_abc123Filtrer par client

Réponses

  • 200Liste paginée
    Réponse 200 · JSON
    {
      "data": [
        {
          "id": "inv_abc123",
          "number": "FA-2026-0042",
          "status": "ISSUED",
          "clientId": "cli_abc123",
          "totalCents": 59880,
          "vatCents": 9980,
          "currency": "EUR",
          "issuedAt": "2026-05-15T09:00:00Z",
          "dueAt": "2026-06-14T00:00:00Z"
        }
      ],
      "meta": {
        "page": 1,
        "perPage": 20,
        "total": 142
      }
    }
  • 401Non authentifié
  • 403Rôle insuffisant (ADMIN ou FINANCIER)

Exemples

GET /api/v1/billing/invoices · cURL / Shell
curl -X GET https://api.qualiforma.site/api/v1/billing/invoices?page=1&perPage=20&status=ISSUED&fromDate=2026-01-01&toDate=2026-12-31&clientId=cli_abc123 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo"
GET /api/v1/billing/invoices · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/invoices?page=1&perPage=20&status=ISSUED&fromDate=2026-01-01&toDate=2026-12-31&clientId=cli_abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
  },
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
GET /api/v1/billing/invoices · Python
import requests

response = requests.get(
    'https://api.qualiforma.site/api/v1/billing/invoices?page=1&perPage=20&status=ISSUED&fromDate=2026-01-01&toDate=2026-12-31&clientId=cli_abc123',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
GET /api/v1/billing/invoices · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->get('billing/invoices?page=1&perPage=20&status=ISSUED&fromDate=2026-01-01&toDate=2026-12-31&clientId=cli_abc123', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
get/api/v1/billing/invoices/:id

Détail d’une facture

Retourne tous les champs (lignes, taxes, mentions Factur-X, statut de signature eIDAS).

  • Billing

Paramètres

NomTypeRequisExempleDescription
idpathouiinv_abc123Identifiant de la facture

Réponses

  • 200OK
    Réponse 200 · JSON
    {
      "data": {
        "id": "inv_abc123",
        "number": "FA-2026-0042",
        "status": "ISSUED",
        "factorX": {
          "profile": "EN16931",
          "xmlAttached": true,
          "pdfA3": true
        },
        "eidas": {
          "signed": true,
          "provider": "scell.io",
          "signatureLevel": "QES"
        },
        "items": [
          {
            "description": "Formation Excel Avancé",
            "quantity": 1,
            "unitPriceCents": 49900,
            "vatRate": 20
          }
        ],
        "totalCents": 59880
      }
    }
  • 404Facture introuvable

Exemples

GET /api/v1/billing/invoices/:id · cURL / Shell
curl -X GET https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo"
GET /api/v1/billing/invoices/:id · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
  },
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
GET /api/v1/billing/invoices/:id · Python
import requests

response = requests.get(
    'https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
GET /api/v1/billing/invoices/:id · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->get('billing/invoices/inv_abc123', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
post/api/v1/billing/invoices

Créer une facture (manuelle)

Crée une facture au statut DRAFT. Les montants sont en centimes. La numérotation officielle est attribuée à l’émission (POST /:id/issue).

  • Billing

Corps de requête

Content-Type : application/json

Body · JSON
{
  "clientId": "cli_abc123",
  "items": [
    {
      "description": "Formation Excel Avancé",
      "quantity": 1,
      "unitPriceCents": 49900,
      "vatRate": 20
    }
  ],
  "dueDate": "2026-06-14",
  "currency": "EUR",
  "paymentTerms": "30 jours nets"
}

Réponses

  • 201Facture créée (DRAFT)
    Réponse 201 · JSON
    {
      "data": {
        "id": "inv_xyz789",
        "status": "DRAFT",
        "number": null,
        "totalCents": 59880
      }
    }
  • 422Validation échouée (montants, TVA, client inexistant)

Exemples

POST /api/v1/billing/invoices · cURL / Shell
curl -X POST https://api.qualiforma.site/api/v1/billing/invoices \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo" \
  -H "Content-Type: application/json" \
  -d '{
  "clientId": "cli_abc123",
  "items": [
    {
      "description": "Formation Excel Avancé",
      "quantity": 1,
      "unitPriceCents": 49900,
      "vatRate": 20
    }
  ],
  "dueDate": "2026-06-14",
  "currency": "EUR",
  "paymentTerms": "30 jours nets"
}'
POST /api/v1/billing/invoices · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/invoices', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "clientId": "cli_abc123",
    "items": [
      {
        "description": "Formation Excel Avancé",
        "quantity": 1,
        "unitPriceCents": 49900,
        "vatRate": 20
      }
    ],
    "dueDate": "2026-06-14",
    "currency": "EUR",
    "paymentTerms": "30 jours nets"
  }),
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
POST /api/v1/billing/invoices · Python
import requests

response = requests.post(
    'https://api.qualiforma.site/api/v1/billing/invoices',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
        'Content-Type': 'application/json',
    },
    json={
        'clientId': 'cli_abc123',
        'items': [
            {
                'description': 'Formation Excel Avancé',
                'quantity': 1,
                'unitPriceCents': 49900,
                'vatRate': 20,
            },
        ],
        'dueDate': '2026-06-14',
        'currency': 'EUR',
        'paymentTerms': '30 jours nets',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
POST /api/v1/billing/invoices · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->post('billing/invoices', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
        'json' => [
            'clientId' => 'cli_abc123',
            'items' => [
                [
                    'description' => 'Formation Excel Avancé',
                    'quantity' => 1,
                    'unitPriceCents' => 49900,
                    'vatRate' => 20,
                ],
            ],
            'dueDate' => '2026-06-14',
            'currency' => 'EUR',
            'paymentTerms' => '30 jours nets',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
post/api/v1/billing/invoices/:id/issue

Émettre une facture (DRAFT → ISSUED)

Génère un PDF Factur-X (PDF/A-3 avec XML EN16931 embarqué), applique la signature eIDAS QES via Scell.io et attribue le numéro de séquence officiel. Action irréversible.

  • Billing
  • Factur-X
  • eIDAS

Paramètres

NomTypeRequisExempleDescription
idpathouiinv_abc123—

Réponses

  • 200Facture émise et signée
    Réponse 200 · JSON
    {
      "data": {
        "id": "inv_abc123",
        "status": "ISSUED",
        "number": "FA-2026-0042",
        "issuedAt": "2026-05-15T09:00:00Z",
        "factorX": {
          "profile": "EN16931",
          "xmlAttached": true,
          "pdfA3": true
        },
        "eidas": {
          "signed": true,
          "signatureLevel": "QES",
          "signatureId": "sig_..."
        }
      }
    }
  • 409Facture déjà émise ou annulée

Exemples

POST /api/v1/billing/invoices/:id/issue · cURL / Shell
curl -X POST https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/issue \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo"
POST /api/v1/billing/invoices/:id/issue · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/issue', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
  },
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
POST /api/v1/billing/invoices/:id/issue · Python
import requests

response = requests.post(
    'https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/issue',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
POST /api/v1/billing/invoices/:id/issue · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->post('billing/invoices/inv_abc123/issue', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
post/api/v1/billing/invoices/:id/cancel

Annuler une facture

Annule une facture émise. Recommandé : émettre un avoir (credit note) plutôt qu’annuler. Cancellation traçable dans l’audit log.

  • Billing

Paramètres

NomTypeRequisExempleDescription
idpathouiinv_abc123—

Corps de requête

Content-Type : application/json

Body · JSON
{
  "reason": "Erreur de saisie"
}

Réponses

  • 200Facture annulée
    Réponse 200 · JSON
    {
      "data": {
        "id": "inv_abc123",
        "status": "CANCELLED"
      }
    }
  • 409Facture déjà payée (avoir requis)

Exemples

POST /api/v1/billing/invoices/:id/cancel · cURL / Shell
curl -X POST https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/cancel \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo" \
  -H "Content-Type: application/json" \
  -d '{
  "reason": "Erreur de saisie"
}'
POST /api/v1/billing/invoices/:id/cancel · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/cancel', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "reason": "Erreur de saisie"
  }),
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
POST /api/v1/billing/invoices/:id/cancel · Python
import requests

response = requests.post(
    'https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/cancel',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
        'Content-Type': 'application/json',
    },
    json={
        'reason': 'Erreur de saisie',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
POST /api/v1/billing/invoices/:id/cancel · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->post('billing/invoices/inv_abc123/cancel', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
        'json' => [
            'reason' => 'Erreur de saisie',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
get/api/v1/billing/invoices/:id/pdf

Télécharger le PDF Factur-X

Retourne le PDF/A-3 contenant le XML structuré EN16931 (profil Factur-X) signé eIDAS. Content-Type : application/pdf.

  • Billing
  • Factur-X

Paramètres

NomTypeRequisExempleDescription
idpathouiinv_abc123—

Réponses

  • 200Binary PDF/A-3 (Factur-X)
  • 404Facture non émise (DRAFT sans PDF)

Exemples

GET /api/v1/billing/invoices/:id/pdf · cURL / Shell
curl -X GET https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/pdf \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo"
GET /api/v1/billing/invoices/:id/pdf · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/pdf', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
  },
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
GET /api/v1/billing/invoices/:id/pdf · Python
import requests

response = requests.get(
    'https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/pdf',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
GET /api/v1/billing/invoices/:id/pdf · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->get('billing/invoices/inv_abc123/pdf', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
post/api/v1/billing/invoices/:id/send

Envoyer la facture par email

Envoie la facture (PDF Factur-X en pièce jointe) à l’adresse email du client. Trace l’envoi dans l’historique.

  • Billing

Paramètres

NomTypeRequisExempleDescription
idpathouiinv_abc123—

Corps de requête

Content-Type : application/json

Body · JSON
{
  "to": "client@example.com",
  "cc": [
    "compta@example.com"
  ],
  "message": "Bonjour, veuillez trouver ci-joint votre facture. Cordialement."
}

Réponses

  • 200Email envoyé
    Réponse 200 · JSON
    {
      "data": {
        "sentAt": "2026-05-15T10:00:00Z"
      }
    }
  • 422Email destinataire invalide

Exemples

POST /api/v1/billing/invoices/:id/send · cURL / Shell
curl -X POST https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/send \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo" \
  -H "Content-Type: application/json" \
  -d '{
  "to": "client@example.com",
  "cc": [
    "compta@example.com"
  ],
  "message": "Bonjour, veuillez trouver ci-joint votre facture. Cordialement."
}'
POST /api/v1/billing/invoices/:id/send · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/send', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "to": "client@example.com",
    "cc": [
      "compta@example.com"
    ],
    "message": "Bonjour, veuillez trouver ci-joint votre facture. Cordialement."
  }),
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
POST /api/v1/billing/invoices/:id/send · Python
import requests

response = requests.post(
    'https://api.qualiforma.site/api/v1/billing/invoices/inv_abc123/send',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
        'Content-Type': 'application/json',
    },
    json={
        'to': 'client@example.com',
        'cc': [
            'compta@example.com',
        ],
        'message': 'Bonjour, veuillez trouver ci-joint votre facture. Cordialement.',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
POST /api/v1/billing/invoices/:id/send · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->post('billing/invoices/inv_abc123/send', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
        'json' => [
            'to' => 'client@example.com',
            'cc' => [
                'compta@example.com',
            ],
            'message' => 'Bonjour, veuillez trouver ci-joint votre facture. Cordialement.',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
get/api/v1/billing/credit-notes

Lister les avoirs

Liste paginée des avoirs (credit notes) du tenant, liés à leur facture d’origine.

  • Billing

Paramètres

NomTypeRequisExempleDescription
pagequerynon1—
perPagequerynon20—
invoiceIdquerynoninv_abc123Filtrer par facture d’origine

Réponses

  • 200Liste paginée
    Réponse 200 · JSON
    {
      "data": [
        {
          "id": "cn_xyz789",
          "number": "AV-2026-0007",
          "invoiceId": "inv_abc123",
          "totalCents": -59880,
          "issuedAt": "2026-05-20T10:00:00Z"
        }
      ],
      "meta": {
        "page": 1,
        "perPage": 20,
        "total": 7
      }
    }

Exemples

GET /api/v1/billing/credit-notes · cURL / Shell
curl -X GET https://api.qualiforma.site/api/v1/billing/credit-notes?page=1&perPage=20&invoiceId=inv_abc123 \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo"
GET /api/v1/billing/credit-notes · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/credit-notes?page=1&perPage=20&invoiceId=inv_abc123', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
  },
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
GET /api/v1/billing/credit-notes · Python
import requests

response = requests.get(
    'https://api.qualiforma.site/api/v1/billing/credit-notes?page=1&perPage=20&invoiceId=inv_abc123',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
GET /api/v1/billing/credit-notes · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->get('billing/credit-notes?page=1&perPage=20&invoiceId=inv_abc123', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
post/api/v1/billing/credit-notes

Créer un avoir

Génère un avoir partiel ou total lié à une facture émise. Émission immédiate avec PDF Factur-X (profil CREDIT_NOTE) et signature eIDAS.

  • Billing

Corps de requête

Content-Type : application/json

Body · JSON
{
  "invoiceId": "inv_abc123",
  "reason": "Remise commerciale exceptionnelle",
  "items": [
    {
      "description": "Remise Formation Excel",
      "quantity": 1,
      "unitPriceCents": -10000,
      "vatRate": 20
    }
  ]
}

Réponses

  • 201Avoir créé et émis
    Réponse 201 · JSON
    {
      "data": {
        "id": "cn_xyz789",
        "number": "AV-2026-0007",
        "invoiceId": "inv_abc123",
        "totalCents": -12000
      }
    }
  • 422Facture d’origine non émise ou montant invalide

Exemples

POST /api/v1/billing/credit-notes · cURL / Shell
curl -X POST https://api.qualiforma.site/api/v1/billing/credit-notes \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "X-Tenant-ID: qualiforma-demo" \
  -H "Content-Type: application/json" \
  -d '{
  "invoiceId": "inv_abc123",
  "reason": "Remise commerciale exceptionnelle",
  "items": [
    {
      "description": "Remise Formation Excel",
      "quantity": 1,
      "unitPriceCents": -10000,
      "vatRate": 20
    }
  ]
}'
POST /api/v1/billing/credit-notes · JavaScript
const response = await fetch('https://api.qualiforma.site/api/v1/billing/credit-notes', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
    'X-Tenant-ID': 'qualiforma-demo',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "invoiceId": "inv_abc123",
    "reason": "Remise commerciale exceptionnelle",
    "items": [
      {
        "description": "Remise Formation Excel",
        "quantity": 1,
        "unitPriceCents": -10000,
        "vatRate": 20
      }
    ]
  }),
});

if (!response.ok) {
  throw new Error(`HTTP ${response.status}: ${await response.text()}`);
}

const data = await response.json();
console.log(data);
POST /api/v1/billing/credit-notes · Python
import requests

response = requests.post(
    'https://api.qualiforma.site/api/v1/billing/credit-notes',
    headers={
        'Authorization': 'Bearer YOUR_ACCESS_TOKEN',
        'X-Tenant-ID': 'qualiforma-demo',
        'Content-Type': 'application/json',
    },
    json={
        'invoiceId': 'inv_abc123',
        'reason': 'Remise commerciale exceptionnelle',
        'items': [
            {
                'description': 'Remise Formation Excel',
                'quantity': 1,
                'unitPriceCents': -10000,
                'vatRate': 20,
            },
        ],
    },
    timeout=30,
)
response.raise_for_status()
data = response.json()
print(data)
POST /api/v1/billing/credit-notes · PHP
<?php

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;

$client = new Client(['base_uri' => 'https://api.qualiforma.site/api/v1/']);

try {
    $response = $client->post('billing/credit-notes', [
        'headers' => [
            'Authorization' => 'Bearer YOUR_ACCESS_TOKEN',
            'X-Tenant-ID' => 'qualiforma-demo',
        ],
        'json' => [
            'invoiceId' => 'inv_abc123',
            'reason' => 'Remise commerciale exceptionnelle',
            'items' => [
                [
                    'description' => 'Remise Formation Excel',
                    'quantity' => 1,
                    'unitPriceCents' => -10000,
                    'vatRate' => 20,
                ],
            ],
        ],
    ]);
    $data = json_decode($response->getBody()->getContents(), true);
    var_dump($data);
} catch (GuzzleException $e) {
    fwrite(STDERR, $e->getMessage());
}
QualiForma

La plateforme de formation professionnelle certifiee Qualiopi.

Plateforme

  • Catalogue
  • Espace formateur
  • Étude de besoin

Societe

  • A propos
  • Contact

Ressources

  • Développeurs
  • Référence API
  • Webhooks

Legal

  • CGV
  • Mentions legales
  • Confidentialite

Catalogue par catégorie

  • Management
  • Digital
  • Communication
  • Langues
  • Sécurité
  • Gestion

Comparatifs

  • QualiForma vs Didask
  • QualiForma vs Edusign
  • QualiForma vs Klaxoon
  • QualiForma vs 360Learning

Glossaire Qualiopi

  • I01 — Conditions d'information
  • I05 — Adaptation des prestations
  • I11 — Évaluations en cours
  • I22 — Compétences des intervenants
  • I30 — Recueil des appréciations
  • Voir les 32 indicateurs →

© 2026 QualiForma. Tous droits reserves.

Certifie Qualiopi