Skip to content

Reference API Scell.io

Version : 1.0 Derniere mise a jour : 2026-03-03 Base URL : https://api.scell.io/api/v1Note : Le mode sandbox est determine par le prefixe de la cle API (sk_test_ = sandbox, sk_live_ = production), non par l'URL.


Table des matieres


Introduction

Scell.io est une plateforme B2B de facturation electronique (Factur-X/UBL/CII) et de signature electronique simple (eIDAS EU-SES) via API.

Toutes les requetes utilisent le format JSON. Toutes les reponses sont en JSON avec le header Content-Type: application/json.

URLs de base

EnvironnementURL
Production & Sandboxhttps://api.scell.io/api/v1

Distinction sandbox/production : Le mode est determine par le prefixe de la cle API dans le header X-Tenant-Key :

  • Prefixe sk_test_ : Sandbox (transactions de test)
  • Prefixe sk_live_ : Production (transactions reelles)

Tarification

OperationPrix unitaire
Facture electronique0.04 EUR
Signature electronique1.20 EUR
Avoir (credit note)0.04 EUR

Authentification

L'API supporte 4 modes d'authentification selon le contexte d'utilisation.

1. Bearer Token (Dashboard)

Utilise par le frontend / dashboard web. Obtenu via POST /v1/auth/login.

Authorization: Bearer <TOKEN>

2. API Key (API externe)

Utilise pour l'integration programmatique. Cle generee via le dashboard.

X-API-Key: sk_live_x8z...

Prefixes :

  • sk_live_ : Production
  • sk_test_ : Sandbox

3. Tenant Key (Multi-Tenant)

Utilise par les partenaires integrant la facturation pour leurs clients. Cle secrete a conserver côte serveur.

X-Tenant-Key: sk_live_xxxxxx

Prefixes :

  • sk_test_ : Secret Key (Sandbox) - API backend, jamais expose côte client
  • sk_live_ : Secret Key (Production) - API backend, jamais expose côte client

4. Publishable Key (Onboarding)

Utilise pour l'onboarding B2B des partenaires. Cle publiable pouvant etre expose côte client dans les widgets.

X-Publishable-Key: pk_test_xxxxxx

Prefixes :

  • pk_test_ : Publishable Key (Sandbox) - Widgets client, peut etre expose
  • pk_live_ : Publishable Key (Production) - Widgets client, peut etre expose

Pagination et filtrage

Les endpoints retournant des listes sont pagines.

Parametres de pagination

ParametreTypeDefautDescription
pageinteger1Numero de page
per_pageinteger25Elements par page (max 100)

Format de reponse paginee

json
{
  "data": [],
  "meta": {
    "current_page": 1,
    "last_page": 10,
    "per_page": 25,
    "total": 250
  }
}

Filtres communs

ParametreTypeDescription
statusstringFiltrer par statut
from / date_fromdateDate de debut (YYYY-MM-DD)
to / date_todateDate de fin (YYYY-MM-DD)
environmentstringsandbox ou production
company_iduuidFiltrer par entreprise

Codes d'erreur

Format d'erreur standard

json
{
  "message": "Description lisible de l'erreur",
  "errors": {
    "champ": ["Message de validation"]
  },
  "error_code": "CODE_METIER"
}

Codes HTTP

CodeSignification
200Succes
201Ressource creee
400Requete invalide
401Non authentifie
403Acces interdit
404Ressource introuvable
422Erreur de validation
429Rate limit depasse
500Erreur serveur

Codes metier

CodeSignification
INSUFFICIENT_BALANCESolde insuffisant pour l'operation
INVOICE_IMMUTABLEFacture non modifiable (champs fiscaux verrouilles)
FISCAL_KILLSWITCH_ACTIVEKill-switch fiscal actif, operations bloquees
SIGNATURE_EXPIREDDemande de signature expiree
ALREADY_COMPLETEDSignature deja terminee
CANNOT_REMINDRappel impossible pour cette signature
NO_PENDING_SIGNERSAucun signataire en attente
FILE_NOT_FOUNDFichier non disponible

Rate limiting

ContexteLimite
Production (API Key)60 requetes/minute
Sandbox (API Key)1000 requetes/minute
Tenant API120 requetes/minute
Onboarding30 requetes/minute
Onboarding exchange5 requetes/minute
MCP100 requetes/minute

Headers de reponse :

  • X-RateLimit-Limit : Limite totale
  • X-RateLimit-Remaining : Requetes restantes
  • X-RateLimit-Reset : Timestamp de reinitialisation

1. Auth

POST /v1/auth/register

Inscription d'un nouvel utilisateur. Cree un compte et retourne un token d'acces.

Authentification : Aucune

Corps de la requete :

ChampTypeRequisDescription
emailstring (email)ouiAdresse email
passwordstringouiMot de passe
first_namestringouiPrenom
last_namestringouiNom
phonestringouiTelephone (+33...)

Reponse (201) :

json
{
  "message": "Inscription reussie",
  "user": {
    "id": "uuid",
    "email": "user@example.com",
    "first_name": "Jean",
    "last_name": "Dupont",
    "phone": "+33612345678",
    "role": "user",
    "created_at": "2026-01-15T10:30:00Z"
  },
  "token": "1|AbCdEf123456..."
}

Exemples :

bash
# curl
curl -X POST https://api.scell.io/api/v1/auth/register \
  -H "Content-Type: application/json" \
  -d '{
    "email": "user@example.com",
    "password": "secret123",
    "first_name": "Jean",
    "last_name": "Dupont",
    "phone": "+33612345678"
  }'
javascript
// JavaScript
const response = await fetch('https://api.scell.io/api/v1/auth/register', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    email: 'user@example.com',
    password: 'secret123',
    first_name: 'Jean',
    last_name: 'Dupont',
    phone: '+33612345678'
  })
});
const data = await response.json();
php
// PHP
$client = new \GuzzleHttp\Client();
$response = $client->post('https://api.scell.io/api/v1/auth/register', [
    'json' => [
        'email' => 'user@example.com',
        'password' => 'secret123',
        'first_name' => 'Jean',
        'last_name' => 'Dupont',
        'phone' => '+33612345678'
    ]
]);
python
# Python
import requests

response = requests.post("https://api.scell.io/api/v1/auth/register", json={
    "email": "user@example.com",
    "password": "secret123",
    "first_name": "Jean",
    "last_name": "Dupont",
    "phone": "+33612345678"
})
print(response.json())

Erreurs : 422 (validation : email deja pris, mot de passe trop court)


POST /v1/auth/login

Authentifie un utilisateur et retourne un token d'acces.

Authentification : Aucune

Corps de la requete :

ChampTypeRequisDescription
emailstring (email)ouiAdresse email
passwordstringouiMot de passe

Reponse (200) :

json
{
  "message": "Connexion reussie",
  "user": {
    "id": "uuid",
    "email": "user@example.com",
    "first_name": "Jean",
    "last_name": "Dupont",
    "role": "user"
  },
  "token": "1|AbCdEf123456..."
}
bash
curl -X POST https://api.scell.io/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com", "password": "secret123"}'

Erreurs : 422 (identifiants incorrects, compte desactive)


GET /v1/auth/google

Retourne l'URL de redirection pour l'authentification Google OAuth.

Authentification : Aucune

Reponse (200) :

json
{
  "url": "https://accounts.google.com/o/oauth2/auth?client_id=..."
}
bash
curl -X GET https://api.scell.io/api/v1/auth/google

GET /v1/auth/google/callback

Gere le retour de Google OAuth. Cree ou connecte l'utilisateur et retourne un token.

Authentification : Aucune (callback Google)

Reponse (200) :

json
{
  "message": "Connexion reussie via Google",
  "user": { "id": "uuid", "email": "...", "first_name": "...", "last_name": "..." },
  "token": "1|..."
}

Erreurs : 401 (echec authentification Google)


POST /v1/auth/forgot-password

Envoie un email de reinitialisation de mot de passe.

Authentification : Aucune

Corps :

ChampTypeRequisDescription
emailstring (email)ouiAdresse email du compte
bash
curl -X POST https://api.scell.io/api/v1/auth/forgot-password \
  -H "Content-Type: application/json" \
  -d '{"email": "user@example.com"}'

POST /v1/auth/reset-password

Reinitialise le mot de passe avec le token recu par email.

Authentification : Aucune

Corps :

ChampTypeRequisDescription
tokenstringouiToken de reinitialisation
emailstring (email)ouiAdresse email
passwordstringouiNouveau mot de passe
password_confirmationstringouiConfirmation
bash
curl -X POST https://api.scell.io/api/v1/auth/reset-password \
  -H "Content-Type: application/json" \
  -d '{
    "token": "abc123...",
    "email": "user@example.com",
    "password": "newpassword",
    "password_confirmation": "newpassword"
  }'

POST /v1/auth/logout

Deconnexion : revoque le token actuel.

Authentification : Bearer Token

bash
curl -X POST https://api.scell.io/api/v1/auth/logout \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "message": "Deconnexion reussie"
}

GET /v1/auth/me

Retourne le profil de l'utilisateur authentifie.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/auth/me \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "data": {
    "id": "uuid",
    "email": "user@example.com",
    "first_name": "Jean",
    "last_name": "Dupont",
    "phone": "+33612345678",
    "role": "user",
    "is_active": true,
    "avatar_url": null,
    "last_login_at": "2026-01-15T10:30:00Z",
    "created_at": "2026-01-10T08:00:00Z"
  }
}

