{"openapi":"3.1.0","jsonSchemaDialect":"https://spec.openapis.org/oas/3.1/dialect/base","info":{"title":"Gabon Eco API","version":"1.1.0","summary":"Données économiques, procédures, tarif douanier et institutions du Gabon.","description":"API publique en lecture seule du portail Gabon Eco (données économiques, procédures administratives, tarif douanier, institutions et fraîcheur des procédures), plus le point d'entrée signé réservé aux partenaires.\n\nSans clé : 60 requêtes par minute et par adresse IP. Avec une clé d'abonnement (en-tête X-Api-Key ou Authorization: Bearer) : 300 (basic) ou 600 (premium) requêtes par minute et par clé.\n\nLangue des textes : paramètre lang (fr par défaut, en). Enveloppe : {data, meta, links}. Erreurs : {error: {status, code, message, details}}.","contact":{"name":"Gabon Eco","url":"https://gaboneco.ga/contact"},"license":{"name":"Conditions de chaque producteur de données (Banque mondiale : CC BY 4.0)","identifier":"CC-BY-4.0"}},"servers":[{"url":"https://gaboneco.ga","description":"Gabon Eco"}],"tags":[{"name":"Données","description":"Secteurs, indicateurs, observations et zones géographiques."},{"name":"Procédures","description":"Procédures administratives publiées (format docs/procedure-schema.json) et leur fraîcheur."},{"name":"Tarif","description":"Lignes du tarif douanier en vigueur et droits applicables."},{"name":"Institutions","description":"Annuaire des institutions et de leurs points focaux publics."},{"name":"Partenaires","description":"Synchronisation entrante signée (HMAC-SHA256) et webhooks sortants."},{"name":"Spécification","description":"Ce document OpenAPI."}],"security":[{},{"ApiKeyHeader":[]},{"BearerKey":[]}],"paths":{"/api/v1/freshness":{"get":{"operationId":"freshnessIndex","tags":["Procédures"],"summary":"Fraîcheur des procédures","description":"Nombre de procédures à jour, à vérifier et obsolètes, au total, par catégorie et par institution responsable, et procédures à revoir prochainement.","parameters":[{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FreshnessResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/geographies":{"get":{"operationId":"geographiesIndex","tags":["Données"],"summary":"Zones géographiques","description":"Pays et provinces, avec les indicateurs disponibles pour chaque zone.","parameters":[{"in":"query","required":false,"name":"level","description":"Niveau : country ou province.","schema":{"type":"string","enum":["country","province"]}},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeographyListResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Paramètre invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/indicators":{"get":{"operationId":"indicatorsIndex","tags":["Données"],"summary":"Indicateurs","description":"Indicateurs avec source, unité, statut, dernière valeur et couverture.","parameters":[{"in":"query","required":false,"name":"sector","description":"Slug d'un secteur (branche complète).","schema":{"type":"string"}},{"$ref":"#/components/parameters/q"},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndicatorListResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Paramètre invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/indicators/{code}":{"get":{"operationId":"indicatorsShow","tags":["Données"],"summary":"Un indicateur","description":"Description complète d'un indicateur, méthodologie comprise.","parameters":[{"name":"code","in":"path","required":true,"description":"Code de l'indicateur (GDP_REAL_GROWTH).","schema":{"type":"string","pattern":"^[A-Za-z0-9_]+$"},"example":"GDP_REAL_GROWTH"},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IndicatorResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ressource inconnue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/indicators/{code}/observations":{"get":{"operationId":"indicatorsObservations","tags":["Données"],"summary":"Observations d'un indicateur","description":"Valeurs de la série par zone et période, en JSON ou en CSV (format=csv).","parameters":[{"name":"code","in":"path","required":true,"description":"Code de l'indicateur (GDP_REAL_GROWTH).","schema":{"type":"string","pattern":"^[A-Za-z0-9_]+$"},"example":"GDP_REAL_GROWTH"},{"in":"query","required":false,"name":"geo","description":"Codes de zones séparés par des virgules (GA, GA-1...).","schema":{"type":"string"},"example":"GA"},{"in":"query","required":false,"name":"from","description":"Début : année (2015), trimestre (2015-Q1) ou mois (2015-03).","schema":{"type":"string"}},{"in":"query","required":false,"name":"to","description":"Fin, même format que from.","schema":{"type":"string"}},{"in":"query","required":false,"name":"format","description":"json (par défaut) ou csv.","schema":{"type":"string","enum":["json","csv"],"default":"json"}},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Observations","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ObservationListResponse"}},"text/csv":{"schema":{"type":"string","description":"CSV UTF-8 avec en-tête (format=csv)."}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ressource inconnue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Paramètre invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/institutions":{"get":{"operationId":"institutionsIndex","tags":["Institutions"],"summary":"Institutions","description":"Annuaire des institutions publiées.","parameters":[{"in":"query","required":false,"name":"type","description":"Type d'institution.","schema":{"type":"string","enum":["ministry","directorate","agency","customs_office","one_stop_shop","public_body","court","chamber","regulator","regional_body","border_post","operator","bank","other"]}},{"in":"query","required":false,"name":"province","description":"Code de province (GA-1 à GA-9).","schema":{"type":"string"},"example":"GA-1"},{"$ref":"#/components/parameters/q"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionListResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Paramètre invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/institutions/{slug}":{"get":{"operationId":"institutionsShow","tags":["Institutions"],"summary":"Une institution","description":"Coordonnées, services, points focaux publics et procédures traitées.","parameters":[{"name":"slug","in":"path","required":true,"description":"Identifiant (slug) de la ressource.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InstitutionResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ressource inconnue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/openapi.json":{"get":{"operationId":"openapi","tags":["Spécification"],"summary":"Spécification OpenAPI 3.1","description":"Ce document, généré à partir du code (App\\Services\\Api\\OpenApiGenerator).","parameters":[{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Document OpenAPI 3.1","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenApiDocument"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/partners/sync":{"post":{"operationId":"partnersSync","tags":["Partenaires"],"summary":"Synchronisation entrante (partenaires)","description":"Réservé aux partenaires enregistrés (guichet unique, douane, chambres). Requête signée : X-Signature = \"sha256=\" suivi du HMAC-SHA256 hexadécimal de \"<X-Timestamp>.<corps brut>\" avec le secret du partenaire. X-Timestamp est un temps Unix en secondes, refusé s'il s'écarte de plus de 5 minutes de l'horloge du serveur. L'en-tête Idempotency-Key est obligatoire : une même clé renvoie la réponse initiale sans nouveau traitement.\n\nLes mises à jour de procédures deviennent des versions en brouillon soumises au circuit de validation, jamais publiées directement. Les modifications de lignes tarifaires deviennent des demandes en attente d'approbation par l'équipe (back-office). Chaque requête est journalisée.","parameters":[{"in":"header","name":"Idempotency-Key","required":true,"description":"Clé unique de la requête (1 à 120 caractères : lettres, chiffres, . _ : -).","schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,120}$"}},{"$ref":"#/components/parameters/lang"}],"security":[{"PartnerId":[],"PartnerTimestamp":[],"PartnerSignature":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncRequest"}}}},"responses":{"202":{"description":"Éléments acceptés (tous, ou une partie : voir meta.rejected).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SyncResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"400":{"description":"Requête mal formée (JSON invalide, Idempotency-Key absente)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Portée non autorisée pour ce partenaire","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Conflit (Idempotency-Key déjà utilisée avec un autre corps)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Aucun élément accepté (détail par élément), ou corps invalide (format Error).","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/SyncResponse"},{"$ref":"#/components/schemas/Error"}]}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/procedures":{"get":{"operationId":"proceduresIndex","tags":["Procédures"],"summary":"Procédures publiées","description":"Liste paginée des procédures publiées, avec leur statut de fraîcheur et leurs délais indicatifs.","parameters":[{"in":"query","required":false,"name":"category","description":"Catégorie : valeur interne ou slug d'URL (importation, exportation...).","schema":{"type":"string","enum":["import","export","customs_taxation","standards_certification","licences_permits","tariffs_taxes","company_creation","importation","exportation","dedouanement-fiscalite","normes-certifications","licences-autorisations","tarifs-taxes","creation-entreprise"]}},{"in":"query","required":false,"name":"regime","description":"Régime douanier.","schema":{"type":"string","enum":["import","export","transit","domestic"]}},{"in":"query","required":false,"name":"institution","description":"Slug d'une institution responsable ou chargée d'une étape.","schema":{"type":"string"}},{"in":"query","required":false,"name":"hs","description":"Code SH (2 à 10 chiffres) : procédures dont le champ produits couvre ce code.","schema":{"type":"string"},"example":"440710"},{"in":"query","required":false,"name":"freshness","description":"Statut de fraîcheur.","schema":{"type":"string","enum":["up_to_date","to_verify","obsolete"]}},{"$ref":"#/components/parameters/q"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureListResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Paramètre invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/procedures/{slug}":{"get":{"operationId":"proceduresShow","tags":["Procédures"],"summary":"Une procédure (document complet)","description":"Document de la procédure au format docs/procedure-schema.json : étapes, documents, frais, base légale, validation et fraîcheur. Les textes sont fournis dans toutes les langues disponibles.","parameters":[{"name":"slug","in":"path","required":true,"description":"Identifiant (slug) de la ressource.","schema":{"type":"string","pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"}},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcedureResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ressource inconnue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/sectors":{"get":{"operationId":"sectorsIndex","tags":["Données"],"summary":"Secteurs publiés","description":"Secteurs dans l'ordre de l'arborescence, avec le nombre d'indicateurs disponibles.","parameters":[{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SectorListResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/tariff-lines":{"get":{"operationId":"tariffLinesIndex","tags":["Tarif"],"summary":"Lignes tarifaires en vigueur","description":"Recherche par préfixe de code SH ou par mots de la désignation. is_official vaut false lorsque le classement n'est pas sourcé (données illustratives).","parameters":[{"in":"query","required":false,"name":"hs","description":"Préfixe de code SH (2523, 2523.29).","schema":{"type":"string"},"example":"2523"},{"$ref":"#/components/parameters/q"},{"$ref":"#/components/parameters/page"},{"$ref":"#/components/parameters/per_page"},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TariffLineListResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Paramètre invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}},"/api/v1/tariff-lines/{hs}":{"get":{"operationId":"tariffLinesShow","tags":["Tarif"],"summary":"Une ligne tarifaire et ses droits","description":"Ligne en vigueur pour ce code SH exact, avec les droits et taxes applicables à l'importation.","parameters":[{"name":"hs","in":"path","required":true,"description":"Code SH de la ligne tarifaire, 4 à 10 chiffres (points et espaces ignorés).","schema":{"type":"string"},"example":"25232900"},{"$ref":"#/components/parameters/lang"}],"responses":{"200":{"description":"Succès","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TariffLineResponse"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"X-Api-Tier":{"$ref":"#/components/headers/X-Api-Tier"}}},"401":{"description":"Clé d'API ou signature invalide","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Ressource inconnue","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Limite de requêtes atteinte","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"X-RateLimit-Limit":{"$ref":"#/components/headers/X-RateLimit-Limit"},"X-RateLimit-Remaining":{"$ref":"#/components/headers/X-RateLimit-Remaining"},"Retry-After":{"$ref":"#/components/headers/Retry-After"}}}}}}},"webhooks":{"procedure.published":{"post":{"operationId":"webhookProcedurePublished","tags":["Partenaires"],"summary":"Procédure publiée","security":[],"description":"Envoyé à chaque partenaire actif ayant la portée \"procedures\" lorsqu'une nouvelle version d'une procédure est publiée. Signé comme les requêtes entrantes (X-Timestamp, X-Signature avec le secret du partenaire) ; en-têtes X-Partner-Event et X-Delivery-Id. Toute réponse 2xx vaut accusé de réception ; sinon nouvel essai (5 tentatives, attente croissante de 10 s à 15 min).","parameters":[{"name":"X-Partner-Event","in":"header","required":true,"schema":{"const":"procedure.published"}},{"name":"X-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookProcedurePublished"}}}},"responses":{"200":{"description":"Notification reçue"}}}},"tariff_line.updated":{"post":{"operationId":"webhookTariffLineUpdated","tags":["Partenaires"],"summary":"Modification tarifaire approuvée","security":[],"description":"Envoyé à chaque partenaire actif ayant la portée \"tariffs\" lorsqu'une demande de modification tarifaire est approuvée. Signé comme les requêtes entrantes (X-Timestamp, X-Signature avec le secret du partenaire) ; en-têtes X-Partner-Event et X-Delivery-Id. Toute réponse 2xx vaut accusé de réception ; sinon nouvel essai (5 tentatives, attente croissante de 10 s à 15 min).","parameters":[{"name":"X-Partner-Event","in":"header","required":true,"schema":{"const":"tariff_line.updated"}},{"name":"X-Delivery-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Timestamp","in":"header","required":true,"schema":{"type":"string"}},{"name":"X-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookTariffLineUpdated"}}}},"responses":{"200":{"description":"Notification reçue"}}}}},"components":{"schemas":{"Procedure":{"title":"Gabon Eco procedure","description":"Machine-readable procedure exported by App\\Services\\Procedures\\ProcedureExporter and accepted by ProcedureWriter (bulk import, version snapshots). Translatable texts are objects keyed by language (fr required, en optional). Members marked computed are left out of version snapshots and ignored on import.","type":"object","required":["schema_version","slug","category","regime","title","product_scope","country_scope","steps","legal_basis","version","sources"],"properties":{"schema_version":{"const":"1.0"},"slug":{"type":"string","pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$"},"category":{"enum":["import","export","customs_taxation","standards_certification","licences_permits","tariffs_taxes","company_creation"]},"regime":{"enum":["import","export","transit","domestic",null]},"status":{"enum":["draft","in_review","published",null]},"title":{"$ref":"#/components/schemas/Procedure/$defs/text"},"summary":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"product_scope":{"description":"\"all\" or HS code prefix ranges (inclusive).","oneOf":[{"const":"all"},{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Procedure/$defs/hsRange"}}]},"country_scope":{"type":"object","required":["type","countries"],"properties":{"type":{"enum":["origin","destination","any"]},"countries":{"description":"\"all\" or ISO 3166-1 alpha-2 codes and country group codes (EU, CEMAC, CEEAC).","oneOf":[{"const":"all"},{"type":"array","minItems":1,"items":{"type":"string","pattern":"^[A-Z]{2,10}$"}}]}}},"responsible_institution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Procedure/$defs/institution"}]},"focal_point":{"description":"Public focal point only.","oneOf":[{"type":"null"},{"type":"object","required":["name"],"properties":{"name":{"type":"string","minLength":1},"role":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}}}]},"legal_basis":{"type":"array","items":{"type":"object","required":["slug","title"],"properties":{"slug":{"type":"string","minLength":1},"title":{"$ref":"#/components/schemas/Procedure/$defs/text"},"reference":{"type":["string","null"]},"type":{"type":["string","null"]},"url":{"type":["string","null"]},"superseded":{"type":"boolean"}}}},"prerequisites":{"type":"array","items":{"type":"string"}},"related_procedures":{"type":"array","items":{"type":"string"}},"steps":{"type":"array","minItems":1,"items":{"$ref":"#/components/schemas/Procedure/$defs/step"}},"indicative_summary":{"type":"object","properties":{"delay":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"cost":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"}}},"version":{"type":"integer","minimum":1},"validated_on":{"$ref":"#/components/schemas/Procedure/$defs/optionalDate"},"validated_by":{"type":["string","null"]},"next_review_on":{"$ref":"#/components/schemas/Procedure/$defs/optionalDate"},"freshness_override":{"oneOf":[{"type":"null"},{"type":"object","required":["status"],"properties":{"status":{"const":"obsolete"},"reason":{"type":["string","null"]}}}]},"bpmn_xml":{"type":["string","null"]},"sources":{"type":"array","items":{"$ref":"#/components/schemas/Procedure/$defs/source"}},"totals":{"description":"Computed: indicative totals over the steps (delays in days, fixed fees per currency as a min to max range).","type":"object","required":["steps","delay_min_days","delay_max_days","steps_without_delay","fixed_fees"],"properties":{"steps":{"type":"integer","minimum":0},"delay_min_days":{"type":"integer","minimum":0},"delay_max_days":{"type":"integer","minimum":0},"steps_without_delay":{"type":"integer","minimum":0},"fixed_fees":{"type":"array","items":{"type":"object","required":["currency","min","max"],"properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"min":{"type":"number","minimum":0},"max":{"type":"number","minimum":0}}}},"percentage_fees":{"type":"integer","minimum":0},"variable_fees":{"type":"integer","minimum":0},"official_fees_only":{"type":"boolean"}}},"freshness":{"description":"Computed.","type":"object","required":["status","label"],"properties":{"status":{"enum":["up_to_date","to_verify","obsolete"]},"label":{"$ref":"#/components/schemas/Procedure/$defs/text"}}},"url":{"description":"Computed: public page.","type":["string","null"]},"exported_at":{"description":"Computed.","type":"string","format":"date-time"}},"$defs":{"text":{"type":"object","required":["fr"],"properties":{"fr":{"type":"string","minLength":1},"en":{"type":"string"}},"additionalProperties":false},"optionalText":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Procedure/$defs/text"}]},"optionalDate":{"type":["string","null"],"pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"hsRange":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string","pattern":"^\\d{2,10}$"},"to":{"type":"string","pattern":"^\\d{2,10}$"}}},"institution":{"type":"object","required":["slug","name"],"properties":{"slug":{"type":"string","minLength":1},"name":{"$ref":"#/components/schemas/Procedure/$defs/text"},"acronym":{"type":["string","null"]}}},"source":{"type":"object","required":["title","url"],"properties":{"title":{"type":"string","minLength":1},"publisher":{"type":["string","null"]},"url":{"type":"string","pattern":"^https?://"},"retrieved_on":{"$ref":"#/components/schemas/Procedure/$defs/optionalDate"}}},"fee":{"type":"object","required":["label","amount","currency","basis","official"],"properties":{"label":{"$ref":"#/components/schemas/Procedure/$defs/text"},"amount":{"type":["number","null"],"description":"Amount in currency, or a rate in percent when basis is percentage."},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"basis":{"enum":["fixed","percentage","variable"]},"official":{"type":"boolean","description":"false: indicative, shown with the illustrative data label."},"source":{"type":["object","null"]}}},"step":{"type":"object","required":["position","title","channel","delay","documents","fees"],"properties":{"position":{"type":"integer","minimum":1},"title":{"$ref":"#/components/schemas/Procedure/$defs/text"},"description":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"authority":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"institution":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/Procedure/$defs/institution"}]},"channel":{"enum":["online","counter","both",null]},"location":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"delay":{"type":"object","required":["min_days","max_days","official"],"properties":{"min_days":{"type":["integer","null"],"minimum":0},"max_days":{"type":["integer","null"],"minimum":0},"label":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"official":{"type":"boolean"}}},"prerequisites":{"type":"array","items":{"type":"string"}},"url":{"type":["string","null"]},"documents":{"type":"array","items":{"type":"object","required":["slug","name"],"properties":{"slug":{"type":"string","minLength":1},"name":{"$ref":"#/components/schemas/Procedure/$defs/text"},"notes":{"$ref":"#/components/schemas/Procedure/$defs/optionalText"},"template_url":{"type":["string","null"]}}}},"fees":{"type":"array","items":{"$ref":"#/components/schemas/Procedure/$defs/fee"}}}}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["status","code","message"],"properties":{"status":{"type":"integer"},"code":{"type":"string","examples":["not_found","invalid_parameter","rate_limited","invalid_api_key","invalid_signature"]},"message":{"type":"string"},"details":{"type":"object"}}}}},"Meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"}}},"ListMeta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","count","total","page","per_page","pages","filters"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"count":{"type":"integer"},"total":{"type":"integer"},"page":{"type":"integer"},"per_page":{"type":"integer"},"pages":{"type":"integer"},"filters":{"type":["object","array"],"description":"Filtres appliqués (objet vide ou liste vide sans filtre)."}}},"ListLinks":{"type":"object","required":["self","first","last","prev","next"],"properties":{"self":{"type":"string"},"first":{"type":"string"},"last":{"type":"string"},"prev":{"type":["string","null"]},"next":{"type":["string","null"]}}},"Links":{"type":"object","additionalProperties":{"type":["string","null"]}},"Sector":{"type":"object","required":["slug","name","summary","parent","children","indicators_count","links"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"summary":{"type":["string","null"]},"parent":{"type":["string","null"]},"children":{"type":"array","items":{"type":"string"}},"indicators_count":{"type":"integer"},"links":{"type":"object","required":["indicators"],"properties":{"indicators":{"type":"string"}}}}},"SectorListResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Sector"}},"meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","count"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"count":{"type":"integer"}}},"links":{"$ref":"#/components/schemas/Links"}}},"Indicator":{"type":"object","required":["code","name","definition","sector","unit","frequency","source","status","last_updated","latest","coverage","is_key","is_demo","links"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"definition":{"type":["string","null"]},"sector":{"type":["object","null"],"required":["slug","name","group"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"group":{"type":["string","null"]}}},"unit":{"type":["object","null"],"required":["code","label","symbol","decimals"],"properties":{"code":{"type":"string"},"label":{"type":"string"},"symbol":{"type":["string","null"]},"decimals":{"type":"integer"}}},"frequency":{"type":["string","null"]},"source":{"type":["object","null"],"required":["name","short_name","url"],"properties":{"name":{"type":["string","null"]},"short_name":{"type":["string","null"]},"url":{"type":["string","null"]}}},"status":{"type":["string","null"]},"last_updated":{"type":["string","null"]},"latest":{"type":["object","null"],"required":["period","value","status","geography"],"properties":{"period":{"type":"string"},"value":{"type":["number","null"]},"status":{"type":"string"},"geography":{"type":["string","null"]}}},"coverage":{"type":["object","null"],"required":["from","to","observations","geographies"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"observations":{"type":"integer"},"geographies":{"type":"array","items":{"type":"string"}}}},"is_key":{"type":"boolean"},"is_demo":{"type":"boolean"},"links":{"type":"object","required":["self","observations","csv","explorer"],"properties":{"self":{"type":"string"},"observations":{"type":"string"},"csv":{"type":"string"},"explorer":{"type":"string"}}}}},"IndicatorDetail":{"type":"object","required":["code","name","definition","methodology","sector","unit","frequency","source","status","last_updated","latest","coverage","is_key","is_demo","links"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"definition":{"type":["string","null"]},"methodology":{"type":["string","null"]},"sector":{"type":["object","null"],"required":["slug","name","group"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"group":{"type":["string","null"]}}},"unit":{"type":["object","null"],"required":["code","label","symbol","decimals"],"properties":{"code":{"type":"string"},"label":{"type":"string"},"symbol":{"type":["string","null"]},"decimals":{"type":"integer"}}},"frequency":{"type":["string","null"]},"source":{"type":["object","null"],"required":["name","short_name","url"],"properties":{"name":{"type":["string","null"]},"short_name":{"type":["string","null"]},"url":{"type":["string","null"]}}},"status":{"type":["string","null"]},"last_updated":{"type":["string","null"]},"latest":{"type":["object","null"],"required":["period","value","status","geography"],"properties":{"period":{"type":"string"},"value":{"type":["number","null"]},"status":{"type":"string"},"geography":{"type":["string","null"]}}},"coverage":{"type":["object","null"],"required":["from","to","observations","geographies"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"observations":{"type":"integer"},"geographies":{"type":"array","items":{"type":"string"}}}},"is_key":{"type":"boolean"},"is_demo":{"type":"boolean"},"links":{"type":"object","required":["self","observations","csv","explorer"],"properties":{"self":{"type":"string"},"observations":{"type":"string"},"csv":{"type":"string"},"explorer":{"type":"string"}}}}},"IndicatorListResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Indicator"}},"meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","count","filters"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"count":{"type":"integer"},"filters":{"type":["object","array"],"description":"Filtres appliqués (objet vide ou liste vide sans filtre)."}}},"links":{"$ref":"#/components/schemas/Links"}}},"IndicatorResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"$ref":"#/components/schemas/IndicatorDetail"},"meta":{"$ref":"#/components/schemas/Meta"},"links":{"$ref":"#/components/schemas/Links"}}},"Observation":{"type":"object","required":["geography","geography_name","period","period_start","value","status","is_demo"],"properties":{"geography":{"type":["string","null"]},"geography_name":{"type":["string","null"]},"period":{"type":"string"},"period_start":{"type":["string","null"]},"value":{"type":["number","null"]},"status":{"type":"string"},"is_demo":{"type":"boolean"}}},"ObservationListResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Observation"}},"meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","indicator","unit","source","sources","status","last_updated","is_demo","count","filters"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"indicator":{"type":"object","required":["code","name","definition","frequency"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"definition":{"type":["string","null"]},"frequency":{"type":["string","null"]}}},"unit":{"description":"Unité de la série (code, libellé, symbole, décimales)."},"source":{"type":["object","null"],"required":["name","short_name","url"],"properties":{"name":{"type":["string","null"]},"short_name":{"type":["string","null"]},"url":{"type":["string","null"]}}},"sources":{"type":"array","items":{"type":"object","required":["name","short_name","url"],"properties":{"name":{"type":["string","null"]},"short_name":{"type":["string","null"]},"url":{"type":["string","null"]}}}},"status":{"type":["string","null"]},"last_updated":{"type":["string","null"]},"is_demo":{"type":"boolean"},"count":{"type":"integer"},"filters":{"type":["object","array"],"description":"Filtres appliqués (objet vide ou liste vide sans filtre)."}}},"links":{"$ref":"#/components/schemas/Links"}}},"Geography":{"type":"object","required":["code","name","level","parent","indicators"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"level":{"type":["string","null"]},"parent":{"type":["string","null"]},"indicators":{"type":"array","items":{"type":"string"}}}},"GeographyListResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Geography"}},"meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","count","level"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"count":{"type":"integer"},"level":{"type":["string","null"]}}},"links":{"$ref":"#/components/schemas/Links"}}},"Freshness":{"type":"object","required":["status","label"],"properties":{"status":{"type":"string","enum":["up_to_date","to_verify","obsolete"]},"label":{"type":"string"}}},"ProcedureSummary":{"type":"object","required":["slug","title","summary","category","category_slug","regime","product_scope","responsible_institution","steps_count","delay_days","version","validated_on","next_review_on","freshness","links"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"summary":{"type":["string","null"]},"category":{"type":["string","null"],"enum":["import","export","customs_taxation","standards_certification","licences_permits","tariffs_taxes","company_creation",null]},"category_slug":{"type":["string","null"]},"regime":{"type":["string","null"]},"product_scope":{"description":"\"all\" ou liste de plages de codes SH {from, to}.","anyOf":[{"const":"all"},{"type":"array","items":{"type":"object","required":["from","to"],"properties":{"from":{"type":"string"},"to":{"type":"string"}}}}]},"responsible_institution":{"type":["object","null"],"required":["slug","name","acronym"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"acronym":{"type":["string","null"]}}},"steps_count":{"type":"integer"},"delay_days":{"type":"object","required":["min","max"],"properties":{"min":{"type":["integer","null"]},"max":{"type":["integer","null"]}}},"version":{"type":"integer"},"validated_on":{"type":["string","null"],"format":"date"},"next_review_on":{"type":["string","null"],"format":"date"},"freshness":{"$ref":"#/components/schemas/Freshness"},"links":{"type":"object","required":["self","html"],"properties":{"self":{"type":"string"},"html":{"type":["string","null"]}}}}},"ProcedureListResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/ProcedureSummary"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"links":{"$ref":"#/components/schemas/ListLinks"}}},"ProcedureResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"$ref":"#/components/schemas/Procedure"},"meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","schema"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"schema":{"type":"string"}}},"links":{"$ref":"#/components/schemas/Links"}}},"TariffLine":{"type":"object","required":["hs_code","hs_formatted","chapter","description","unit","duty_category","vat_code","excise_code","export_status","notes","effective_from","effective_to","is_official","source","updated_at","links"],"properties":{"hs_code":{"type":"string","pattern":"^[0-9]{4,10}$"},"hs_formatted":{"type":"string"},"chapter":{"type":"string"},"description":{"type":"string"},"unit":{"type":["string","null"]},"duty_category":{"type":"string"},"vat_code":{"type":"string"},"excise_code":{"type":["string","null"]},"export_status":{"type":["string","null"]},"notes":{"type":["string","null"]},"effective_from":{"type":["string","null"]},"effective_to":{"type":["string","null"]},"is_official":{"type":"boolean","description":"false : classement non sourcé (données illustratives)."},"source":{"type":["object","null"],"required":["title","publisher","url","retrieved_on"],"properties":{"title":{"type":["string","null"]},"publisher":{"type":["string","null"]},"url":{"type":["string","null"]},"retrieved_on":{"type":["string","null"]}}},"updated_at":{"type":["string","null"]},"links":{"type":"object","required":["self"],"properties":{"self":{"type":"string"}}}}},"TariffLineDetail":{"type":"object","required":["hs_code","hs_formatted","chapter","description","unit","duty_category","vat_code","excise_code","export_status","notes","effective_from","effective_to","is_official","source","updated_at","links","levies"],"properties":{"hs_code":{"type":"string","pattern":"^[0-9]{4,10}$"},"hs_formatted":{"type":"string"},"chapter":{"type":"string"},"description":{"type":"string"},"unit":{"type":["string","null"]},"duty_category":{"type":"string"},"vat_code":{"type":"string"},"excise_code":{"type":["string","null"]},"export_status":{"type":["string","null"]},"notes":{"type":["string","null"]},"effective_from":{"type":["string","null"]},"effective_to":{"type":["string","null"]},"is_official":{"type":"boolean","description":"false : classement non sourcé (données illustratives)."},"source":{"type":["object","null"],"required":["title","publisher","url","retrieved_on"],"properties":{"title":{"type":["string","null"]},"publisher":{"type":["string","null"]},"url":{"type":["string","null"]},"retrieved_on":{"type":["string","null"]}}},"updated_at":{"type":["string","null"]},"links":{"type":"object","required":["self"],"properties":{"self":{"type":"string"}}},"levies":{"type":"array","items":{"$ref":"#/components/schemas/TariffLevy"}}}},"TariffLevy":{"type":"object","required":["code","name","kind","basis","rate","specific_amount","specific_unit","origin_rule","is_official"],"properties":{"code":{"type":"string"},"name":{"type":"string"},"kind":{"type":["string","null"]},"basis":{"type":["string","null"]},"rate":{"type":["number","null"]},"specific_amount":{"type":["number","null"]},"specific_unit":{"type":["string","null"]},"origin_rule":{"type":["object","null"],"required":["group","rule"],"properties":{"group":{"type":["string","null"]},"rule":{"type":["string","null"]}}},"is_official":{"type":"boolean"}}},"TariffLineListResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TariffLine"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"links":{"$ref":"#/components/schemas/ListLinks"}}},"TariffLineResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"$ref":"#/components/schemas/TariffLineDetail"},"meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","regime","date"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"regime":{"type":"string"},"date":{"type":"string"}}},"links":{"$ref":"#/components/schemas/Links"}}},"Institution":{"type":"object","required":["slug","name","acronym","type","parent","city","province","address","location","website","phone","email","is_placeholder","procedures_count","links"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"acronym":{"type":["string","null"]},"type":{"type":["string","null"]},"parent":{"type":["string","null"]},"city":{"type":["string","null"]},"province":{"type":["string","null"]},"address":{"type":["string","null"]},"location":{"type":["object","null"],"required":["lat","lon","precision"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"},"precision":{"type":["string","null"]}}},"website":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"is_placeholder":{"type":"boolean"},"procedures_count":{"type":"integer"},"links":{"type":"object","required":["self","html"],"properties":{"self":{"type":"string"},"html":{"type":["string","null"]}}}}},"InstitutionDetail":{"type":"object","required":["slug","name","acronym","type","parent","city","province","address","location","website","phone","email","is_placeholder","procedures_count","links","description","opening_hours","services","focal_points","procedures","sources"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"acronym":{"type":["string","null"]},"type":{"type":["string","null"]},"parent":{"type":["string","null"]},"city":{"type":["string","null"]},"province":{"type":["string","null"]},"address":{"type":["string","null"]},"location":{"type":["object","null"],"required":["lat","lon","precision"],"properties":{"lat":{"type":"number"},"lon":{"type":"number"},"precision":{"type":["string","null"]}}},"website":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"is_placeholder":{"type":"boolean"},"procedures_count":{"type":"integer"},"links":{"type":"object","required":["self","html"],"properties":{"self":{"type":"string"},"html":{"type":["string","null"]}}},"description":{"type":["string","null"]},"opening_hours":{"type":["string","null"]},"services":{"type":"array","items":{"type":"string"}},"focal_points":{"type":"array","items":{"type":"object","required":["name","role","email","phone"],"properties":{"name":{"type":"string"},"role":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]}}}},"procedures":{"type":"array","items":{"type":"object","required":["slug","title","role","links"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"role":{"type":"string","enum":["responsible","step"]},"links":{"type":"object","required":["self"],"properties":{"self":{"type":"string"}}}}}},"sources":{"type":"array","items":{"type":"object"}}}},"InstitutionListResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Institution"}},"meta":{"$ref":"#/components/schemas/ListMeta"},"links":{"$ref":"#/components/schemas/ListLinks"}}},"InstitutionResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"$ref":"#/components/schemas/InstitutionDetail"},"meta":{"$ref":"#/components/schemas/Meta"},"links":{"$ref":"#/components/schemas/Links"}}},"FreshnessCounts":{"type":"object","required":["up_to_date","to_verify","obsolete","total"],"properties":{"up_to_date":{"type":"integer"},"to_verify":{"type":"integer"},"obsolete":{"type":"integer"},"total":{"type":"integer"}}},"FreshnessSummary":{"type":"object","required":["totals","statuses","by_category","by_institution","due_soon","review_months","due_soon_days"],"properties":{"totals":{"$ref":"#/components/schemas/FreshnessCounts"},"statuses":{"type":"array","items":{"$ref":"#/components/schemas/Freshness"}},"by_category":{"type":"array","items":{"type":"object","required":["category","category_slug","label","counts"],"properties":{"category":{"type":"string"},"category_slug":{"type":"string"},"label":{"type":"string"},"counts":{"$ref":"#/components/schemas/FreshnessCounts"}}}},"by_institution":{"type":"array","items":{"type":"object","required":["institution","counts"],"properties":{"institution":{"type":["object","null"],"required":["slug","name","acronym"],"properties":{"slug":{"type":"string"},"name":{"type":"string"},"acronym":{"type":["string","null"]}}},"counts":{"$ref":"#/components/schemas/FreshnessCounts"}}}},"due_soon":{"type":"array","items":{"type":"object","required":["slug","title","next_review_on","links"],"properties":{"slug":{"type":"string"},"title":{"type":"string"},"next_review_on":{"type":["string","null"]},"links":{"type":"object","required":["self"],"properties":{"self":{"type":"string"}}}}}},"review_months":{"type":"integer"},"due_soon_days":{"type":"integer"}}},"FreshnessResponse":{"type":"object","required":["data","meta","links"],"properties":{"data":{"$ref":"#/components/schemas/FreshnessSummary"},"meta":{"type":"object","required":["api_version","locale","licence","attribution","documentation","date"],"properties":{"api_version":{"type":"string"},"locale":{"type":"string","enum":["fr","en"]},"licence":{"type":"string"},"attribution":{"type":"string"},"documentation":{"type":"string"},"date":{"type":"string"}}},"links":{"$ref":"#/components/schemas/Links"}}},"OpenApiDocument":{"type":"object","required":["openapi","info","paths"],"properties":{"openapi":{"type":"string","pattern":"^3\\.1\\.\\d+$"},"info":{"type":"object"},"paths":{"type":"object"}}},"TariffChangeInput":{"type":"object","required":["hs_code","changes"],"properties":{"hs_code":{"type":"string","description":"Code SH, 4 à 10 chiffres.","examples":["25232900"]},"action":{"type":"string","enum":["create","update","end"],"default":"update","description":"create : nouvelle ligne ; update : modification de champs ; end : fin de validité (effective_to)."},"changes":{"type":"object","description":"Valeurs proposées. Champs autorisés : description, keywords, unit, duty_category, vat_code, excise_code, export_status, notes, effective_from, effective_to. Les textes (description, keywords, notes) sont des objets {fr, en}.","properties":{"description":{"$ref":"#/components/schemas/TextMap"},"keywords":{"$ref":"#/components/schemas/TextMap"},"notes":{"$ref":"#/components/schemas/TextMap"},"unit":{"type":["string","null"]},"duty_category":{"type":"string","enum":["0","1","2","3","4"]},"vat_code":{"type":"string","enum":["standard","reduced","reduced_5","exempt"]},"excise_code":{"type":["string","null"]},"export_status":{"type":["string","null"],"enum":["banned","restricted",null]},"effective_from":{"type":["string","null"],"format":"date"},"effective_to":{"type":["string","null"],"format":"date"}},"additionalProperties":false},"effective_from":{"type":["string","null"],"format":"date","description":"Date d'effet annoncée par le partenaire (information)."},"reason":{"type":["string","null"],"maxLength":2000},"reference":{"type":["string","null"],"maxLength":120,"description":"Référence du partenaire, reprise dans le webhook."}}},"TextMap":{"type":"object","properties":{"fr":{"type":"string"},"en":{"type":"string"}},"additionalProperties":false},"ProcedureUpdateInput":{"type":"object","description":"Document de procédure au format Procedure. Pour une procédure existante, un document partiel suffit (au moins slug) : il est fusionné avec la version en ligne, et le résultat doit être valide. Une procédure nouvelle doit être complète.","required":["slug"],"properties":{"slug":{"type":"string"}}},"SyncRequest":{"type":"object","description":"Au moins une liste non vide ; 50 éléments au plus par liste.","properties":{"procedures":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/ProcedureUpdateInput"}},"tariff_lines":{"type":"array","maxItems":50,"items":{"$ref":"#/components/schemas/TariffChangeInput"}}}},"SyncItemError":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":["object","array"]}}},"SyncProcedureResult":{"type":"object","required":["index","status"],"properties":{"index":{"type":"integer"},"status":{"type":"string","enum":["accepted","rejected"]},"slug":{"type":["string","null"]},"is_new":{"type":"boolean"},"version":{"type":"integer"},"version_id":{"type":"integer"},"workflow_status":{"type":"string","description":"Statut de la version dans le circuit de validation (submitted)."},"error":{"$ref":"#/components/schemas/SyncItemError"}}},"SyncTariffResult":{"type":"object","required":["index","status"],"properties":{"index":{"type":"integer"},"status":{"type":"string","enum":["accepted","rejected"]},"hs_code":{"type":["string","null"]},"action":{"type":"string"},"request_id":{"type":"integer"},"review_status":{"type":"string","description":"Statut de la demande (pending)."},"error":{"$ref":"#/components/schemas/SyncItemError"}}},"SyncResponse":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","required":["procedures","tariff_lines"],"properties":{"procedures":{"type":"array","items":{"$ref":"#/components/schemas/SyncProcedureResult"}},"tariff_lines":{"type":"array","items":{"$ref":"#/components/schemas/SyncTariffResult"}}}},"meta":{"type":"object","required":["partner","idempotency_key","received_at","accepted","rejected","log_id"],"properties":{"partner":{"type":"string"},"idempotency_key":{"type":"string"},"received_at":{"type":"string"},"accepted":{"type":"integer"},"rejected":{"type":"integer"},"log_id":{"type":"integer"}}}}},"WebhookProcedurePublished":{"type":"object","required":["id","event","created_at","data"],"properties":{"id":{"type":"string","description":"Identifiant de livraison (aussi dans X-Delivery-Id)."},"event":{"const":"procedure.published"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","required":["slug","version","title","changed","validated_on","links"],"properties":{"slug":{"type":"string"},"version":{"type":"integer"},"title":{"$ref":"#/components/schemas/TextMap"},"changed":{"type":"array","items":{"type":"string"}},"validated_on":{"type":["string","null"]},"links":{"type":"object","required":["api","html"],"properties":{"api":{"type":"string"},"html":{"type":["string","null"]}}}}}}},"WebhookTariffLineUpdated":{"type":"object","required":["id","event","created_at","data"],"properties":{"id":{"type":"string","description":"Identifiant de livraison (aussi dans X-Delivery-Id)."},"event":{"const":"tariff_line.updated"},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","required":["hs_code","action","changes","effective_from","request_id","reference","origin_partner","approved_at","line","links"],"properties":{"hs_code":{"type":"string"},"action":{"type":"string"},"changes":{"type":["object","array"]},"effective_from":{"type":["string","null"]},"request_id":{"type":"integer"},"reference":{"type":["string","null"]},"origin_partner":{"type":["string","null"]},"approved_at":{"type":"string"},"line":{"anyOf":[{"$ref":"#/components/schemas/TariffLine"},{"type":"null"}]},"links":{"type":"object","required":["api"],"properties":{"api":{"type":["string","null"]}}}}}}}},"parameters":{"lang":{"name":"lang","in":"query","description":"Langue des textes (fr par défaut).","schema":{"type":"string","enum":["fr","en"],"default":"fr"}},"page":{"name":"page","in":"query","description":"Numéro de page, à partir de 1.","schema":{"type":"integer","minimum":1,"default":1}},"per_page":{"name":"per_page","in":"query","description":"Éléments par page (100 au plus).","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},"q":{"name":"q","in":"query","description":"Recherche plein texte, sans tenir compte des accents ni de la casse.","schema":{"type":"string","maxLength":200}}},"headers":{"X-RateLimit-Limit":{"description":"Requêtes autorisées par minute pour ce client.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requêtes restantes dans la minute en cours.","schema":{"type":"integer"}},"X-Api-Tier":{"description":"Palier appliqué : public, basic ou premium.","schema":{"type":"string","enum":["public","basic","premium"]}},"Retry-After":{"description":"Secondes avant de réessayer.","schema":{"type":"integer"}}},"securitySchemes":{"ApiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key","description":"Clé d'abonnement (ge_...) : quota par clé selon le plan (600 requêtes par minute en premium). Facultative."},"BearerKey":{"type":"http","scheme":"bearer","description":"La même clé d'abonnement dans Authorization: Bearer."},"PartnerId":{"type":"apiKey","in":"header","name":"X-Partner","description":"Slug du partenaire enregistré."},"PartnerTimestamp":{"type":"apiKey","in":"header","name":"X-Timestamp","description":"Temps Unix en secondes (écart maximal 300 s)."},"PartnerSignature":{"type":"apiKey","in":"header","name":"X-Signature","description":"sha256=<HMAC-SHA256 hexadécimal de \"<X-Timestamp>.<corps brut>\" avec le secret du partenaire>."}}}}