2. Companies

GET /v1/companies

Liste les entreprises de l'utilisateur connecte.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/companies \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "data": [
    {
      "id": "uuid",
      "name": "Ma Societe",
      "siret": "12345678901234",
      "vat_number": "FR12345678901",
      "legal_form": "SAS",
      "address_line1": "1 Rue de la Paix",
      "postal_code": "75001",
      "city": "Paris",
      "country": "FR",
      "status": "active",
      "kyc_completed_at": null,
      "created_at": "2026-01-10T08:00:00Z"
    }
  ]
}

POST /v1/companies

Cree une nouvelle entreprise.

Authentification : Bearer Token

Corps de la requete :

ChampTypeRequisDescription
namestringouiRaison sociale
siretstring (14 car.)ouiNumero SIRET (unique)
vat_numberstringnonNumero TVA intracommunautaire
legal_formstringnonForme juridique (SAS, SARL...)
address_line1stringouiAdresse ligne 1
address_line2stringnonAdresse ligne 2
postal_codestringouiCode postal
citystringouiVille
countrystring (2 car.)nonCode pays ISO (defaut: FR)
phonestringnonTelephone
emailstring (email)nonEmail de contact
websitestring (url)nonSite web
bash
curl -X POST https://api.scell.io/api/v1/companies \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Ma Societe",
    "siret": "12345678901234",
    "address_line1": "1 Rue de la Paix",
    "postal_code": "75001",
    "city": "Paris",
    "country": "FR"
  }'

Reponse (201) :

json
{
  "message": "Entreprise creee avec succes",
  "data": { "id": "uuid", "name": "Ma Societe", "siret": "12345678901234", "..." : "..." }
}

Erreurs : 422 (SIRET invalide, SIRET deja enregistre)


GET /v1/companies/{id}

Recupere les details d'une entreprise.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/companies/{id} \
  -H "Authorization: Bearer <TOKEN>"

PUT /v1/companies/{id}

Met a jour une entreprise.

Authentification : Bearer Token

Corps : Memes champs que la creation (tous optionnels).

bash
curl -X PUT https://api.scell.io/api/v1/companies/{id} \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"phone": "+33612345678", "email": "contact@masociete.fr"}'

DELETE /v1/companies/{id}

Supprime une entreprise.

Authentification : Bearer Token

bash
curl -X DELETE https://api.scell.io/api/v1/companies/{id} \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "message": "Entreprise supprimee"
}

POST /v1/companies/{id}/kyc

Lance la procedure KYC pour une entreprise.

Authentification : Bearer Token

bash
curl -X POST https://api.scell.io/api/v1/companies/{id}/kyc \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/companies/{id}/kyc/status

Retourne le statut KYC d'une entreprise.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/companies/{id}/kyc/status \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "data": {
    "status": "pending",
    "completed_at": null,
    "reference": null
  }
}

3. Invoices

POST /v1/invoices

Cree une nouvelle facture electronique. En production, debite 0.04 EUR du solde.

Authentification : API Key (X-API-Key)

Corps de la requete :

ChampTypeRequisDescription
external_idstringnonIdentifiant externe (votre reference)
invoice_numberstringouiNumero de facture
directionstringouioutgoing (vente) ou incoming (achat)
output_formatstringouifacturx, ubl ou cii
issue_datedateouiDate d'emission (YYYY-MM-DD)
due_datedatenonDate d'echeance
currencystring (3 car.)nonDevise ISO (defaut: EUR)
total_htnumberouiMontant HT
total_taxnumberouiMontant TVA
total_ttcnumberouiMontant TTC
seller_siretstring (14 car.)ouiSIRET vendeur
seller_namestringouiNom vendeur
seller_addressobjectouiAdresse vendeur
seller_address.line1stringouiLigne 1
seller_address.postal_codestringouiCode postal
seller_address.citystringouiVille
seller_address.countrystring (2 car.)nonCode pays ISO
buyer_siretstring (14 car.)ouiSIRET acheteur
buyer_namestringouiNom acheteur
buyer_addressobjectouiAdresse acheteur (meme structure que seller)
linesarrayouiLignes de facture (min: 1)
lines[].descriptionstringouiDescription de la ligne
lines[].quantitynumberouiQuantite
lines[].unit_pricenumberouiPrix unitaire HT
lines[].tax_ratenumberouiTaux TVA (%)
lines[].total_htnumberouiTotal HT de la ligne
lines[].total_taxnumberouiTVA de la ligne
lines[].total_ttcnumberouiTTC de la ligne
archive_enabledbooleannonArchivage longue duree
bash
curl -X POST https://api.scell.io/api/v1/invoices \
  -H "X-API-Key: sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_number": "FACT-2026-001",
    "direction": "outgoing",
    "output_format": "facturx",
    "issue_date": "2026-01-15",
    "due_date": "2026-02-15",
    "total_ht": 1000.00,
    "total_tax": 200.00,
    "total_ttc": 1200.00,
    "seller_siret": "12345678901234",
    "seller_name": "Ma Societe SAS",
    "seller_address": {
      "line1": "1 Rue de la Paix",
      "postal_code": "75001",
      "city": "Paris",
      "country": "FR"
    },
    "buyer_siret": "98765432109876",
    "buyer_name": "Client SARL",
    "buyer_address": {
      "line1": "10 Avenue des Champs",
      "postal_code": "75008",
      "city": "Paris",
      "country": "FR"
    },
    "lines": [
      {
        "description": "Prestation de conseil",
        "quantity": 10,
        "unit_price": 100.00,
        "tax_rate": 20.00,
        "total_ht": 1000.00,
        "total_tax": 200.00,
        "total_ttc": 1200.00
      }
    ]
  }'
javascript
// JavaScript
const response = await fetch('https://api.scell.io/api/v1/invoices', {
  method: 'POST',
  headers: {
    'X-API-Key': 'sk_live_xxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    invoice_number: 'FACT-2026-001',
    direction: 'outgoing',
    output_format: 'facturx',
    issue_date: '2026-01-15',
    total_ht: 1000.00,
    total_tax: 200.00,
    total_ttc: 1200.00,
    seller_siret: '12345678901234',
    seller_name: 'Ma Societe SAS',
    seller_address: { line1: '1 Rue de la Paix', postal_code: '75001', city: 'Paris' },
    buyer_siret: '98765432109876',
    buyer_name: 'Client SARL',
    buyer_address: { line1: '10 Avenue des Champs', postal_code: '75008', city: 'Paris' },
    lines: [{
      description: 'Prestation de conseil',
      quantity: 10,
      unit_price: 100.00,
      tax_rate: 20.00,
      total_ht: 1000.00,
      total_tax: 200.00,
      total_ttc: 1200.00
    }]
  })
});
php
// PHP
$response = $client->post('https://api.scell.io/api/v1/invoices', [
    'headers' => ['X-API-Key' => 'sk_live_xxx'],
    'json' => [
        'invoice_number' => 'FACT-2026-001',
        'direction' => 'outgoing',
        'output_format' => 'facturx',
        'issue_date' => '2026-01-15',
        'total_ht' => 1000.00,
        'total_tax' => 200.00,
        'total_ttc' => 1200.00,
        'seller_siret' => '12345678901234',
        'seller_name' => 'Ma Societe SAS',
        'seller_address' => ['line1' => '1 Rue de la Paix', 'postal_code' => '75001', 'city' => 'Paris'],
        'buyer_siret' => '98765432109876',
        'buyer_name' => 'Client SARL',
        'buyer_address' => ['line1' => '10 Avenue des Champs', 'postal_code' => '75008', 'city' => 'Paris'],
        'lines' => [[
            'description' => 'Prestation de conseil',
            'quantity' => 10,
            'unit_price' => 100.00,
            'tax_rate' => 20.00,
            'total_ht' => 1000.00,
            'total_tax' => 200.00,
            'total_ttc' => 1200.00
        ]]
    ]
]);
python
# Python
import requests

response = requests.post("https://api.scell.io/api/v1/invoices",
    headers={"X-API-Key": "sk_live_xxx"},
    json={
        "invoice_number": "FACT-2026-001",
        "direction": "outgoing",
        "output_format": "facturx",
        "issue_date": "2026-01-15",
        "total_ht": 1000.00,
        "total_tax": 200.00,
        "total_ttc": 1200.00,
        "seller_siret": "12345678901234",
        "seller_name": "Ma Societe SAS",
        "seller_address": {"line1": "1 Rue de la Paix", "postal_code": "75001", "city": "Paris"},
        "buyer_siret": "98765432109876",
        "buyer_name": "Client SARL",
        "buyer_address": {"line1": "10 Avenue des Champs", "postal_code": "75008", "city": "Paris"},
        "lines": [{
            "description": "Prestation de conseil",
            "quantity": 10,
            "unit_price": 100.00,
            "tax_rate": 20.00,
            "total_ht": 1000.00,
            "total_tax": 200.00,
            "total_ttc": 1200.00
        }]
    }
)

Reponse (201) :

json
{
  "message": "Facture creee avec succes",
  "data": {
    "id": "uuid",
    "invoice_number": "FACT-2026-001",
    "direction": "outgoing",
    "output_format": "facturx",
    "status": "draft",
    "issue_date": "2026-01-15",
    "total_ht": 1000.00,
    "total_tax": 200.00,
    "total_ttc": 1200.00,
    "seller_siret": "12345678901234",
    "seller_name": "Ma Societe SAS",
    "buyer_siret": "98765432109876",
    "buyer_name": "Client SARL",
    "lines": [...],
    "created_at": "2026-01-15T10:30:00Z"
  }
}

Erreurs : 422 (validation), 402 (solde insuffisant)


GET /v1/invoices

Liste les factures de l'utilisateur.

Authentification : Bearer Token

Parametres de requete :

ParametreTypeDescription
company_iduuidFiltrer par entreprise
statusstringFiltrer par statut (draft, validated, submitted, paid)
directionstringoutgoing ou incoming
environmentstringsandbox ou production
fromdateDate de debut
todateDate de fin
per_pageintegerElements par page (defaut: 25)
bash
curl -X GET "https://api.scell.io/api/v1/invoices?direction=outgoing&status=validated" \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/invoices/{id}

Recupere les details d'une facture avec ses lignes.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/invoices/{id} \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/invoices/{id}/download/{type}

Genere un lien de telechargement temporaire (15 minutes).

Authentification : API Key

Parametres de chemin :

ParametreValeursDescription
typeoriginalFichier original uploade
convertedVersion convertie (Factur-X, UBL...)
pdfVersion PDF visible
bash
curl -X GET https://api.scell.io/api/v1/invoices/{id}/download/pdf \
  -H "X-API-Key: sk_live_xxx"

Reponse (200) :

json
{
  "url": "https://storage.scell.io/...",
  "expires_at": "2026-01-15T10:45:00Z"
}

GET /v1/invoices/{id}/audit-trail

Recupere la piste d'audit fiable (PAF) d'une facture.

Authentification : API Key

bash
curl -X GET https://api.scell.io/api/v1/invoices/{id}/audit-trail \
  -H "X-API-Key: sk_live_xxx"

Reponse (200) :

json
{
  "data": [
    {
      "action": "invoice.created",
      "details": "Creation",
      "actor_ip": "192.168.1.1",
      "created_at": "2026-01-15T10:30:00Z"
    },
    {
      "action": "invoice.submitted",
      "details": "Soumission au PDP",
      "actor_ip": "192.168.1.1",
      "created_at": "2026-01-15T10:31:00Z"
    }
  ],
  "integrity_valid": true
}

POST /v1/invoices/{id}/submit

Soumet une facture brouillon au PDP (Plateforme de Dematerialisation Partenaire).

Authentification : API Key

bash
curl -X POST https://api.scell.io/api/v1/invoices/{id}/submit \
  -H "X-API-Key: sk_live_xxx"

Reponse (200) :

json
{
  "message": "Facture soumise avec succes",
  "data": {
    "id": "uuid",
    "status": "submitted",
    "submitted_at": "2026-01-15T10:31:00Z"
  }
}

POST /v1/invoices/convert

Convertit une facture vers un autre format (UBL vers Factur-X, etc.).

Authentification : API Key

Corps :

ChampTypeRequisDescription
invoice_iduuidouiID de la facture a convertir
target_formatstringouifacturx, ubl ou cii
bash
curl -X POST https://api.scell.io/api/v1/invoices/convert \
  -H "X-API-Key: sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{"invoice_id": "uuid", "target_format": "facturx"}'

4. Signatures

POST /v1/signatures

Cree une demande de signature electronique (eIDAS EU-SES). En production, debite 1.20 EUR.

Authentification : API Key (X-API-Key)

Corps de la requete :

ChampTypeRequisDescription
external_idstringnonIdentifiant externe
titlestringouiTitre du document
descriptionstringnonDescription
documentstring (base64)ouiDocument PDF encode en Base64
document_namestringouiNom du fichier
signersarrayouiListe des signataires (1-10)
signers[].first_namestringouiPrenom
signers[].last_namestringouiNom
signers[].emailstring (email)oui*Email (*requis si pas de phone)
signers[].phonestringoui*Telephone (*requis si pas d'email)
signers[].auth_methodstringouiemail, sms ou both
signature_positionsarraynonPositions de signature
signature_positions[].pageintegerouiNumero de page
signature_positions[].xnumberouiPosition X
signature_positions[].ynumberouiPosition Y
signature_positions[].widthnumbernonLargeur
signature_positions[].heightnumbernonHauteur
ui_configobjectnonPersonnalisation white-label
ui_config.logo_urlstring (url)nonLogo personnalise
ui_config.primary_colorstringnonCouleur primaire (#RRGGBB)
ui_config.company_namestringnonNom affiche
redirect_complete_urlstring (url)nonURL de redirection apres signature
redirect_cancel_urlstring (url)nonURL de redirection en cas d'annulation
expires_atdatetimenonExpiration (defaut: +30 jours)
archive_enabledbooleannonArchivage longue duree
bash
curl -X POST https://api.scell.io/api/v1/signatures \
  -H "X-API-Key: sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "Contrat de prestation",
    "document_name": "contrat.pdf",
    "document": "<BASE64_CONTENT>",
    "signers": [
      {
        "first_name": "Jean",
        "last_name": "Dupont",
        "email": "jean.dupont@example.com",
        "auth_method": "email"
      }
    ],
    "redirect_complete_url": "https://mon-site.com/signature-ok",
    "redirect_cancel_url": "https://mon-site.com/signature-annulee"
  }'
javascript
// JavaScript
const fs = require('fs');
const document = fs.readFileSync('contrat.pdf').toString('base64');

const response = await fetch('https://api.scell.io/api/v1/signatures', {
  method: 'POST',
  headers: {
    'X-API-Key': 'sk_live_xxx',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    title: 'Contrat de prestation',
    document_name: 'contrat.pdf',
    document: document,
    signers: [{
      first_name: 'Jean',
      last_name: 'Dupont',
      email: 'jean.dupont@example.com',
      auth_method: 'email'
    }]
  })
});
php
// PHP
$document = base64_encode(file_get_contents('contrat.pdf'));

$response = $client->post('https://api.scell.io/api/v1/signatures', [
    'headers' => ['X-API-Key' => 'sk_live_xxx'],
    'json' => [
        'title' => 'Contrat de prestation',
        'document_name' => 'contrat.pdf',
        'document' => $document,
        'signers' => [[
            'first_name' => 'Jean',
            'last_name' => 'Dupont',
            'email' => 'jean.dupont@example.com',
            'auth_method' => 'email'
        ]]
    ]
]);
python
# Python
import base64, requests

with open("contrat.pdf", "rb") as f:
    document = base64.b64encode(f.read()).decode()

response = requests.post("https://api.scell.io/api/v1/signatures",
    headers={"X-API-Key": "sk_live_xxx"},
    json={
        "title": "Contrat de prestation",
        "document_name": "contrat.pdf",
        "document": document,
        "signers": [{
            "first_name": "Jean",
            "last_name": "Dupont",
            "email": "jean.dupont@example.com",
            "auth_method": "email"
        }]
    }
)

Reponse (201) :

json
{
  "message": "Demande de signature creee",
  "data": {
    "id": "uuid",
    "title": "Contrat de prestation",
    "status": "pending",
    "signers": [
      {
        "first_name": "Jean",
        "last_name": "Dupont",
        "email": "jean.dupont@example.com",
        "status": "pending",
        "signing_url": "https://sign.scell.io/..."
      }
    ],
    "expires_at": "2026-02-15T10:30:00Z",
    "created_at": "2026-01-15T10:30:00Z"
  }
}

GET /v1/signatures

Liste les demandes de signature.

Authentification : Bearer Token

Parametres :

ParametreTypeDescription
statusstringpending, completed, refused, expired
environmentstringsandbox ou production
per_pageintegerElements par page
bash
curl -X GET "https://api.scell.io/api/v1/signatures?status=pending" \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/signatures/{id}

Recupere les details d'une signature avec ses signataires.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/signatures/{id} \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/signatures/{id}/download/{type}

Telecharge les fichiers de signature.

Authentification : API Key

Types disponibles : original (document original), signed (document signe), audit_trail (dossier de preuve)

bash
curl -X GET https://api.scell.io/api/v1/signatures/{id}/download/signed \
  -H "X-API-Key: sk_live_xxx"

Reponse (200) :

json
{
  "url": "https://storage.scell.io/...",
  "expires_at": "2026-01-15T10:45:00Z"
}

POST /v1/signatures/{id}/remind

Envoie un rappel aux signataires en attente.

Authentification : API Key

bash
curl -X POST https://api.scell.io/api/v1/signatures/{id}/remind \
  -H "X-API-Key: sk_live_xxx"

Reponse (200) :

json
{
  "message": "Rappels envoyes",
  "signers_reminded": 2
}

Erreurs : 400 (CANNOT_REMIND, NO_PENDING_SIGNERS)


POST /v1/signatures/{id}/cancel

Annule une demande de signature en cours.

Authentification : API Key

bash
curl -X POST https://api.scell.io/api/v1/signatures/{id}/cancel \
  -H "X-API-Key: sk_live_xxx"

Reponse (200) :

json
{
  "message": "Signature annulee"
}

Erreurs : 400 (ALREADY_COMPLETED - impossible d'annuler une signature terminee)


5. Credit Notes (Avoirs)

GET /v1/credit-notes

Liste les avoirs.

Authentification : Bearer Token

Parametres :

ParametreTypeDescription
statusstringdraft ou sent
invoice_iduuidFacture d'origine
typestringpartial ou total
per_pageintegerElements par page (defaut: 15)
bash
curl -X GET "https://api.scell.io/api/v1/credit-notes?status=sent" \
  -H "Authorization: Bearer <TOKEN>"

POST /v1/credit-notes

Cree un avoir (credit note). Debite 0.04 EUR en production.

Authentification : Bearer Token

Corps :

ChampTypeRequisDescription
invoice_iduuidouiID de la facture d'origine
reasonstringouiMotif de l'avoir
itemsarrayouiLignes de l'avoir
items[].descriptionstringouiDescription
items[].quantitynumberouiQuantite
items[].unit_pricenumberouiPrix unitaire
items[].tax_ratenumberouiTaux TVA (%)
bash
curl -X POST https://api.scell.io/api/v1/credit-notes \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_id": "uuid-facture",
    "reason": "Retour de marchandise",
    "items": [
      {
        "description": "Article retourne",
        "quantity": 1,
        "unit_price": 50.00,
        "tax_rate": 20.00
      }
    ]
  }'

GET /v1/credit-notes/{id}

Recupere les details d'un avoir.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/credit-notes/{id} \
  -H "Authorization: Bearer <TOKEN>"

DELETE /v1/credit-notes/{id}

Supprime un avoir en brouillon. Les avoirs envoyes ne peuvent pas etre supprimes (NF525).

Authentification : Bearer Token

bash
curl -X DELETE https://api.scell.io/api/v1/credit-notes/{id} \
  -H "Authorization: Bearer <TOKEN>"

Erreurs : 403 (l'avoir n'est pas en brouillon, suppression interdite)


POST /v1/credit-notes/{id}/send

Envoie un avoir (le fait passer de draft a sent). Irreversible.

Authentification : Bearer Token

bash
curl -X POST https://api.scell.io/api/v1/credit-notes/{id}/send \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/credit-notes/{id}/download

Telecharge le PDF de l'avoir.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/credit-notes/{id}/download \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/invoices/{invoice}/remaining-creditable

Retourne les montants restants creditables pour une facture (pour eviter un avoir superieur au montant facture).

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/invoices/{invoice}/remaining-creditable \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "data": {
    "invoice_id": "uuid",
    "invoice_total_ht": 1000.00,
    "already_credited_ht": 200.00,
    "remaining_creditable_ht": 800.00,
    "lines": [
      {
        "description": "Prestation",
        "original_quantity": 10,
        "credited_quantity": 2,
        "remaining_quantity": 8
      }
    ]
  }
}

6. API Keys

GET /v1/api-keys

Liste les cles API.

Authentification : Bearer Token

Parametres :

ParametreTypeDescription
company_iduuidFiltrer par entreprise
environmentstringsandbox ou production
bash
curl -X GET "https://api.scell.io/api/v1/api-keys?environment=production" \
  -H "Authorization: Bearer <TOKEN>"

POST /v1/api-keys

Genere une nouvelle cle API. La cle complete n'est retournee qu'une seule fois.

Authentification : Bearer Token

Corps :

ChampTypeRequisDescription
namestringouiNom descriptif
company_iduuidouiID de l'entreprise
environmentstringouisandbox ou production
scopesarraynonPermissions (invoices, signatures)
expires_atdatetimenonDate d'expiration
bash
curl -X POST https://api.scell.io/api/v1/api-keys \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Cle Production Server 1",
    "company_id": "uuid",
    "environment": "production",
    "scopes": ["invoices", "signatures"]
  }'

Reponse (201) :

json
{
  "message": "Cle API creee",
  "data": {
    "id": "uuid",
    "name": "Cle Production Server 1",
    "key": "sk_live_x8z...",
    "prefix": "sk_live_x8z",
    "environment": "production",
    "scopes": ["invoices", "signatures"],
    "created_at": "2026-01-15T10:30:00Z"
  },
  "warning": "Conservez cette cle en securite. Elle ne sera plus affichee."
}

GET /v1/api-keys/{id}

Recupere les details d'une cle API (sans la cle complete).

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/api-keys/{id} \
  -H "Authorization: Bearer <TOKEN>"

DELETE /v1/api-keys/{id}

Revoque une cle API. Irreversible.

Authentification : Bearer Token

bash
curl -X DELETE https://api.scell.io/api/v1/api-keys/{id} \
  -H "Authorization: Bearer <TOKEN>"

7. Balance

GET /v1/balance

Recupere le solde actuel et les parametres de rechargement.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/balance \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "data": {
    "amount": 150.00,
    "currency": "EUR",
    "auto_reload_enabled": false,
    "auto_reload_threshold": null,
    "auto_reload_amount": null,
    "low_balance_alert_threshold": 10.00,
    "critical_balance_alert_threshold": 2.00
  }
}

POST /v1/balance/reload

Recharge le solde manuellement.

Authentification : Bearer Token

Corps :

ChampTypeRequisDescription
amountnumberouiMontant (10-10000 EUR)
bash
curl -X POST https://api.scell.io/api/v1/balance/reload \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"amount": 100.00}'

Reponse (200) :

json
{
  "message": "Solde recharge avec succes",
  "transaction": {
    "id": "uuid",
    "amount": 100.00,
    "balance_after": 250.00
  }
}

PUT /v1/balance/settings

Met a jour les parametres de rechargement automatique.

Authentification : Bearer Token

Corps :

ChampTypeRequisDescription
auto_reload_enabledbooleannonActiver le rechargement auto
auto_reload_thresholdnumbernonSeuil de declenchement
auto_reload_amountnumbernonMontant de rechargement
low_balance_alert_thresholdnumbernonSeuil d'alerte solde bas
critical_balance_alert_thresholdnumbernonSeuil d'alerte critique
bash
curl -X PUT https://api.scell.io/api/v1/balance/settings \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "auto_reload_enabled": true,
    "auto_reload_threshold": 10.00,
    "auto_reload_amount": 100.00
  }'

GET /v1/balance/transactions

Liste l'historique des transactions (debits et credits).

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/balance/transactions \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "data": [
    {
      "id": "uuid",
      "type": "debit",
      "amount": -0.04,
      "balance_after": 149.96,
      "description": "Facture FACT-2026-001",
      "entity_type": "invoice",
      "entity_id": "uuid",
      "created_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 5, "per_page": 25, "total": 120 }
}

8. Webhooks

GET /v1/webhooks

Liste les webhooks configures.

Authentification : Bearer Token

Parametres : company_id (uuid, optionnel)

bash
curl -X GET https://api.scell.io/api/v1/webhooks \
  -H "Authorization: Bearer <TOKEN>"

POST /v1/webhooks

Configure un nouveau webhook.

Authentification : Bearer Token

Corps :

ChampTypeRequisDescription
urlstring (url)ouiURL de reception
eventsarrayouiEvenements a ecouter
environmentstringouisandbox ou production
headersobjectnonHeaders personnalises
retry_countintegernonNombre de tentatives (0-5, defaut: 3)
timeout_secondsintegernonTimeout (5-60, defaut: 30)

Evenements disponibles :

EvenementDescription
invoice.createdFacture creee
invoice.validatedFacture validee
invoice.submittedFacture soumise au PDP
invoice.paidFacture payee
invoice.rejectedFacture rejetee
signature.createdSignature creee
signature.completedSignature terminee
signature.refusedSignature refusee
signature.expiredSignature expiree
credit_note.createdAvoir cree
credit_note.sentAvoir envoye
bash
curl -X POST https://api.scell.io/api/v1/webhooks \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://mon-site.com/webhooks/scell",
    "events": ["invoice.validated", "signature.completed"],
    "environment": "production"
  }'

Reponse (201) :

json
{
  "message": "Webhook cree avec succes",
  "data": {
    "id": "uuid",
    "url": "https://mon-site.com/webhooks/scell",
    "secret": "whsec_abc123...",
    "events": ["invoice.validated", "signature.completed"],
    "environment": "production",
    "is_active": true
  }
}

GET /v1/webhooks/{id}

Recupere les details d'un webhook.

bash
curl -X GET https://api.scell.io/api/v1/webhooks/{id} \
  -H "Authorization: Bearer <TOKEN>"

PUT /v1/webhooks/{id}

Met a jour un webhook.

bash
curl -X PUT https://api.scell.io/api/v1/webhooks/{id} \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"events": ["invoice.validated", "invoice.paid"], "is_active": true}'

DELETE /v1/webhooks/{id}

Supprime un webhook.

bash
curl -X DELETE https://api.scell.io/api/v1/webhooks/{id} \
  -H "Authorization: Bearer <TOKEN>"

POST /v1/webhooks/{id}/regenerate-secret

Regenere le secret de signature du webhook.

bash
curl -X POST https://api.scell.io/api/v1/webhooks/{id}/regenerate-secret \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "message": "Secret regenere",
  "secret": "whsec_new_xyz..."
}

POST /v1/webhooks/{id}/test

Envoie un evenement de test au webhook.

bash
curl -X POST https://api.scell.io/api/v1/webhooks/{id}/test \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/webhooks/{id}/logs

Recupere les logs d'execution du webhook.

bash
curl -X GET https://api.scell.io/api/v1/webhooks/{id}/logs \
  -H "Authorization: Bearer <TOKEN>"

Reponse (200) :

json
{
  "data": [
    {
      "id": "uuid",
      "event": "invoice.validated",
      "status_code": 200,
      "response_time_ms": 150,
      "attempt": 1,
      "created_at": "2026-01-15T10:30:00Z"
    }
  ]
}

9. Incoming Invoices (Factures fournisseurs)

GET /v1/invoices/incoming

Liste les factures fournisseurs recues.

Authentification : Bearer Token

bash
curl -X GET https://api.scell.io/api/v1/invoices/incoming \
  -H "Authorization: Bearer <TOKEN>"

POST /v1/invoices/{invoice}/accept

Accepte une facture fournisseur.

bash
curl -X POST https://api.scell.io/api/v1/invoices/{invoice}/accept \
  -H "Authorization: Bearer <TOKEN>"

POST /v1/invoices/{invoice}/reject

Rejette une facture fournisseur.

Corps :

ChampTypeRequisDescription
reasonstringouiMotif du rejet
bash
curl -X POST https://api.scell.io/api/v1/invoices/{invoice}/reject \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Montant incorrect"}'

POST /v1/invoices/{invoice}/dispute

Conteste une facture fournisseur.

Corps :

ChampTypeRequisDescription
reasonstringouiMotif de la contestation
bash
curl -X POST https://api.scell.io/api/v1/invoices/{invoice}/dispute \
  -H "Authorization: Bearer <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Prestation non conforme"}'

POST /v1/invoices/{invoice}/mark-paid

Marque une facture fournisseur comme payee.

bash
curl -X POST https://api.scell.io/api/v1/invoices/{invoice}/mark-paid \
  -H "Authorization: Bearer <TOKEN>"

GET /v1/invoices/{invoice}/download

Telecharge une facture fournisseur.

bash
curl -X GET https://api.scell.io/api/v1/invoices/{invoice}/download \
  -H "Authorization: Bearer <TOKEN>"

10. Tenant (Multi-Tenant B2B)

API destinee aux partenaires integrant Scell.io pour leurs propres clients. Authentification via X-Tenant-Key.

GET /v1/tenant/me

Retourne le profil du tenant authentifie.

Authentification : Tenant Key

bash
curl -X GET https://api.scell.io/api/v1/tenant/me \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": {
    "id": "uuid",
    "name": "Mon Entreprise",
    "slug": "mon-entreprise",
    "legal_name": "Mon Entreprise SAS",
    "siret": "12345678901234",
    "vat_number": "FR12345678901",
    "billing_email": "billing@monentreprise.fr",
    "technical_email": "tech@monentreprise.fr",
    "kyb_status": "verified",
    "kyb_verified_at": "2026-01-10T08:00:00Z",
    "balance": 500.00,
    "environment": "production",
    "created_at": "2026-01-05T10:00:00Z"
  }
}

PUT /v1/tenant/me

Met a jour le profil du tenant.

Corps :

ChampTypeRequisDescription
billing_emailstring (email)nonEmail de facturation
technical_emailstring (email)nonEmail technique
contact_phonestringnonTelephone
webhook_urlstring (url)nonURL webhook globale
settingsobjectnonParametres personnalises
bash
curl -X PUT https://api.scell.io/api/v1/tenant/me \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"billing_email": "new-billing@monentreprise.fr"}'

GET /v1/tenant/balance

Retourne le solde du tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/balance \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/stats

Retourne les statistiques du tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/stats \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/stats/overview

Statistiques detaillees (tableau de bord).

bash
curl -X GET https://api.scell.io/api/v1/tenant/stats/overview \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/stats/monthly

Statistiques mensuelles detaillees.

bash
curl -X GET https://api.scell.io/api/v1/tenant/stats/monthly \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/regenerate-key

Regenere la cle API du tenant. L'ancienne cle est immediatement invalidee.

bash
curl -X POST https://api.scell.io/api/v1/tenant/regenerate-key \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "message": "Cle regeneree",
  "api_key": "sk_live_newkey...",
  "warning": "L'ancienne cle est desormais invalide"
}

11. Sub-Tenants

Gestion des sous-clients (sub-tenants) dans l'architecture multi-tenant.

GET /v1/tenant/sub-tenants

Liste les sub-tenants.

bash
curl -X GET https://api.scell.io/api/v1/tenant/sub-tenants \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/sub-tenants

Cree un sub-tenant.

Corps :

ChampTypeRequisDescription
external_idstringouiIdentifiant dans votre systeme
namestringouiNom du sub-tenant
emailstring (email)ouiEmail de contact
siretstring (14 car.)nonSIRET
vat_numberstringnonNumero TVA
contact_personstringnonPersonne de contact
phonestringnonTelephone
addressobjectnonAdresse
metadataobjectnonDonnees personnalisees
bash
curl -X POST https://api.scell.io/api/v1/tenant/sub-tenants \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "external_id": "client_123",
    "name": "Client ABC",
    "email": "contact@client-abc.fr",
    "siret": "98765432109876"
  }'

GET /v1/tenant/sub-tenants/{id}

Recupere un sub-tenant par ID.

bash
curl -X GET https://api.scell.io/api/v1/tenant/sub-tenants/{id} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/sub-tenants/by-external-id/{externalId}

Recherche un sub-tenant par identifiant externe.

bash
curl -X GET https://api.scell.io/api/v1/tenant/sub-tenants/by-external-id/client_123 \
  -H "X-Tenant-Key: sk_live_xxxxxx"

PUT /v1/tenant/sub-tenants/{id}

Met a jour un sub-tenant.

bash
curl -X PUT https://api.scell.io/api/v1/tenant/sub-tenants/{id} \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"name": "Client ABC - Mis a jour", "phone": "+33612345678"}'

DELETE /v1/tenant/sub-tenants/{id}

Supprime un sub-tenant.

bash
curl -X DELETE https://api.scell.io/api/v1/tenant/sub-tenants/{id} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/sub-tenants/{subTenantId}/stats/overview

Statistiques d'un sub-tenant specifique.

bash
curl -X GET https://api.scell.io/api/v1/tenant/sub-tenants/{subTenantId}/stats/overview \
  -H "X-Tenant-Key: sk_live_xxxxxx"

12. Tenant Invoices

POST /v1/tenant/invoices

Cree une facture directe (sans sub-tenant). Debite 0.04 EUR.

Authentification : Tenant Key

Corps : Meme structure que POST /v1/invoices (voir section 3).

bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_number": "FACT-2026-001",
    "direction": "outgoing",
    "output_format": "facturx",
    "issue_date": "2026-01-15",
    "total_ht": 1000.00,
    "total_tax": 200.00,
    "total_ttc": 1200.00,
    "seller_siret": "12345678901234",
    "seller_name": "Ma Societe SAS",
    "seller_address": {"line1": "1 Rue de la Paix", "postal_code": "75001", "city": "Paris"},
    "buyer_siret": "98765432109876",
    "buyer_name": "Client SARL",
    "buyer_address": {"line1": "10 Avenue des Champs", "postal_code": "75008", "city": "Paris"},
    "lines": [{"description": "Prestation", "quantity": 1, "unit_price": 1000.00, "tax_rate": 20.00, "total_ht": 1000.00, "total_tax": 200.00, "total_ttc": 1200.00}]
  }'

GET /v1/tenant/invoices

Liste toutes les factures du tenant.

bash
curl -X GET "https://api.scell.io/api/v1/tenant/invoices?status=draft" \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/sub-tenants/{subTenantId}/invoices

Cree une facture pour un sub-tenant.

bash
curl -X POST https://api.scell.io/api/v1/tenant/sub-tenants/{subTenantId}/invoices \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /v1/tenant/sub-tenants/{subTenantId}/invoices

Liste les factures d'un sub-tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/sub-tenants/{subTenantId}/invoices \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/invoices/{invoiceId}

Recupere les details d'une facture.

bash
curl -X GET https://api.scell.io/api/v1/tenant/invoices/{invoiceId} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

PUT /v1/tenant/invoices/{invoiceId}

Met a jour une facture en brouillon.

bash
curl -X PUT https://api.scell.io/api/v1/tenant/invoices/{invoiceId} \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"due_date": "2026-03-15"}'

Erreurs : 403 (facture non modifiable si pas en statut draft)


DELETE /v1/tenant/invoices/{invoiceId}

Supprime une facture en brouillon.

bash
curl -X DELETE https://api.scell.io/api/v1/tenant/invoices/{invoiceId} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/invoices/{invoiceId}/submit

Soumet une facture au PDP.

bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices/{invoiceId}/submit \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/invoices/{invoiceId}/status

Recupere le statut d'une facture.

bash
curl -X GET https://api.scell.io/api/v1/tenant/invoices/{invoiceId}/status \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": {
    "id": "uuid",
    "status": "submitted",
    "submitted_at": "2026-01-15T10:31:00Z",
    "paid_at": null
  }
}

POST /v1/tenant/invoices/bulk

Creation en masse de factures (jusqu'a 100 par requete).

Corps :

ChampTypeRequisDescription
invoicesarrayouiTableau de factures (meme structure que creation unitaire)
bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices/bulk \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"invoices": [{ ... }, { ... }]}'

Reponse (201) :

json
{
  "message": "2 factures creees",
  "data": {
    "created": 2,
    "failed": 0,
    "invoices": [...]
  }
}

POST /v1/tenant/invoices/bulk-submit

Soumission en masse de factures.

Corps :

ChampTypeRequisDescription
invoice_idsarrayouiListe des IDs de factures a soumettre
bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices/bulk-submit \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"invoice_ids": ["uuid-1", "uuid-2", "uuid-3"]}'

POST /v1/tenant/invoices/bulk-status

Recupere le statut de plusieurs factures en une requete.

Corps :

ChampTypeRequisDescription
invoice_idsarrayouiListe des IDs
bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices/bulk-status \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"invoice_ids": ["uuid-1", "uuid-2"]}'

GET /v1/tenant/invoices/{invoiceId}/remaining-creditable

Montants restants creditables pour une facture tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/invoices/{invoiceId}/remaining-creditable \
  -H "X-Tenant-Key: sk_live_xxxxxx"

13. Tenant Credit Notes

POST /v1/tenant/credit-notes

Cree un avoir direct (sans sub-tenant). Debite 0.04 EUR.

bash
curl -X POST https://api.scell.io/api/v1/tenant/credit-notes \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_id": "uuid-facture",
    "reason": "Remise commerciale",
    "items": [{"description": "Remise", "quantity": 1, "unit_price": 100.00, "tax_rate": 20.00}]
  }'

GET /v1/tenant/credit-notes

Liste les avoirs du tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/credit-notes \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/sub-tenants/{subTenantId}/credit-notes

Cree un avoir pour un sub-tenant.

bash
curl -X POST https://api.scell.io/api/v1/tenant/sub-tenants/{subTenantId}/credit-notes \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

GET /v1/tenant/sub-tenants/{subTenantId}/credit-notes

Liste les avoirs d'un sub-tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/sub-tenants/{subTenantId}/credit-notes \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/credit-notes/{creditNoteId}

Recupere les details d'un avoir.

bash
curl -X GET https://api.scell.io/api/v1/tenant/credit-notes/{creditNoteId} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

PUT /v1/tenant/credit-notes/{creditNoteId}

Met a jour un avoir en brouillon.

bash
curl -X PUT https://api.scell.io/api/v1/tenant/credit-notes/{creditNoteId} \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Motif mis a jour"}'

POST /v1/tenant/credit-notes/{creditNoteId}/send

Envoie un avoir (passage de draft a sent).

bash
curl -X POST https://api.scell.io/api/v1/tenant/credit-notes/{creditNoteId}/send \
  -H "X-Tenant-Key: sk_live_xxxxxx"

DELETE /v1/tenant/credit-notes/{creditNoteId}

Supprime un avoir en brouillon.

bash
curl -X DELETE https://api.scell.io/api/v1/tenant/credit-notes/{creditNoteId} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/credit-notes/{creditNoteId}/download

Telecharge le PDF de l'avoir.

bash
curl -X GET https://api.scell.io/api/v1/tenant/credit-notes/{creditNoteId}/download \
  -H "X-Tenant-Key: sk_live_xxxxxx"

14. Tenant Billing

GET /v1/tenant/billing/invoices

Liste les factures de facturation du tenant (factures mensuelles de consommation Scell.io).

bash
curl -X GET https://api.scell.io/api/v1/tenant/billing/invoices \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": [
    {
      "id": "uuid",
      "invoice_number": "SCELL-2026-01",
      "period_start": "2026-01-01",
      "period_end": "2026-01-31",
      "invoices_count": 150,
      "invoices_amount": 6.00,
      "signatures_count": 5,
      "signatures_amount": 6.00,
      "total_ht": 12.00,
      "total_ttc": 14.40,
      "status": "paid"
    }
  ]
}

GET /v1/tenant/billing/invoices/{invoice}

Details d'une facture de facturation.

bash
curl -X GET https://api.scell.io/api/v1/tenant/billing/invoices/{invoice} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/billing/invoices/{invoice}/download

Telecharge le PDF de la facture de facturation.

bash
curl -X GET https://api.scell.io/api/v1/tenant/billing/invoices/{invoice}/download \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/billing/usage

Recupere la consommation en cours.

bash
curl -X GET https://api.scell.io/api/v1/tenant/billing/usage \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/billing/top-up

Initie une recharge du solde.

Corps :

ChampTypeRequisDescription
amountnumberouiMontant a recharger
bash
curl -X POST https://api.scell.io/api/v1/tenant/billing/top-up \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"amount": 100.00}'

POST /v1/tenant/billing/top-up/confirm

Confirme une recharge apres paiement.

bash
curl -X POST https://api.scell.io/api/v1/tenant/billing/top-up/confirm \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"payment_intent_id": "pi_xxx"}'

GET /v1/tenant/billing/transactions

Historique des transactions du tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/billing/transactions \
  -H "X-Tenant-Key: sk_live_xxxxxx"

15. Tenant Incoming Invoices

POST /v1/tenant/sub-tenants/{subTenantId}/invoices/incoming

Enregistre une facture fournisseur pour un sub-tenant. Gratuit (pas de debit).

bash
curl -X POST https://api.scell.io/api/v1/tenant/sub-tenants/{subTenantId}/invoices/incoming \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "invoice_number": "FOURNISSEUR-001",
    "issue_date": "2026-01-15",
    "total_ht": 500.00,
    "total_tax": 100.00,
    "total_ttc": 600.00,
    "seller_siret": "11111111111111",
    "seller_name": "Fournisseur SA",
    "buyer_siret": "22222222222222",
    "buyer_name": "Mon Client"
  }'

GET /v1/tenant/sub-tenants/{subTenantId}/invoices/incoming

Liste les factures fournisseurs d'un sub-tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/sub-tenants/{subTenantId}/invoices/incoming \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/invoices/incoming/{invoiceId}

Details d'une facture fournisseur.

bash
curl -X GET https://api.scell.io/api/v1/tenant/invoices/incoming/{invoiceId} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/invoices/incoming/{invoiceId}/accept

Accepte une facture fournisseur.

bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices/incoming/{invoiceId}/accept \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/invoices/incoming/{invoiceId}/reject

Rejette une facture fournisseur.

bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices/incoming/{invoiceId}/reject \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Montant incorrect"}'

POST /v1/tenant/invoices/incoming/{invoiceId}/mark-paid

Marque une facture fournisseur comme payee.

bash
curl -X POST https://api.scell.io/api/v1/tenant/invoices/incoming/{invoiceId}/mark-paid \
  -H "X-Tenant-Key: sk_live_xxxxxx"

16. KYB Documents

Gestion des documents KYB (Know Your Business) pour la verification d'identite des tenants.

GET /v1/tenant/kyb/status

Statut KYB du tenant.

bash
curl -X GET https://api.scell.io/api/v1/tenant/kyb/status \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": {
    "status": "verified",
    "verified_at": "2026-01-10T08:00:00Z",
    "documents_count": 3,
    "rejection_reason": null
  }
}

GET /v1/tenant/kyb/documents

Liste les documents KYB.

bash
curl -X GET https://api.scell.io/api/v1/tenant/kyb/documents \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/kyb/documents

Upload un document KYB.

Corps (multipart/form-data) :

ChampTypeRequisDescription
documentfileouiFichier (PDF, JPG, PNG, max 10 Mo)
typestringouikbis, id_card, articles, proof_of_address
bash
curl -X POST https://api.scell.io/api/v1/tenant/kyb/documents \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -F "document=@kbis.pdf" \
  -F "type=kbis"

GET /v1/tenant/kyb/documents/{document}

Details d'un document KYB.

bash
curl -X GET https://api.scell.io/api/v1/tenant/kyb/documents/{document} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/kyb/documents/{document}/download

Telecharge un document KYB.

bash
curl -X GET https://api.scell.io/api/v1/tenant/kyb/documents/{document}/download \
  -H "X-Tenant-Key: sk_live_xxxxxx"

DELETE /v1/tenant/kyb/documents/{document}

Supprime un document KYB (avant verification uniquement).

bash
curl -X DELETE https://api.scell.io/api/v1/tenant/kyb/documents/{document} \
  -H "X-Tenant-Key: sk_live_xxxxxx"

17. Onboarding

API d'onboarding B2B pour les partenaires. Permet d'inscrire des tenants via un flux integre.

Authentification : Publishable Key (X-Publishable-Key)

POST /v1/onboarding/sessions

Cree une session d'onboarding.

Corps :

ChampTypeRequisDescription
modestringouiapi, redirect ou embedded
external_idstringnonIdentifiant dans votre systeme
callback_urlstring (url)nonURL de callback
statestringnonEtat personnalise (retourne au callback)
metadataobjectnonDonnees personnalisees
bash
curl -X POST https://api.scell.io/api/v1/onboarding/sessions \
  -H "X-Publishable-Key: pk_test_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "redirect",
    "callback_url": "https://myapp.com/callback",
    "external_id": "user_123"
  }'

Reponse (201) :

json
{
  "message": "Session creee",
  "data": {
    "id": "uuid",
    "mode": "redirect",
    "status": "pending",
    "redirect_url": "https://app.scell.io/onboarding/uuid",
    "expires_at": "2026-01-15T11:30:00Z"
  }
}

GET /v1/onboarding/sessions/{id}

Recupere le statut d'une session.

bash
curl -X GET https://api.scell.io/api/v1/onboarding/sessions/{id} \
  -H "X-API-Key: pk_test_xxxxxx"

POST /v1/onboarding/verify-siret

Verifie un numero SIRET via l'API INSEE Sirene.

Corps :

ChampTypeRequisDescription
siretstring (14 car.)ouiNumero SIRET a verifier
bash
curl -X POST https://api.scell.io/api/v1/onboarding/verify-siret \
  -H "X-Publishable-Key: pk_test_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"siret": "12345678901234"}'

Reponse (200) :

json
{
  "data": {
    "valid": true,
    "company_name": "Ma Societe SAS",
    "address": "1 Rue de la Paix, 75001 Paris",
    "legal_form": "SAS",
    "creation_date": "2020-01-15",
    "active": true
  }
}

POST /v1/onboarding/verify-vat

Verifie un numero de TVA intracommunautaire via VIES.

Corps :

ChampTypeRequisDescription
vat_numberstringouiNumero de TVA (ex: FR12345678901)
bash
curl -X POST https://api.scell.io/api/v1/onboarding/verify-vat \
  -H "X-Publishable-Key: pk_test_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"vat_number": "FR12345678901"}'

POST /v1/onboarding/documents

Upload un document KYB pendant l'onboarding.

bash
curl -X POST https://api.scell.io/api/v1/onboarding/documents \
  -H "X-Publishable-Key: pk_test_xxxxxx" \
  -F "document=@kbis.pdf" \
  -F "type=kbis" \
  -F "session_id=uuid"

POST /v1/onboarding/complete

Complete la session d'onboarding et cree le tenant.

Corps :

ChampTypeRequisDescription
session_iduuidouiID de la session
namestringouiNom du tenant
siretstringouiSIRET verifie
billing_emailstring (email)ouiEmail de facturation
bash
curl -X POST https://api.scell.io/api/v1/onboarding/complete \
  -H "X-Publishable-Key: pk_test_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "session_id": "uuid",
    "name": "Nouveau Tenant",
    "siret": "12345678901234",
    "billing_email": "billing@nouveau-tenant.fr"
  }'

Reponse (201) :

json
{
  "message": "Onboarding termine",
  "data": {
    "tenant_id": "uuid",
    "authorization_code": "auth_code_xyz..."
  }
}

POST /v1/onboarding/exchange

Echange un code d'autorisation contre des credentials tenant. Rate limit strict (5/min).

Authentification : Aucune (publishable_key dans le corps)

Corps :

ChampTypeRequisDescription
publishable_keystringouiCle publishable
authorization_codestringouiCode d'autorisation recu apres onboarding
bash
curl -X POST https://api.scell.io/api/v1/onboarding/exchange \
  -H "Content-Type: application/json" \
  -d '{
    "publishable_key": "pk_test_xxxxxx",
    "authorization_code": "auth_code_xyz..."
  }'

Reponse (200) :

json
{
  "data": {
    "tenant_id": "uuid",
    "api_key": "sk_live_newkey...",
    "environment": "production"
  }
}

18. Fiscal Entries

Grand-livre fiscal immutable conforme NF525. Chaque operation (facture, avoir, paiement) est enregistree avec une chaine de hachage SHA256.

Authentification : Tenant Key + scope fiscal:read

GET /v1/tenant/fiscal/entries

Liste les ecritures du grand-livre fiscal.

Parametres :

ParametreTypeDescription
date_fromdateDate de debut
date_todateDate de fin
entry_typestringType d'ecriture (invoice_created, credit_note_issued, payment, closing)
environmentstringproduction ou sandbox
per_pageintegerElements par page (defaut: 20)
bash
curl -X GET "https://api.scell.io/api/v1/tenant/fiscal/entries?date_from=2026-01-01&date_to=2026-12-31" \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "success": true,
  "data": [
    {
      "id": "uuid",
      "sequence_number": 42,
      "entry_type": "invoice_created",
      "entity_type": "invoice",
      "entity_id": "uuid",
      "fiscal_date": "2026-01-15T10:30:00Z",
      "data_hash": "sha256:abc123...",
      "previous_hash": "sha256:xyz789...",
      "chain_hash": "sha256:def456...",
      "legal_status": "donnee_fiscale",
      "created_at": "2026-01-15T10:30:00Z"
    }
  ],
  "meta": { "current_page": 1, "last_page": 10, "per_page": 20, "total": 200 }
}

19. Fiscal Closings

GET /v1/tenant/fiscal/closings

Liste les clotures fiscales (journalieres et mensuelles).

Authentification : Tenant Key + scope fiscal:read

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/closings \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/fiscal/closings/daily

Declenche une cloture journaliere manuelle.

Authentification : Tenant Key + scope fiscal:write

bash
curl -X POST https://api.scell.io/api/v1/tenant/fiscal/closings/daily \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "message": "Cloture journaliere effectuee",
  "data": {
    "id": "uuid",
    "type": "daily",
    "date": "2026-01-15",
    "entries_count": 15,
    "totals": {
      "invoices_ht": 5000.00,
      "credit_notes_ht": 200.00,
      "net_ht": 4800.00
    },
    "closing_hash": "sha256:..."
  }
}

Les clotures journalieres sont aussi executees automatiquement a 00:00 UTC.


20. Fiscal Compliance

GET /v1/tenant/fiscal/compliance

Retourne le statut de conformite fiscale du tenant.

Authentification : Tenant Key + scope fiscal:read

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/compliance \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": {
    "compliant": true,
    "last_integrity_check": "2026-01-15T00:00:00Z",
    "integrity_valid": true,
    "last_daily_closing": "2026-01-14",
    "last_monthly_closing": "2025-12-31",
    "kill_switch_active": false,
    "chain_length": 1250,
    "warnings": []
  }
}

GET /v1/tenant/fiscal/attestation/{year}

Recupere l'attestation de conformite fiscale pour une annee.

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/attestation/2026 \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/fiscal/attestation/{year}/download

Telecharge l'attestation au format PDF.

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/attestation/2026/download \
  -H "X-Tenant-Key: sk_live_xxxxxx"

21. Fiscal Integrity

GET /v1/tenant/fiscal/integrity

Verifie l'integrite de la chaine de hachage fiscale.

Authentification : Tenant Key + scope fiscal:read

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/integrity \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": {
    "valid": true,
    "entries_checked": 1250,
    "first_entry": "2026-01-01T00:00:00Z",
    "last_entry": "2026-01-15T10:30:00Z",
    "broken_links": [],
    "checked_at": "2026-01-15T10:35:00Z"
  }
}

GET /v1/tenant/fiscal/integrity/history

Historique des verifications d'integrite.

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/integrity/history \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/fiscal/integrity/{date}

Verification d'integrite pour une date specifique.

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/integrity/2026-01-15 \
  -H "X-Tenant-Key: sk_live_xxxxxx"

22. Fiscal Rules

Regles fiscales applicables (taux TVA, exonerations, mentions obligatoires).

GET /v1/tenant/fiscal/rules

Liste les regles fiscales actives.

Authentification : Tenant Key + scope fiscal:read

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/rules \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/fiscal/rules/{key}

Details d'une regle fiscale specifique.

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/rules/vat_standard_rate \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/fiscal/rules/{key}/history

Historique des modifications d'une regle.

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/rules/vat_standard_rate/history \
  -H "X-Tenant-Key: sk_live_xxxxxx"

GET /v1/tenant/fiscal/rules/export

Exporte toutes les regles fiscales.

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/rules/export \
  -H "X-Tenant-Key: sk_live_xxxxxx"

POST /v1/tenant/fiscal/rules

Cree une nouvelle regle fiscale.

Authentification : Tenant Key + scope fiscal:write

bash
curl -X POST https://api.scell.io/api/v1/tenant/fiscal/rules \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "vat_reduced_rate",
    "value": 5.5,
    "description": "Taux reduit TVA",
    "effective_from": "2026-01-01"
  }'

PUT /v1/tenant/fiscal/rules/{id}

Met a jour une regle fiscale.

bash
curl -X PUT https://api.scell.io/api/v1/tenant/fiscal/rules/{id} \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"value": 10.0, "effective_from": "2026-07-01"}'

POST /v1/tenant/fiscal/rules/replay

Rejoue les regles fiscales sur les ecritures existantes (recalcul).

Authentification : Tenant Key + scope fiscal:write

bash
curl -X POST https://api.scell.io/api/v1/tenant/fiscal/rules/replay \
  -H "X-Tenant-Key: sk_live_xxxxxx"

23. Fiscal Anchors

Ancrage cryptographique des donnees fiscales (horodatage RFC 3161).

GET /v1/tenant/fiscal/anchors

Liste les ancrages fiscaux.

Authentification : Tenant Key + scope fiscal:read

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/anchors \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": [
    {
      "id": "uuid",
      "type": "daily_closing",
      "entity_id": "uuid",
      "data_hash": "sha256:...",
      "anchor_reference": "RFC3161:...",
      "anchored_at": "2026-01-15T00:01:00Z",
      "verified": true
    }
  ]
}

24. Fiscal Kill Switch

Mecanisme de securite permettant de bloquer toutes les operations fiscales en cas d'anomalie.

GET /v1/tenant/fiscal/kill-switch/status

Statut du kill-switch.

Authentification : Tenant Key + scope fiscal:read

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/kill-switch/status \
  -H "X-Tenant-Key: sk_live_xxxxxx"

Reponse (200) :

json
{
  "data": {
    "active": false,
    "activated_at": null,
    "activated_by": null,
    "reason": null
  }
}

POST /v1/tenant/fiscal/kill-switch/activate

Active le kill-switch. Toutes les operations de creation de factures et avoirs sont bloquees.

Authentification : Tenant Key + scope fiscal:admin

Corps :

ChampTypeRequisDescription
reasonstringouiMotif d'activation
bash
curl -X POST https://api.scell.io/api/v1/tenant/fiscal/kill-switch/activate \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"reason": "Anomalie detectee dans la chaine de hachage"}'

POST /v1/tenant/fiscal/kill-switch/deactivate

Desactive le kill-switch.

Authentification : Tenant Key + scope fiscal:admin

bash
curl -X POST https://api.scell.io/api/v1/tenant/fiscal/kill-switch/deactivate \
  -H "X-Tenant-Key: sk_live_xxxxxx"

25. Fiscal Export

GET /v1/tenant/fiscal/fec

Exporte le Fichier des Ecritures Comptables (FEC) au format reglementaire.

Authentification : Tenant Key + scope fiscal:read

Parametres :

ParametreTypeDescription
yearintegerAnnee d'export
monthintegerMois (optionnel)
bash
curl -X GET "https://api.scell.io/api/v1/tenant/fiscal/fec?year=2026" \
  -H "X-Tenant-Key: sk_live_xxxxxx" \
  -o fec_2026.txt

Le FEC est genere au format tabule conforme a l'article A47 A-1 du LPF.


GET /v1/tenant/fiscal/forensic-export

Export forensique complet (toutes les donnees avec preuves de chaine).

Authentification : Tenant Key + scope fiscal:read

bash
curl -X GET https://api.scell.io/api/v1/tenant/fiscal/forensic-export \
  -H "X-Tenant-Key: sk_live_xxxxxx"

26. Admin

Endpoints reserves aux administrateurs de la plateforme Scell.io.

Authentification : Bearer Token + permission admin access

GET /v1/admin/stats

Statistiques globales de la plateforme.

bash
curl -X GET https://api.scell.io/api/v1/admin/stats \
  -H "Authorization: Bearer <ADMIN_TOKEN>"

GET /v1/admin/users

Liste des utilisateurs.

bash
curl -X GET https://api.scell.io/api/v1/admin/users \
  -H "Authorization: Bearer <ADMIN_TOKEN>"

POST /v1/admin/users/{id}/toggle-status

Active ou desactive un utilisateur.

bash
curl -X POST https://api.scell.io/api/v1/admin/users/{id}/toggle-status \
  -H "Authorization: Bearer <ADMIN_TOKEN>"

GET /v1/admin/companies

Liste des entreprises (admin).

bash
curl -X GET https://api.scell.io/api/v1/admin/companies \
  -H "Authorization: Bearer <ADMIN_TOKEN>"

GET /v1/admin/companies/{id}

Details d'une entreprise (admin).

bash
curl -X GET https://api.scell.io/api/v1/admin/companies/{id} \
  -H "Authorization: Bearer <ADMIN_TOKEN>"

POST /v1/admin/companies/{id}/toggle-status

Active ou desactive une entreprise.

bash
curl -X POST https://api.scell.io/api/v1/admin/companies/{id}/toggle-status \
  -H "Authorization: Bearer <ADMIN_TOKEN>"

POST /v1/admin/users/{userId}/credit

Ajoute des credits a un utilisateur.

Corps :

ChampTypeRequisDescription
amountnumberouiMontant a crediter
reasonstringouiMotif
bash
curl -X POST https://api.scell.io/api/v1/admin/users/{userId}/credit \
  -H "Authorization: Bearer <ADMIN_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"amount": 50.00, "reason": "Credit offert"}'

POST /v1/admin/users/{userId}/debit

Retire des credits a un utilisateur.

bash
curl -X POST https://api.scell.io/api/v1/admin/users/{userId}/debit \
  -H "Authorization: Bearer <ADMIN_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{"amount": 10.00, "reason": "Ajustement"}'

Admin KYB

MethodeEndpointDescription
GET/v1/admin/kyb/pendingDocuments KYB en attente de validation
POST/v1/admin/kyb/documents/{document}/reviewValider ou rejeter un document KYB
GET/v1/admin/kyb/documents/{document}/downloadTelecharger un document KYB

Admin OpenAPI (Signature Provider)

MethodeEndpointDescription
GET/v1/admin/openapi/configConfiguration OpenAPI.com
POST/v1/admin/openapi/configSauvegarder la configuration
POST/v1/admin/openapi/config/verifyVerifier la configuration
GET/v1/admin/openapi/creditCredit restant OpenAPI.com
GET/v1/admin/openapi/tokensLister les tokens OAuth
POST/v1/admin/openapi/tokensCreer un token OAuth
DELETE/v1/admin/openapi/tokens/{id}Supprimer un token
POST/v1/admin/openapi/tokens/{id}/refreshRafraichir un token

27. MCP Server

Serveur MCP (Model Context Protocol) pour l'integration avec les agents IA (Claude, etc.).

GET /mcp

Informations du serveur MCP.

Authentification : Aucune

bash
curl -X GET https://api.scell.io/mcp

Reponse (200) :

json
{
  "name": "scell-mcp-server",
  "version": "1.2.0",
  "protocol": "2024-11-05",
  "tools_count": 54,
  "capabilities": ["tools", "resources"]
}

POST /mcp

Endpoint JSON-RPC 2.0 principal. Supporte les methodes MCP standard.

Authentification : X-API-Key

Methodes disponibles :

MethodeDescription
initializeInitialise la session MCP
tools/listListe les 54 outils disponibles
tools/callExecute un outil
bash
curl -X POST https://api.scell.io/mcp \
  -H "X-API-Key: sk_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'

Outils disponibles (54) :

CategorieOutils
Facturescreate_invoice, get_invoice, list_invoices, download_invoice
Signaturescreate_signature, get_signature, list_signatures, download_signed, cancel_signature, send_reminder
Avoirscreate_credit_note, get_credit_note, list_credit_notes, download_credit_note, delete_credit_note, send_credit_note, get_remaining_creditable
Fiscallist_fiscal_entries, list_fiscal_closings, check_fiscal_integrity, get_fiscal_compliance, get_fiscal_attestation, get_kill_switch_status, list_fiscal_rules
Compteget_balance, get_audit_trail
Validationvalidate_siret, validate_vat
Systemehealth_check, validate_api_key

GET /mcp/stream

Transport SSE (Server-Sent Events) pour les reponses en streaming.

bash
curl -X GET https://api.scell.io/mcp/stream \
  -H "X-API-Key: sk_live_xxx" \
  -H "Accept: text/event-stream"

Sandbox

L'environnement sandbox permet de tester l'API sans debit reel.

Endpoints sandbox

Tous les endpoints sont aussi disponibles via le prefix /v1/sandbox/ :

POST /v1/sandbox/invoices
GET  /v1/sandbox/invoices
GET  /v1/sandbox/invoices/{id}
GET  /v1/sandbox/invoices/{id}/download/{type}
GET  /v1/sandbox/invoices/{id}/audit-trail
POST /v1/sandbox/signatures
GET  /v1/sandbox/signatures
GET  /v1/sandbox/signatures/{id}
GET  /v1/sandbox/signatures/{id}/download/{type}
POST /v1/sandbox/signatures/{id}/remind
POST /v1/sandbox/signatures/{id}/cancel

Differences avec la production

AspectProductionSandbox
Facturation0.04 EUR/factureGratuit
Signature1.20 EUR/signatureGratuit
Rate limit60/min1000/min
Prefixe clesk_live_sk_test_
Envoi reelOuiNon (simule)

Webhooks entrants (providers)

Endpoints recevant les callbacks des fournisseurs externes.

EndpointProviderDescription
POST /webhooks/openapi/signatureOpenAPI.comCallback de signature electronique
POST /webhooks/superpdp/invoiceSuperPDPCallback de facturation PDP
POST /webhooks/superpdp/documentSuperPDPCallback de document
POST /webhooks/superpdpSuperPDPCallback generique

Ces endpoints ne sont pas destines a etre appeles par les integrateurs. Ils sont documentes a titre de reference technique.


Health Check

GET /api/health

Verification de disponibilite de l'API.

bash
curl -X GET https://api.scell.io/api/health

Reponse (200) :

json
{
  "status": "ok",
  "timestamp": "2026-01-15T10:30:00Z"
}

Resume des endpoints

SectionEndpointsAuthentification
Auth8Aucune / Bearer Token
Companies7Bearer Token
Invoices7API Key / Bearer Token
Signatures6API Key / Bearer Token
Credit Notes7Bearer Token
API Keys4Bearer Token
Balance4Bearer Token
Webhooks8Bearer Token
Incoming Invoices5Bearer Token
Tenant7Tenant Key
Sub-Tenants7Tenant Key
Tenant Invoices12Tenant Key
Tenant Credit Notes9Tenant Key
Tenant Billing7Tenant Key
Tenant Incoming Invoices6Tenant Key
KYB Documents6Tenant Key
Onboarding7Publishable Key
Fiscal20Tenant Key + scope
Admin16Bearer Token (admin)
MCP3API Key
Sandbox12API Key
Health1Aucune
Total~163

Documentation Scell.io