{
  "components" : {
    "schemas" : {
      "AddressDto" : {
        "properties" : {
          "city" : {
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "province" : {
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "street" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "ApiResponseListPlatformBusinessResponse" : {
        "properties" : {
          "data" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformBusinessResponse"
            },
            "type" : [ "array", "null" ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponseListPlatformInvoiceResponse" : {
        "properties" : {
          "data" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformInvoiceResponse"
            },
            "type" : [ "array", "null" ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponseListPlatformPointOfSaleResponse" : {
        "properties" : {
          "data" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformPointOfSaleResponse"
            },
            "type" : [ "array", "null" ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponseListPlatformReportResponse" : {
        "properties" : {
          "data" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformReportResponse"
            },
            "type" : [ "array", "null" ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformBatchResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformBatchResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformBusinessEndResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformBusinessEndResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformBusinessResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformBusinessResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformExportResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformExportResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformInvoiceResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformInvoiceResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformPointOfSaleResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformPointOfSaleResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformReportAccepted" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformReportAccepted"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformReportResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformReportResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "ApiResponsePlatformWebhookResponse" : {
        "properties" : {
          "data" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformWebhookResponse"
            }, {
              "type" : "null"
            } ]
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "object" : {
            "type" : "string"
          },
          "pagination" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PaginationMeta"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "JsonNode" : {
        "properties" : {
          "array" : {
            "type" : "boolean"
          },
          "big_decimal" : {
            "type" : "boolean"
          },
          "big_integer" : {
            "type" : "boolean"
          },
          "binary" : {
            "type" : "boolean"
          },
          "boolean" : {
            "type" : "boolean"
          },
          "container" : {
            "type" : "boolean"
          },
          "double" : {
            "type" : "boolean"
          },
          "embedded_value" : {
            "type" : "boolean"
          },
          "empty" : {
            "type" : "boolean"
          },
          "float" : {
            "type" : "boolean"
          },
          "floating_point_number" : {
            "type" : "boolean"
          },
          "int" : {
            "type" : "boolean"
          },
          "integral_number" : {
            "type" : "boolean"
          },
          "long" : {
            "type" : "boolean"
          },
          "missing_node" : {
            "type" : "boolean"
          },
          "node_type" : {
            "enum" : [ "ARRAY", "BINARY", "BOOLEAN", "MISSING", "NULL", "NUMBER", "OBJECT", "POJO", "STRING" ],
            "type" : "string"
          },
          "null" : {
            "type" : "boolean"
          },
          "number" : {
            "type" : "boolean"
          },
          "object" : {
            "type" : "boolean"
          },
          "pojo" : {
            "type" : "boolean"
          },
          "short" : {
            "type" : "boolean"
          },
          "string" : {
            "type" : "boolean"
          },
          "textual" : {
            "deprecated" : true,
            "type" : "boolean"
          },
          "value_node" : {
            "type" : "boolean"
          }
        },
        "type" : "object"
      },
      "LocationDto" : {
        "properties" : {
          "city" : {
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "province" : {
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "street" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PaginationMeta" : {
        "properties" : {
          "has_more" : {
            "type" : "boolean"
          },
          "limit" : {
            "format" : "int32",
            "type" : "integer"
          },
          "next_cursor" : {
            "type" : [ "string", "null" ]
          },
          "page" : {
            "format" : "int32",
            "type" : [ "integer", "null" ]
          },
          "prev_cursor" : {
            "type" : [ "string", "null" ]
          },
          "total_count" : {
            "format" : "int64",
            "type" : [ "integer", "null" ]
          },
          "total_pages" : {
            "format" : "int32",
            "type" : [ "integer", "null" ]
          }
        },
        "type" : "object"
      },
      "PartnerClient" : {
        "properties" : {
          "address" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "email" : {
            "format" : "email",
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "exemption_certificate" : {
            "description" : "La référence du certificat d’exonération, obligatoire pour un client AO (EXEMPTION_CERTIFICATE_REQUIRED) : c’est la ligne de commentaire A. Ignoré pour un autre client.",
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "name" : {
            "description" : "Le nom du client. Absent pour un client PP : un client anonyme, aucun nom n’est envoyé à la DGI et la facture imprime « Client Comptant ». Obligatoire pour PM, PC, PL et AO (CLIENT_NAME_REQUIRED).",
            "example" : "Jean Mukendi",
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "nif" : {
            "description" : "Le NIF du client : une lettre, 7 chiffres, une lettre. Obligatoire pour PM, PC et PL.",
            "example" : "A2030345G",
            "maxLength" : 32,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "phone" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "type" : {
            "description" : "PP, PM, PC, PL ou AO : les types de client de la DGI. Inconnu : INVALID_CLIENT_TYPE. Absent : PP, même avec un NIF : pour une entreprise, indiquez PM.",
            "example" : "PP",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PartnerCommentLines" : {
        "properties" : {
          "a" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "b" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "c" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "d" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "e" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "f" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "g" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "h" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PartnerCreateCreditNoteRequest" : {
        "properties" : {
          "client" : {
            "description" : "Un RRR sans facture d’origine seulement : comme sur une vente.",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerClient"
            }, {
              "type" : "null"
            } ]
          },
          "comment_lines" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerCommentLines"
            }, {
              "type" : "null"
            } ]
          },
          "currency" : {
            "description" : "Un RRR sans facture d’origine seulement : CDF ou USD. Ailleurs, c’est celle de la facture d’origine.",
            "example" : "CDF",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "exchange_rate" : {
            "description" : "Un RRR sans facture d’origine seulement : comme sur une vente.",
            "example" : 2800,
            "type" : [ "number", "null" ]
          },
          "external_reference" : {
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "format" : {
            "description" : "Accepté et ignoré : aucun PDF n'est produit pour vous.",
            "example" : "TICKET_80",
            "maxLength" : 20,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "items" : {
            "description" : "Les lignes créditées. Absent : toutes les lignes encore créditables, à ce qui reste. Obligatoire pour un RRR sans facture d’origine.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerCreditNoteItem"
            },
            "maxItems" : 1000,
            "minItems" : 0,
            "type" : [ "array", "null" ]
          },
          "notes" : {
            "maxLength" : 2000,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "operator_name" : {
            "description" : "Le nom du caissier transmis à la DGI. Absent : le nom commercial de l'entreprise, sinon sa raison sociale.",
            "example" : "Sarah Kabeya",
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "original_code_def" : {
            "description" : "La facture d'origine, par son Code DEF, avec ou sans tirets.",
            "example" : "TEST-FACT-URES-DORG-OFA3-YMSW",
            "maxLength" : 64,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "original_external_reference" : {
            "description" : "La facture d’origine, par votre external_reference.",
            "example" : "VENTE-2026-000123",
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "original_invoice_id" : {
            "description" : "La facture d'origine, par son identifiant. Une seule des trois formes. Obligatoire pour COR, RAN et RAM.",
            "example" : "inv_2xJ4",
            "maxLength" : 64,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "price_mode" : {
            "description" : "Un RRR sans facture d’origine seulement : comme sur une vente.",
            "example" : "ttc",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "reference_desc" : {
            "description" : "La raison de l’avoir, 90 caractères au plus. Obligatoire.",
            "example" : "Erreur de quantité sur le ticket",
            "maxLength" : 90,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "reference_type" : {
            "description" : "COR, RAN, RAM ou RRR : la nature de l’avoir pour la DGI. Obligatoire.",
            "example" : "COR",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "target" : {
            "description" : "Le point de vente ou le groupe qui normalise l’avoir. Absent : celui de la facture d’origine, sinon comme une vente.",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerTarget"
            }, {
              "type" : "null"
            } ]
          },
          "type" : {
            "description" : "FA ou EA. Absent : EA pour une facture d’exportation, sinon FA.",
            "example" : "FA",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PartnerCreateInvoiceRequest" : {
        "properties" : {
          "client" : {
            "description" : "Le client. Absent : un client anonyme de type PP, imprimé « Client Comptant ».",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerClient"
            }, {
              "type" : "null"
            } ]
          },
          "comment_lines" : {
            "description" : "Les lignes de commentaire A à H de la DGI, transmises et imprimées telles quelles, 250 caractères par ligne au plus. Absent : aucune ligne. Pour un client AO, la ligne A est client.exemption_certificate.",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerCommentLines"
            }, {
              "type" : "null"
            } ]
          },
          "currency" : {
            "maxLength" : 10,
            "minLength" : 0,
            "type" : "string"
          },
          "delivery" : {
            "description" : "Refusé (400 DELIVERY_NOT_AVAILABLE) : cette API n'envoie rien à vos clients, la remise de la facture est à votre charge.",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerDelivery"
            }, {
              "type" : "null"
            } ]
          },
          "entity_id" : {
            "description" : "Ancienne forme de target pour un point de vente. Absent : voir target.",
            "maxLength" : 64,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "exchange_rate" : {
            "description" : "La valeur en CDF de 1 USD (par exemple 2800), 12 chiffres avant la virgule et 6 après au plus. Obligatoire avec USD. C’est le taux que reçoit la DGI, imprimé sur la facture et repris en comptabilité. Absent : CURRENCY_RATE_REQUIRED. Nul ou négatif : CURRENCY_RATE_MUST_BE_POSITIVE. Trop de chiffres : CURRENCY_RATE_INVALID_FORMAT. Avec CDF, ne l’envoyez pas, même à 1 : CURRENCY_RATE_NOT_ALLOWED.",
            "example" : 2800,
            "type" : [ "number", "null" ]
          },
          "external_reference" : {
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "format" : {
            "description" : "Accepté et ignoré : aucun PDF n'est produit pour vous. Il n'apparaît jamais dans defaults_applied.",
            "example" : "TICKET_80",
            "maxLength" : 20,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "items" : {
            "items" : {
              "$ref" : "#/components/schemas/PartnerItem"
            },
            "maxItems" : 1000,
            "minItems" : 0,
            "type" : "array"
          },
          "notes" : {
            "maxLength" : 2000,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "operator_name" : {
            "description" : "Le nom du caissier transmis à la DGI et imprimé sur la facture, 100 caractères au plus. Absent : le nom commercial de l'entreprise, sinon sa raison sociale.",
            "example" : "Sarah Kabeya",
            "maxLength" : 100,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "payments" : {
            "description" : "Comment la vente a été réglée, tel que déclaré à la DGI : un ou plusieurs modes dont le total égale le total TTC de la facture (sinon PAYMENTS_TOTAL_MISMATCH). Absent ou vide : CREDIT pour tout le total, facture non payée.",
            "items" : {
              "$ref" : "#/components/schemas/PartnerPayment"
            },
            "maxItems" : 20,
            "minItems" : 0,
            "type" : [ "array", "null" ]
          },
          "price_mode" : {
            "description" : "ttc ou ht : le sens des prix unitaires. Absent : ttc. Une ligne en groupe M ou N passe toute la facture en ht, envoyé ou non.",
            "example" : "ttc",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "sale_time" : {
            "description" : "L’instant de la vente, conservé et rendu tel quel. Il n’est pas transmis à la DGI, qui n’a pas ce champ. Absent : rien ne le remplace.",
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "target" : {
            "description" : "Le point de vente qui normalise la facture (target.entity_id). Absent : n'importe quel point de vente actif de l'entreprise.",
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerTarget"
            }, {
              "type" : "null"
            } ]
          },
          "type" : {
            "description" : "Accepté et ignoré : une vente est toujours une facture de vente (FV). FA et EA sont refusés (400 CREDIT_NOTE_ROUTE_REQUIRED) : un avoir se crée avec POST /api/platform/v1/businesses/{business}/credit-notes.",
            "example" : "FV",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : "string"
          }
        },
        "required" : [ "currency", "items" ],
        "type" : "object"
      },
      "PartnerCreditNoteItem" : {
        "properties" : {
          "code" : {
            "description" : "RRR sans ligne d’origine seulement.",
            "maxLength" : 50,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "description" : {
            "description" : "RRR sans ligne d’origine seulement.",
            "maxLength" : 500,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "item_type" : {
            "description" : "RRR sans ligne d’origine seulement.",
            "example" : "BIE",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "original_item_id" : {
            "description" : "Non offert par cette API : désignez la ligne par position, qui est son index dans la facture d'origine, à partir de 1.",
            "example" : "itm_2xJ4",
            "maxLength" : 64,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "position" : {
            "description" : "La ligne de la facture d’origine, par sa place, à partir de 1 : celle de la ligne dans le corps qui a créé la facture.",
            "example" : 1,
            "format" : "int32",
            "type" : [ "integer", "null" ]
          },
          "quantity" : {
            "description" : "La quantité créditée, 3 décimales au plus, au plus ce qui reste sur la ligne. Absent : ce qui reste.",
            "example" : 1,
            "type" : [ "number", "null" ]
          },
          "tax_group" : {
            "description" : "RRR sans ligne d’origine seulement.",
            "example" : "B",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "unit" : {
            "description" : "RRR sans ligne d’origine seulement.",
            "maxLength" : 20,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "unit_price" : {
            "description" : "RRR seulement, 2 décimales au plus.",
            "example" : 500,
            "type" : [ "number", "null" ]
          }
        },
        "type" : "object"
      },
      "PartnerDelivery" : {
        "properties" : {
          "channels" : {
            "items" : {
              "maxLength" : 20,
              "minLength" : 0,
              "type" : "string"
            },
            "maxItems" : 5,
            "minItems" : 0,
            "type" : "array"
          },
          "recipient" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerRecipient"
            }, {
              "type" : "null"
            } ]
          }
        },
        "type" : "object"
      },
      "PartnerFeedBusiness" : {
        "properties" : {
          "external_id" : {
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PartnerFeedEvent" : {
        "properties" : {
          "business" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PartnerFeedBusiness"
            }, {
              "type" : "null"
            } ]
          },
          "data" : {
            "$ref" : "#/components/schemas/JsonNode"
          },
          "id" : {
            "type" : "string"
          },
          "occurred_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "position" : {
            "format" : "int64",
            "type" : "integer"
          },
          "subject_id" : {
            "type" : "string"
          },
          "subject_type" : {
            "type" : "string"
          },
          "type" : {
            "type" : "string"
          },
          "version" : {
            "format" : "int64",
            "type" : "integer"
          }
        },
        "type" : "object"
      },
      "PartnerItem" : {
        "properties" : {
          "code" : {
            "description" : "Le code article, transmis à la DGI et imprimé, 50 caractères au plus. Absent : aucun code.",
            "example" : "92891",
            "maxLength" : 50,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "description" : {
            "maxLength" : 500,
            "minLength" : 0,
            "type" : "string"
          },
          "discount_amount" : {
            "description" : "La remise en montant pour toute la ligne, deux décimales au plus, inférieure au montant de la ligne. Absent : aucune remise.",
            "example" : 500,
            "minimum" : 0,
            "type" : [ "number", "null" ]
          },
          "discount_percent" : {
            "description" : "La remise en pourcentage, de 0 à 100. Absent : aucune remise.",
            "example" : 10,
            "maximum" : 100,
            "minimum" : 0,
            "type" : [ "number", "null" ]
          },
          "discount_type" : {
            "description" : "% ou FIXED : le type de la remise sur la ligne. Absent : déduit du champ de remise envoyé. À la DGI, le prix remisé, le prix d’origine et le libellé de la remise en découlent.",
            "example" : "%",
            "maxLength" : 5,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "item_type" : {
            "description" : "BIE (bien), SER (service) ou TAX (taxes et redevances, groupes L et N seulement). Inconnu : INVALID_ARTICLE_TYPE. Absent : BIE.",
            "example" : "BIE",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "quantity" : {
            "type" : "number"
          },
          "tax_group" : {
            "description" : "Le groupe de taxation de la DGI. Absent : B si l’entreprise est assujettie à la TVA, sinon A. Pour un client AO, toujours D.",
            "example" : "B",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "tax_specific_amount" : {
            "description" : "Le montant de la taxe spécifique pour toute la quantité. Absent : aucune taxe spécifique.",
            "example" : 230,
            "minimum" : 0,
            "type" : [ "number", "null" ]
          },
          "tax_specific_value" : {
            "description" : "La taxe spécifique par unité (230) ou en pourcentage (10%). Obligatoire avec tax_specific_amount. Absent : aucune taxe spécifique.",
            "example" : "230",
            "maxLength" : 50,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "unit" : {
            "description" : "L’unité, transmise à la DGI et imprimée, 20 caractères au plus. Absent : aucune unité.",
            "example" : "kg",
            "maxLength" : 20,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "unit_price" : {
            "type" : "number"
          }
        },
        "required" : [ "description" ],
        "type" : "object"
      },
      "PartnerPayment" : {
        "properties" : {
          "amount" : {
            "description" : "Le montant dans la devise de la facture, deux décimales au plus.",
            "example" : 5000,
            "type" : "number"
          },
          "currency" : {
            "description" : "La devise du montant : celle de la facture, ou absent. Une autre : PAYMENT_CURRENCY_MISMATCH.",
            "example" : "CDF",
            "maxLength" : 10,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "method" : {
            "description" : "ESPECES, VIREMENT, CARTEBANCAIRE, MOBILEMONEY, CHEQUES, CREDIT ou AUTRE : les modes de la DGI. Inconnu : INVALID_PAYMENT_METHOD. CREDIT seul vaut pour tout le total.",
            "example" : "ESPECES",
            "maxLength" : 20,
            "minLength" : 0,
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PartnerRecipient" : {
        "properties" : {
          "email" : {
            "format" : "email",
            "maxLength" : 255,
            "minLength" : 0,
            "type" : "string"
          },
          "name" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PartnerTarget" : {
        "properties" : {
          "entity_id" : {
            "maxLength" : 64,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "group_id" : {
            "maxLength" : 64,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PlatformBatchFieldError" : {
        "properties" : {
          "field" : {
            "type" : "string"
          },
          "message" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformBatchItemError" : {
        "properties" : {
          "code" : {
            "type" : "string"
          },
          "conflicting_field" : {
            "type" : [ "string", "null" ]
          },
          "conflicting_value" : {
            "oneOf" : [ { }, {
              "type" : "null"
            } ]
          },
          "field_errors" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformBatchFieldError"
            },
            "type" : [ "array", "null" ]
          },
          "max_group_size" : {
            "format" : "int32",
            "type" : [ "integer", "null" ]
          },
          "message" : {
            "type" : "string"
          },
          "retry_after_seconds" : {
            "format" : "int64",
            "type" : [ "integer", "null" ]
          },
          "suggestion" : {
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PlatformBatchItemResult" : {
        "properties" : {
          "error" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformBatchItemError"
            }, {
              "type" : "null"
            } ]
          },
          "http_status" : {
            "format" : "int32",
            "type" : "integer"
          },
          "index" : {
            "format" : "int32",
            "type" : "integer"
          },
          "invoice" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformInvoiceResponse"
            }, {
              "type" : "null"
            } ]
          },
          "retryable" : {
            "type" : "boolean"
          },
          "status" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformBatchResponse" : {
        "properties" : {
          "accepted" : {
            "format" : "int32",
            "type" : "integer"
          },
          "rejected" : {
            "format" : "int32",
            "type" : "integer"
          },
          "replayed" : {
            "format" : "int32",
            "type" : "integer"
          },
          "results" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformBatchItemResult"
            },
            "type" : "array"
          }
        },
        "type" : "object"
      },
      "PlatformBusinessEndResponse" : {
        "properties" : {
          "ended_at" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "external_id" : {
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : "string"
          },
          "queue_held" : {
            "type" : "boolean"
          },
          "status" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformBusinessResponse" : {
        "properties" : {
          "created_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "external_id" : {
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : "string"
          },
          "legal_name" : {
            "type" : "string"
          },
          "nif" : {
            "type" : [ "string", "null" ]
          },
          "normalisation_ready" : {
            "type" : "boolean"
          },
          "points_of_sale_count" : {
            "format" : "int32",
            "type" : "integer"
          },
          "status" : {
            "type" : "string"
          },
          "trade_name" : {
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PlatformCreateBusinessRequest" : {
        "properties" : {
          "address" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/AddressDto"
            }, {
              "type" : "null"
            } ]
          },
          "email" : {
            "format" : "email",
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "external_id" : {
            "maxLength" : 128,
            "minLength" : 0,
            "pattern" : "^[A-Za-z0-9._:@-]+$",
            "type" : "string"
          },
          "legal_name" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : "string"
          },
          "nif" : {
            "minLength" : 1,
            "type" : "string"
          },
          "phone" : {
            "type" : [ "string", "null" ]
          },
          "rccm" : {
            "maxLength" : 50,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "trade_name" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "required" : [ "external_id", "legal_name", "nif" ],
        "type" : "object"
      },
      "PlatformCreatePointOfSaleRequest" : {
        "properties" : {
          "address" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/LocationDto"
            }, {
              "type" : "null"
            } ]
          },
          "dgi_token" : {
            "maxLength" : 2000,
            "minLength" : 0,
            "type" : "string"
          },
          "name" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : "string"
          },
          "nid" : {
            "minLength" : 1,
            "type" : "string"
          },
          "phone" : {
            "type" : [ "string", "null" ]
          },
          "time_zone" : {
            "maxLength" : 64,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "required" : [ "dgi_token", "name", "nid" ],
        "type" : "object"
      },
      "PlatformCreateReportRequest" : {
        "properties" : {
          "period_end" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "period_start" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "point_of_sale" : {
            "maxLength" : 32,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "type" : {
            "maxLength" : 12,
            "minLength" : 0,
            "type" : "string"
          }
        },
        "required" : [ "type" ],
        "type" : "object"
      },
      "PlatformEventsResponse" : {
        "properties" : {
          "data" : {
            "items" : {
              "$ref" : "#/components/schemas/PartnerFeedEvent"
            },
            "type" : "array"
          },
          "meta" : {
            "$ref" : "#/components/schemas/ResponseMeta"
          },
          "next_after" : {
            "format" : "int64",
            "type" : "integer"
          },
          "object" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformExportResponse" : {
        "properties" : {
          "available_until" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "business_id" : {
            "type" : "string"
          },
          "error_code" : {
            "type" : [ "string", "null" ]
          },
          "error_message" : {
            "type" : [ "string", "null" ]
          },
          "file_size_bytes" : {
            "format" : "int64",
            "type" : [ "integer", "null" ]
          },
          "id" : {
            "type" : "string"
          },
          "ready_at" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "requested_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "state" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformInvoiceClient" : {
        "properties" : {
          "address" : {
            "type" : [ "string", "null" ]
          },
          "name" : {
            "type" : "string"
          },
          "nif" : {
            "type" : [ "string", "null" ]
          },
          "phone" : {
            "type" : [ "string", "null" ]
          },
          "type" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformInvoiceCommentLine" : {
        "properties" : {
          "label" : {
            "type" : [ "string", "null" ]
          },
          "line" : {
            "type" : "string"
          },
          "text" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformInvoiceIssuer" : {
        "properties" : {
          "id_nat" : {
            "type" : [ "string", "null" ]
          },
          "name" : {
            "type" : "string"
          },
          "nif" : {
            "type" : [ "string", "null" ]
          },
          "pos_address" : {
            "type" : [ "string", "null" ]
          },
          "pos_email" : {
            "type" : [ "string", "null" ]
          },
          "pos_name" : {
            "type" : [ "string", "null" ]
          },
          "pos_phone" : {
            "type" : [ "string", "null" ]
          },
          "rccm" : {
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PlatformInvoiceLine" : {
        "properties" : {
          "code" : {
            "type" : [ "string", "null" ]
          },
          "description" : {
            "type" : "string"
          },
          "discount_amount" : {
            "type" : [ "number", "null" ]
          },
          "discount_percent" : {
            "type" : [ "number", "null" ]
          },
          "discount_type" : {
            "type" : [ "string", "null" ]
          },
          "index" : {
            "format" : "int32",
            "type" : "integer"
          },
          "item_type" : {
            "type" : "string"
          },
          "modified_unit_price" : {
            "type" : [ "number", "null" ]
          },
          "price_modification_label" : {
            "type" : [ "string", "null" ]
          },
          "quantity" : {
            "type" : "number"
          },
          "tax_group" : {
            "type" : "string"
          },
          "tax_rate" : {
            "type" : [ "number", "null" ]
          },
          "tax_specific_amount" : {
            "type" : [ "number", "null" ]
          },
          "tax_specific_value" : {
            "type" : [ "string", "null" ]
          },
          "tax_sub_type" : {
            "type" : [ "string", "null" ]
          },
          "total" : {
            "type" : "number"
          },
          "unit" : {
            "type" : [ "string", "null" ]
          },
          "unit_price" : {
            "type" : "number"
          }
        },
        "type" : "object"
      },
      "PlatformInvoicePayment" : {
        "properties" : {
          "amount" : {
            "type" : "number"
          },
          "method" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformInvoiceResponse" : {
        "properties" : {
          "business" : {
            "$ref" : "#/components/schemas/PartnerFeedBusiness"
          },
          "client" : {
            "$ref" : "#/components/schemas/PlatformInvoiceClient"
          },
          "code_def_dgi" : {
            "type" : [ "string", "null" ]
          },
          "comment_lines" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformInvoiceCommentLine"
            },
            "type" : "array"
          },
          "counters" : {
            "type" : [ "string", "null" ]
          },
          "created_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "currency" : {
            "type" : "string"
          },
          "defaults_applied" : {
            "items" : {
              "type" : "string"
            },
            "type" : "array"
          },
          "dgi_date_time" : {
            "type" : [ "string", "null" ]
          },
          "exchange_rate" : {
            "type" : [ "number", "null" ]
          },
          "exchange_rate_date" : {
            "format" : "date",
            "type" : [ "string", "null" ]
          },
          "external_reference" : {
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : "string"
          },
          "invoice_date" : {
            "format" : "date",
            "type" : "string"
          },
          "isf" : {
            "type" : [ "string", "null" ]
          },
          "issuer" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/PlatformInvoiceIssuer"
            }, {
              "type" : "null"
            } ]
          },
          "lines" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformInvoiceLine"
            },
            "type" : [ "array", "null" ]
          },
          "lines_omitted" : {
            "type" : [ "boolean", "null" ]
          },
          "nid" : {
            "type" : [ "string", "null" ]
          },
          "normalisation_status" : {
            "type" : "string"
          },
          "normalised_at" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "notes" : {
            "type" : [ "string", "null" ]
          },
          "number" : {
            "type" : [ "string", "null" ]
          },
          "operator_name" : {
            "type" : [ "string", "null" ]
          },
          "original_invoice_id" : {
            "type" : [ "string", "null" ]
          },
          "original_invoice_number" : {
            "type" : [ "string", "null" ]
          },
          "payment_status" : {
            "type" : [ "string", "null" ]
          },
          "payments" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformInvoicePayment"
            },
            "type" : "array"
          },
          "price_mode" : {
            "type" : "string"
          },
          "qr_code" : {
            "type" : [ "string", "null" ]
          },
          "read_by_reference" : {
            "type" : [ "string", "null" ]
          },
          "reason" : {
            "type" : [ "string", "null" ]
          },
          "reason_code" : {
            "type" : [ "string", "null" ]
          },
          "reference_code" : {
            "type" : [ "string", "null" ]
          },
          "reference_desc" : {
            "type" : [ "string", "null" ]
          },
          "reference_type" : {
            "type" : [ "string", "null" ]
          },
          "sale_time" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "tax_breakdown" : {
            "items" : {
              "$ref" : "#/components/schemas/PlatformTaxBreakdownRow"
            },
            "type" : "array"
          },
          "total_ht" : {
            "type" : "number"
          },
          "total_tax_specific" : {
            "type" : "number"
          },
          "total_ttc" : {
            "type" : "number"
          },
          "total_vat" : {
            "type" : "number"
          },
          "type" : {
            "type" : [ "string", "null" ]
          },
          "vat_liable" : {
            "type" : "boolean"
          }
        },
        "type" : "object"
      },
      "PlatformPointOfSaleResponse" : {
        "properties" : {
          "business_id" : {
            "type" : "string"
          },
          "created_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "id" : {
            "type" : "string"
          },
          "name" : {
            "type" : "string"
          },
          "nid" : {
            "type" : "string"
          },
          "nim" : {
            "type" : [ "string", "null" ]
          },
          "pos_code" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string"
          },
          "time_zone" : {
            "type" : "string"
          },
          "token_expires_at" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "token_status" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformPutWebhookRequest" : {
        "properties" : {
          "url" : {
            "maxLength" : 2048,
            "minLength" : 0,
            "type" : "string"
          }
        },
        "required" : [ "url" ],
        "type" : "object"
      },
      "PlatformReplaceTokenRequest" : {
        "properties" : {
          "dgi_token" : {
            "maxLength" : 2000,
            "minLength" : 0,
            "type" : "string"
          }
        },
        "required" : [ "dgi_token" ],
        "type" : "object"
      },
      "PlatformReportAccepted" : {
        "properties" : {
          "id" : {
            "type" : "string"
          },
          "state" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformReportResponse" : {
        "properties" : {
          "business_id" : {
            "type" : "string"
          },
          "created_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "dgi_report_id" : {
            "type" : [ "string", "null" ]
          },
          "error_code" : {
            "type" : [ "string", "null" ]
          },
          "error_message" : {
            "type" : [ "string", "null" ]
          },
          "finished_at" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : "string"
          },
          "local_date" : {
            "format" : "date",
            "type" : [ "string", "null" ]
          },
          "nid" : {
            "type" : [ "string", "null" ]
          },
          "origin" : {
            "type" : "string"
          },
          "period_end" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "period_start" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "point_of_sale" : {
            "type" : [ "string", "null" ]
          },
          "session_number" : {
            "format" : "int32",
            "type" : [ "integer", "null" ]
          },
          "state" : {
            "type" : "string"
          },
          "total_articles" : {
            "format" : "int32",
            "type" : [ "integer", "null" ]
          },
          "total_ht" : {
            "type" : [ "number", "null" ]
          },
          "total_invoices" : {
            "format" : "int32",
            "type" : [ "integer", "null" ]
          },
          "total_ttc" : {
            "type" : [ "number", "null" ]
          },
          "total_vat" : {
            "type" : [ "number", "null" ]
          },
          "type" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "PlatformTaxBreakdownRow" : {
        "properties" : {
          "base_ht" : {
            "type" : "number"
          },
          "group" : {
            "type" : "string"
          },
          "rate" : {
            "type" : "number"
          },
          "tax_specific_amount" : {
            "type" : "number"
          },
          "total_ttc" : {
            "type" : "number"
          },
          "vat_amount" : {
            "type" : "number"
          }
        },
        "type" : "object"
      },
      "PlatformUpdateBusinessRequest" : {
        "properties" : {
          "address" : {
            "oneOf" : [ {
              "$ref" : "#/components/schemas/AddressDto"
            }, {
              "type" : "null"
            } ]
          },
          "email" : {
            "format" : "email",
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "nif" : {
            "type" : [ "string", "null" ]
          },
          "phone" : {
            "type" : [ "string", "null" ]
          },
          "rccm" : {
            "maxLength" : 50,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          },
          "trade_name" : {
            "maxLength" : 255,
            "minLength" : 0,
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      },
      "PlatformWebhookResponse" : {
        "properties" : {
          "created_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "failing_since" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "id" : {
            "type" : "string"
          },
          "last_delivered_at" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "previous_secret_until" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          },
          "secret" : {
            "type" : [ "string", "null" ]
          },
          "status" : {
            "type" : "string"
          },
          "updated_at" : {
            "format" : "date-time",
            "type" : "string"
          },
          "url" : {
            "type" : "string"
          }
        },
        "type" : "object"
      },
      "ResponseMeta" : {
        "properties" : {
          "processing_time_ms" : {
            "format" : "int64",
            "type" : [ "integer", "null" ]
          },
          "request_id" : {
            "type" : "string"
          },
          "timestamp" : {
            "format" : "date-time",
            "type" : [ "string", "null" ]
          }
        },
        "type" : "object"
      }
    },
    "securitySchemes" : {
      "BearerAuth" : {
        "description" : "Your platform key, sent as `Authorization: Bearer <key>`.",
        "scheme" : "bearer",
        "type" : "http"
      }
    }
  },
  "info" : {
    "description" : "Register your customers' businesses and points of sale, send their invoices and credit notes for normalisation by the DGI, and read back everything needed to print them.\n\nAuthenticate every call with your key: `Authorization: Bearer <key>`. Test keys work on the test environment only, live keys on production only.\n\nEnregistrez les entreprises et les points de vente de vos clients, envoyez leurs factures et leurs avoirs à la normalisation par la DGI, et relisez tout ce qu'il faut pour les imprimer.",
    "title" : "Platform API",
    "version" : "1"
  },
  "openapi" : "3.1.0",
  "paths" : {
    "/api/platform/v1/businesses" : {
      "get" : {
        "description" : "Your businesses, oldest first, 50 a page by default and 100 at most. Pass the `next_cursor` of a page as `cursor` of the next one. A business whose 90-day read window after its end has closed is no longer listed.\n\nVos entreprises, de la plus ancienne à la plus récente, 50 par page par défaut et 100 au plus. Passez le `next_cursor` d'une page en `cursor` de la suivante. Une entreprise dont la période de lecture de 90 jours après sa fin est close n'est plus listée.",
        "operationId" : "list",
        "parameters" : [ {
          "in" : "query",
          "name" : "cursor",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "limit",
          "required" : false,
          "schema" : {
            "default" : 50,
            "format" : "int32",
            "type" : "integer"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponseListPlatformBusinessResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List your businesses",
        "tags" : [ "Platform - Businesses" ]
      },
      "post" : {
        "description" : "Registers one of your customers under your account. `external_id` is your own identifier: it is unique among your businesses, and sending it again answers the same business with 200 and `Idempotent-Replayed: true` instead of creating another one. A NIF already known to us, for any customer, is refused with 409 `NIF_ALREADY_REGISTERED`: contact us.\n\nEnregistre un de vos clients sous votre compte. `external_id` est votre propre identifiant : il est unique parmi vos entreprises, et le renvoyer répond la même entreprise avec un 200 et `Idempotent-Replayed: true` au lieu d'en créer une autre. Un NIF déjà connu chez nous, pour quelque client que ce soit, est refusé par un 409 `NIF_ALREADY_REGISTERED` : contactez-nous.",
        "operationId" : "create",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PlatformCreateBusinessRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformBusinessResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Create a business",
        "tags" : [ "Platform - Businesses" ]
      }
    },
    "/api/platform/v1/businesses/{business}" : {
      "get" : {
        "description" : "`{business}` is our id (`biz_...`) or yours, written `ext:<external_id>`. `normalisation_ready` says whether at least one point of sale holds a DGI token that can normalise today.\n\n`{business}` est notre identifiant (`biz_...`) ou le vôtre, écrit `ext:<external_id>`. `normalisation_ready` dit si au moins un point de vente détient un jeton DGI capable de normaliser aujourd'hui.",
        "operationId" : "get_1",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformBusinessResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read a business",
        "tags" : [ "Platform - Businesses" ]
      },
      "patch" : {
        "description" : "Only the fields you send change; an `address` replaces the whole address. `nif` and `rccm` are fill-once: repeating the current value is accepted, any other value answers 409 `BUSINESS_IDENTIFIER_LOCKED`. Setting an `rccm` takes from the same small rate limit as creating a business. Refused once the business has ended.\n\nSeuls les champs envoyés changent ; une `address` remplace toute l'adresse. `nif` et `rccm` ne se remplissent qu'une fois : répéter la valeur actuelle est accepté, toute autre valeur répond 409 `BUSINESS_IDENTIFIER_LOCKED`. Fixer un `rccm` prend sur la même petite limite de débit que créer une entreprise. Refusé une fois l'entreprise terminée.",
        "operationId" : "update",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PlatformUpdateBusinessRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformBusinessResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Update a business",
        "tags" : [ "Platform - Businesses" ]
      }
    },
    "/api/platform/v1/businesses/{business}/credit-notes" : {
      "post" : {
        "description" : "A credit note (FA, or EA for an export) on an invoice we hold, named by `original_invoice_id`, `original_code_def` or `original_external_reference`. Lines by `original_item_id` or `position`; left out, every line still creditable, at what remains. `reference_type` (COR, RAN, RAM or RRR) and `reference_desc` are required. If the original is still in the queue the credit note waits behind it; if the original fails for good, the credit note fails too. Same answers and same idempotency rule as an invoice.\n\nUn avoir (FA, ou EA pour une exportation) sur une facture que nous détenons, désignée par `original_invoice_id`, `original_code_def` ou `original_external_reference`. Lignes par `original_item_id` ou `position` ; omises, toutes les lignes encore créditables, à ce qui reste. `reference_type` (COR, RAN, RAM ou RRR) et `reference_desc` sont obligatoires. Si la facture d'origine est encore en file, l'avoir attend derrière elle ; si elle échoue définitivement, l'avoir échoue aussi. Mêmes réponses et même règle d'idempotence qu'une facture.",
        "operationId" : "createCreditNote",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "header",
          "name" : "Idempotency-Key",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PartnerCreateCreditNoteRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformInvoiceResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Create a credit note",
        "tags" : [ "Platform - Invoices" ]
      }
    },
    "/api/platform/v1/businesses/{business}/end" : {
      "post" : {
        "description" : "The business leaves your account. New invoices are refused with 409 `BUSINESS_ENDED`, invoices already accepted are still normalised, a final Z closes each point of sale that has sold since its last Z, and reads, reports and exports stay open for 90 days, then the business answers 404. Repeating it answers the same and emits nothing more. Emits `business.ended`.\n\nL'entreprise quitte votre compte. Les nouvelles factures sont refusées par un 409 `BUSINESS_ENDED`, celles déjà acceptées sont toujours normalisées, un Z final clôt chaque point de vente qui a vendu depuis son dernier Z, et la lecture, les rapports et les exports restent ouverts 90 jours, après quoi l'entreprise répond 404. Le répéter répond la même chose et n'émet rien de plus. Émet `business.ended`.",
        "operationId" : "end",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformBusinessEndResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "End a business",
        "tags" : [ "Platform - Businesses" ]
      }
    },
    "/api/platform/v1/businesses/{business}/exports" : {
      "post" : {
        "description" : "Builds in the background a zip with the business's invoices and credit notes (everything needed to print them again), their lines, its points of sale and its X, Z and A reports, as CSV, with a read-me. Answers 202. A request within a few hours of a finished export answers that one, as does one under way, an export your staff asked for in the Ripa console included (its `id` starts `pcxp_` instead of `prxp_`). An `Idempotency-Key` is required. Open for 90 days after the business ends.\n\nConstruit en arrière-plan un zip contenant les factures et avoirs de l'entreprise (tout ce qu'il faut pour les réimprimer), leurs lignes, ses points de vente et ses rapports X, Z et A, en CSV, avec un fichier LISEZ-MOI. Répond 202. Une demande faite peu d'heures après un export terminé reçoit celui-là, de même qu'un export en cours, y compris un export que votre équipe a demandé dans la console Ripa (son `id` commence par `pcxp_` au lieu de `prxp_`). Une `Idempotency-Key` est obligatoire. Ouvert pendant 90 jours après la fin de l'entreprise.",
        "operationId" : "create_3",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "202" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformExportResponse"
                }
              }
            },
            "description" : "Accepted"
          }
        },
        "summary" : "Ask for the full export of a business",
        "tags" : [ "Platform - Exports" ]
      }
    },
    "/api/platform/v1/businesses/{business}/exports/{export}" : {
      "get" : {
        "description" : "`state` is `queued`, `running`, `ready` or `failed`. A ready export is downloadable until `available_until`, 7 days after it was built.\n\n`state` vaut `queued`, `running`, `ready` ou `failed`. Un export prêt se télécharge jusqu'à `available_until`, 7 jours après sa construction.",
        "operationId" : "get_3",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "export",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformExportResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read an export's state",
        "tags" : [ "Platform - Exports" ]
      }
    },
    "/api/platform/v1/businesses/{business}/exports/{export}/file" : {
      "get" : {
        "description" : "The zip, streamed through this API. 409 `EXPORT_NOT_READY` before `ready`, 410 `EXPORT_EXPIRED` after `available_until` (ask for a new one), 429 `EXPORT_DOWNLOADS_BUSY` with `Retry-After` past two downloads at once per partner.\n\nLe zip, diffusé par cette API. 409 `EXPORT_NOT_READY` avant `ready`, 410 `EXPORT_EXPIRED` après `available_until` (demandez-en un nouveau), 429 `EXPORT_DOWNLOADS_BUSY` avec `Retry-After` au-delà de deux téléchargements à la fois par partenaire.",
        "operationId" : "file_1",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "export",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK"
          }
        },
        "summary" : "Download an export",
        "tags" : [ "Platform - Exports" ]
      }
    },
    "/api/platform/v1/businesses/{business}/invoices" : {
      "get" : {
        "description" : "Newest first, 50 a page by default and 100 at most. Filters: `status` (`pending`, `normalised` or `failed`), `from` (inclusive) and `to` (exclusive) as ISO-8601 instants on the creation time, and `external_reference` (exact, zero or one row). A page holds at most 100 lines per invoice: above that the invoice says `lines_omitted: true` and its own read holds them all. A list is a view; the event feed is what to reconcile against.\n\nDu plus récent au plus ancien, 50 par page par défaut et 100 au plus. Filtres : `status` (`pending`, `normalised` ou `failed`), `from` (inclus) et `to` (exclu) en instants ISO-8601 sur l'heure de création, et `external_reference` (exact, zéro ou une ligne). Une page contient au plus 100 lignes par facture : au-delà, la facture porte `lines_omitted: true` et sa propre lecture les contient toutes. Une liste est une vue ; c'est le flux d'événements qui sert à réconcilier.",
        "operationId" : "list_3",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "cursor",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "limit",
          "required" : false,
          "schema" : {
            "default" : 50,
            "format" : "int32",
            "type" : "integer"
          }
        }, {
          "in" : "query",
          "name" : "status",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "external_reference",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponseListPlatformInvoiceResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List the invoices of a business",
        "tags" : [ "Platform - Invoices" ]
      },
      "post" : {
        "description" : "Accepts the sale and answers 202 at once with the invoice `pending`: the DGI normalises it afterwards, and you learn the result by webhook, by the event feed or by reading the invoice. Nothing waits on the DGI. One of the `Idempotency-Key` header (64 characters at most) and the `external_reference` field is required; sending the same one again answers 200 with `Idempotent-Replayed: true` and never creates a second invoice. `delivery` is refused with 400 `DELIVERY_NOT_AVAILABLE`: you hand the invoice to your customer yourself. `format` is accepted and ignored. Every field left out takes the default its description states, and `defaults_applied` names the defaults used.\n\nAccepte la vente et répond aussitôt 202 avec la facture `pending` : la DGI la normalise ensuite, et vous en apprenez le résultat par webhook, par le flux d'événements ou en lisant la facture. Rien n'attend la DGI. L'un de l'en-tête `Idempotency-Key` (64 caractères au plus) et du champ `external_reference` est obligatoire ; renvoyer le même répond 200 avec `Idempotent-Replayed: true` et ne crée jamais une seconde facture. `delivery` est refusé par un 400 `DELIVERY_NOT_AVAILABLE` : vous remettez vous-même la facture à votre client. `format` est accepté et ignoré. Tout champ omis prend le défaut que sa description indique, et `defaults_applied` nomme les défauts appliqués.",
        "operationId" : "createInvoice",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "header",
          "name" : "Idempotency-Key",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PartnerCreateInvoiceRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformInvoiceResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Create an invoice",
        "tags" : [ "Platform - Invoices" ]
      }
    },
    "/api/platform/v1/businesses/{business}/invoices/{invoice}" : {
      "get" : {
        "description" : "`{invoice}` is our id, or `ext:<external_reference>` for a reference a path can hold. A reference with a slash or a percent sign, such as `INV/2026/0001`, is read with `?external_reference=` on the list; the answer's `read_by_reference` gives that address. Once normalised the answer holds everything needed to print the document, with all its lines (up to 1 000).\n\n`{invoice}` est notre identifiant, ou `ext:<external_reference>` pour une référence qu'un chemin peut contenir. Une référence avec une barre oblique ou un pour cent, comme `INV/2026/0001`, se lit avec `?external_reference=` sur la liste ; le `read_by_reference` de la réponse donne cette adresse. Une fois normalisée, la réponse contient tout ce qu'il faut pour imprimer le document, avec toutes ses lignes (jusqu'à 1 000).",
        "operationId" : "read",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "invoice",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformInvoiceResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read an invoice or a credit note",
        "tags" : [ "Platform - Invoices" ]
      }
    },
    "/api/platform/v1/businesses/{business}/points-of-sale" : {
      "get" : {
        "description" : "Every point of sale of the business, oldest first. `token_status` is `not_configured`, `active`, `expiring_soon` or `expired`.\n\nTous les points de vente de l'entreprise, du plus ancien au plus récent. `token_status` vaut `not_configured`, `active`, `expiring_soon` ou `expired`.",
        "operationId" : "list_2",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponseListPlatformPointOfSaleResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List the points of sale of a business",
        "tags" : [ "Platform - Points of sale" ]
      },
      "post" : {
        "description" : "Registers one e-MCF (its NID) with the DGI token issued for it. The token is checked with the DGI before anything is stored, must belong to the business's NIF and to this NID, and is never returned. `time_zone` is a region id such as `Africa/Lubumbashi`; absent, `Africa/Kinshasa`. This route calls the DGI, so it has a smaller rate limit than the others.\n\nEnregistre un e-MCF (son NID) avec le jeton DGI qui lui a été délivré. Le jeton est vérifié auprès de la DGI avant tout enregistrement, doit appartenir au NIF de l'entreprise et à ce NID, et n'est jamais renvoyé. `time_zone` est un identifiant de région tel que `Africa/Lubumbashi` ; absent, `Africa/Kinshasa`. Cette route appelle la DGI : sa limite de débit est plus petite que celle des autres.",
        "operationId" : "create_2",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PlatformCreatePointOfSaleRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "201" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformPointOfSaleResponse"
                }
              }
            },
            "description" : "Created"
          }
        },
        "summary" : "Add a point of sale",
        "tags" : [ "Platform - Points of sale" ]
      }
    },
    "/api/platform/v1/businesses/{business}/points-of-sale/{pos}/deactivate" : {
      "post" : {
        "description" : "Refused with 409 `POS_HAS_QUEUED_INVOICES` while invoices wait on it (or, for the last active one, anywhere in the business). Repeating it on an inactive point of sale answers it again and emits nothing more. Emits `pos.deactivated`.\n\nRefusé par un 409 `POS_HAS_QUEUED_INVOICES` tant que des factures l'attendent (ou, pour le dernier point de vente actif, n'importe où dans l'entreprise). Le répéter sur un point de vente inactif le renvoie sans rien émettre de plus. Émet `pos.deactivated`.",
        "operationId" : "deactivate",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "pos",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformPointOfSaleResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Deactivate a point of sale",
        "tags" : [ "Platform - Points of sale" ]
      }
    },
    "/api/platform/v1/businesses/{business}/points-of-sale/{pos}/reactivate" : {
      "post" : {
        "description" : "The opposite of `deactivate`: the point of sale takes invoices again, its queue resumes and it gets its automatic Z again. Its token is the one it had: if it has expired meanwhile, `token_status` says so and its queue stays paused until you replace it with `PUT …/token`. Repeating it on an active point of sale answers it again and emits nothing more. Emits `pos.reactivated`.\n\nL'opposé de `deactivate` : le point de vente reprend les factures, sa file repart et il retrouve son Z automatique. Son jeton est celui qu'il avait : s'il a expiré entre-temps, `token_status` le dit et sa file reste en pause jusqu'à ce que vous le remplaciez par `PUT …/token`. Le répéter sur un point de vente actif le renvoie sans rien émettre de plus. Émet `pos.reactivated`.",
        "operationId" : "reactivate",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "pos",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformPointOfSaleResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Reactivate a point of sale",
        "tags" : [ "Platform - Points of sale" ]
      }
    },
    "/api/platform/v1/businesses/{business}/points-of-sale/{pos}/token" : {
      "put" : {
        "description" : "The new token is checked with the DGI and its NIF and NID must match; the lane then resumes by itself. Allowed while invoices wait in the business's queue, so that they can be normalised: on an ended business within its read window, on a business you paused, and for a suspended account. Never on a business we suspended. Calls the DGI: smaller rate limit.\n\nLe nouveau jeton est vérifié auprès de la DGI et son NIF et son NID doivent correspondre ; la file reprend ensuite d'elle-même. Permis tant que des factures attendent dans la file de l'entreprise, pour qu'elles puissent être normalisées : sur une entreprise terminée dans sa période de lecture, sur une entreprise que vous avez mise en pause, et pour un compte suspendu. Jamais sur une entreprise que nous avons suspendue. Appelle la DGI : limite de débit plus petite.",
        "operationId" : "replaceToken",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "pos",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PlatformReplaceTokenRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformPointOfSaleResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Replace the DGI token of a point of sale",
        "tags" : [ "Platform - Points of sale" ]
      }
    },
    "/api/platform/v1/businesses/{business}/reports" : {
      "get" : {
        "description" : "Newest first, 50 a page by default and 100 at most. Filters: `type`, `origin` (`API`, `AUTO`, `FINAL` or `CONSOLE`), `state` (`queued`, `running`, `ready` or `failed`), `point_of_sale`, `from` and `to` (ISO-8601 instants on the creation time). `CONSOLE` is an X or an X periodic your staff asked for in the Ripa console, never a Z or an A; its `report.ready` and `report.failed` reach you as the others. Accept enum values you do not know.\n\nDu plus récent au plus ancien, 50 par page par défaut et 100 au plus. Filtres : `type`, `origin` (`API`, `AUTO`, `FINAL` ou `CONSOLE`), `state` (`queued`, `running`, `ready` ou `failed`), `point_of_sale`, `from` et `to` (instants ISO-8601 sur l'heure de création). `CONSOLE` est un X ou un X périodique que votre équipe a demandé dans la console Ripa, jamais un Z ni un A ; ses `report.ready` et `report.failed` vous parviennent comme les autres. Acceptez les valeurs d'énumération que vous ne connaissez pas.",
        "operationId" : "list_1",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "cursor",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "limit",
          "required" : false,
          "schema" : {
            "default" : 50,
            "format" : "int32",
            "type" : "integer"
          }
        }, {
          "in" : "query",
          "name" : "type",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "origin",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "state",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "point_of_sale",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "from",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponseListPlatformReportResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "List the reports of a business",
        "tags" : [ "Platform - Reports" ]
      },
      "post" : {
        "description" : "`type` is X, X_PERIODIC, Z or A. Z and A name one point of sale in `point_of_sale` (400 `POINT_OF_SALE_REQUIRED` otherwise): a Z closes that point of sale's session. X and X_PERIODIC may name one or read the whole business; X_PERIODIC alone takes `period_start` and `period_end`. Answers 202 with the report `queued`; `report.ready` or `report.failed` follows. An `Idempotency-Key` is required. At most 1 000 X and X periodic wait per partner, the X your staff ask for in the Ripa console counted with yours (429 `REPORT_QUEUE_FULL`). Still open to a suspended partner and to an ended business within its 90 days.\n\n`type` vaut X, X_PERIODIC, Z ou A. Z et A désignent un point de vente dans `point_of_sale` (sinon 400 `POINT_OF_SALE_REQUIRED`) : un Z clôt la session de ce point de vente. X et X_PERIODIC peuvent en désigner un ou lire toute l'entreprise ; X_PERIODIC seul prend `period_start` et `period_end`. Répond 202 avec le rapport `queued` ; `report.ready` ou `report.failed` suit. Une `Idempotency-Key` est obligatoire. 1 000 X et X périodiques au plus attendent par partenaire, les X que votre équipe demande dans la console Ripa comptés avec les vôtres (429 `REPORT_QUEUE_FULL`). Reste ouvert à un partenaire suspendu et à une entreprise terminée dans ses 90 jours.",
        "operationId" : "create_1",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PlatformCreateReportRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "202" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformReportAccepted"
                }
              }
            },
            "description" : "Accepted"
          }
        },
        "summary" : "Ask for a report",
        "tags" : [ "Platform - Reports" ]
      }
    },
    "/api/platform/v1/businesses/{business}/reports/{id}" : {
      "get" : {
        "description" : "`state` is `queued`, `running`, `ready` or `failed`. A Z carries the figures of the session it closed; an A its article count and TTC total; an X has none, they are in its file. A failed report says why in `error_code` and `error_message`.\n\n`state` vaut `queued`, `running`, `ready` ou `failed`. Un Z porte les chiffres de la session qu'il a close ; un A son nombre d'articles et son total TTC ; un X n'en a pas, ils sont dans son fichier. Un rapport en échec dit pourquoi dans `error_code` et `error_message`.",
        "operationId" : "get_2",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformReportResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read a report's state",
        "tags" : [ "Platform - Reports" ]
      }
    },
    "/api/platform/v1/businesses/{business}/reports/{id}/file" : {
      "get" : {
        "description" : "`format=csv` (default) or `xlsx`. The CSV is exact; the workbook's numeric cells are doubles, which lose cents from about 10^13 CDF, so reconcile to the cent from the CSV. 409 `REPORT_NOT_READY` before `ready` (a failed report says why in the message). Two downloads at once per partner; more answers 429 with `Retry-After`.\n\n`format=csv` (par défaut) ou `xlsx`. Le CSV est exact ; les cellules numériques du classeur sont des doubles, qui perdent des centimes à partir d'environ 10^13 CDF : pour rapprocher au centime, partez du CSV. 409 `REPORT_NOT_READY` avant `ready` (un rapport en échec en dit la cause dans le message). Deux téléchargements à la fois par partenaire ; au-delà, 429 avec `Retry-After`.",
        "operationId" : "file",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "format",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "description" : "OK"
          }
        },
        "summary" : "Download a report's file",
        "tags" : [ "Platform - Reports" ]
      }
    },
    "/api/platform/v1/businesses/{business}/reports/{id}/retry" : {
      "post" : {
        "description" : "Puts a `failed` report back in the queue; any other state answers 409 `REPORT_NOT_FAILED`. A Z that had already closed its session keeps it: the retry renders the same figures and closes nothing more.\n\nRemet en file un rapport `failed` ; tout autre état répond 409 `REPORT_NOT_FAILED`. Un Z qui avait déjà clos sa session la garde : la relance produit les mêmes chiffres et ne clôt rien de plus.",
        "operationId" : "retry",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "path",
          "name" : "id",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "202" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformReportAccepted"
                }
              }
            },
            "description" : "Accepted"
          }
        },
        "summary" : "Retry a failed report",
        "tags" : [ "Platform - Reports" ]
      }
    },
    "/api/platform/v1/businesses/{business}/resume" : {
      "post" : {
        "description" : "Back to `active`. A business that we suspended ourselves answers 409 `BUSINESS_SUSPENDED` and stays held until we lift it; an ended one answers 409 `BUSINESS_ENDED`. Emits `business.resumed`.\n\nRetour à `active`. Une entreprise que nous avons nous-mêmes suspendue répond 409 `BUSINESS_SUSPENDED` et reste retenue jusqu'à ce que nous la levions ; une entreprise terminée répond 409 `BUSINESS_ENDED`. Émet `business.resumed`.",
        "operationId" : "resume",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformBusinessResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Resume a business",
        "tags" : [ "Platform - Businesses" ]
      }
    },
    "/api/platform/v1/businesses/{business}/suspend" : {
      "post" : {
        "description" : "Your own stop: the business reads `paused`, new invoices are refused with 409 `BUSINESS_PAUSED`, and the invoices already accepted wait in the queue without failing. Emits `business.suspended`. Repeating it changes nothing and emits nothing more.\n\nVotre propre arrêt : l'entreprise passe à `paused`, les nouvelles factures sont refusées par un 409 `BUSINESS_PAUSED`, et celles déjà acceptées attendent dans la file sans échouer. Émet `business.suspended`. Le répéter ne change rien et n'émet rien de plus.",
        "operationId" : "suspend",
        "parameters" : [ {
          "in" : "path",
          "name" : "business",
          "required" : true,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformBusinessResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Pause a business",
        "tags" : [ "Platform - Businesses" ]
      }
    },
    "/api/platform/v1/events" : {
      "get" : {
        "description" : "Events in strict order of `position`, without a gap, kept 30 days. Pass the last position you hold as `after` (absent or 0 starts at the oldest kept) and keep `next_after` for the next call; `limit` is 1 to 1 000. A position ahead of the feed answers 400; one older than the feed answers 410 `FEED_CURSOR_EXPIRED`, whose message gives the position to resume from. The same event `id` can appear again at a later position: keep the first.\n\nLes événements dans l'ordre strict de `position`, sans trou, conservés 30 jours. Passez la dernière position que vous détenez en `after` (absent ou 0 : on part du plus ancien conservé) et gardez `next_after` pour l'appel suivant ; `limit` va de 1 à 1 000. Une position en avance sur le flux répond 400 ; une position plus ancienne que le flux répond 410 `FEED_CURSOR_EXPIRED`, dont le message donne la position de reprise. Un même `id` d'événement peut revenir à une position ultérieure : gardez le premier.",
        "operationId" : "list_4",
        "parameters" : [ {
          "in" : "query",
          "name" : "after",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "limit",
          "required" : false,
          "schema" : {
            "default" : 1000,
            "format" : "int32",
            "type" : "integer"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/PlatformEventsResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read the event feed",
        "tags" : [ "Platform - Events" ]
      }
    },
    "/api/platform/v1/invoices/batch" : {
      "post" : {
        "description" : "Body `{ items: [ { business, kind, idempotency_key, invoice } ] }` with `kind` = `invoice` or `credit_note`; `business` is `biz_...` or `ext:...`; `invoice` is the body of the single route. Items may belong to different businesses. The answer is always 200 once the body is readable, with one result per item in the order you sent them: `accepted`, `replayed` or `rejected`. Retry only the items with `retryable: true`, each with its own key. At most 100 items, 5 MiB and 5 000 invoice lines a call.\n\nCorps `{ items: [ { business, kind, idempotency_key, invoice } ] }` avec `kind` = `invoice` ou `credit_note` ; `business` vaut `biz_...` ou `ext:...` ; `invoice` est le corps de la route unitaire. Les éléments peuvent relever d'entreprises différentes. La réponse est toujours un 200 dès que le corps est lisible, avec un résultat par élément dans l'ordre d'envoi : `accepted`, `replayed` ou `rejected`. Ne renvoyez que les éléments marqués `retryable: true`, chacun avec sa propre clé. Au plus 100 éléments, 5 Mio et 5 000 lignes de facture par appel.",
        "operationId" : "accept",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformBatchResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Send up to 100 invoices and credit notes at once",
        "tags" : [ "Platform - Invoices" ]
      }
    },
    "/api/platform/v1/usage" : {
      "get" : {
        "description" : "Counts only, no price: invoices and credit notes normalised per business, point of sale and Kinshasa day, over `from` to `to` (`yyyy-MM-dd`, inclusive; default: the current month so far). At most 92 days a call. `format=csv` (UTF-8, `;`-separated) gives the same as a spreadsheet.\n\nDes nombres seulement, aucun prix : factures et avoirs normalisés par entreprise, point de vente et jour de Kinshasa, de `from` à `to` (`aaaa-MM-jj`, inclus ; par défaut le mois en cours). 92 jours au plus par appel. `format=csv` (UTF-8, séparateur `;`) donne la même chose en tableur.",
        "operationId" : "usage",
        "parameters" : [ {
          "in" : "query",
          "name" : "from",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "to",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        }, {
          "in" : "query",
          "name" : "format",
          "required" : false,
          "schema" : {
            "type" : "string"
          }
        } ],
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "type" : "object"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read your usage",
        "tags" : [ "Platform - Usage" ]
      }
    },
    "/api/platform/v1/webhook" : {
      "get" : {
        "description" : "Its address, its status (`active` or `disabled`), since when it fails, and when it last delivered. The secret is never returned; 404 when none is configured yet.\n\nSon adresse, son statut (`active` ou `disabled`), depuis quand il échoue et sa dernière livraison réussie. Le secret n'est jamais renvoyé ; 404 tant qu'aucun n'est configuré.",
        "operationId" : "get",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformWebhookResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Read the webhook",
        "tags" : [ "Platform - Webhook" ]
      },
      "put" : {
        "description" : "Creates your webhook (201, with its `secret`, shown once) or changes its address (200, no secret). Sent to a disabled webhook, it re-enables it from the current position: the feed is the catch-up. The address must be public, start with https:// and use port 443 or 8443. Batches are position ranges, so there is no per-event filter.\n\nCrée votre webhook (201, avec son `secret`, montré une seule fois) ou en change l'adresse (200, sans secret). Envoyé sur un webhook désactivé, il le réactive à partir de la position courante : le flux sert de rattrapage. L'adresse doit être publique, commencer par https:// et utiliser le port 443 ou 8443. Les lots sont des plages de positions : il n'y a pas de filtre par événement.",
        "operationId" : "put",
        "requestBody" : {
          "content" : {
            "application/json" : {
              "schema" : {
                "$ref" : "#/components/schemas/PlatformPutWebhookRequest"
              }
            }
          },
          "required" : true
        },
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformWebhookResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Set the webhook address",
        "tags" : [ "Platform - Webhook" ]
      }
    },
    "/api/platform/v1/webhook/rotate-secret" : {
      "post" : {
        "description" : "Returns a new secret, shown in this answer only; the previous one keeps signing next to it for 24 hours. An `Idempotency-Key` is required. A replay of the same key answers the same webhook without `secret`: that means the first answer was lost, so rotate again with a new key. Rotating again within 24 hours ends the secret you got from the first rotation at once, and keeps the oldest one valid.\n\nRenvoie un nouveau secret, montré dans cette réponse seulement ; le précédent continue de signer à côté pendant 24 heures. Une `Idempotency-Key` est obligatoire. Un rejeu de la même clé répond le même webhook sans `secret` : la première réponse s'est perdue, faites une nouvelle rotation avec une nouvelle clé. Une nouvelle rotation dans les 24 heures met fin aussitôt au secret reçu à la première rotation, et garde le plus ancien valable.",
        "operationId" : "rotateSecret",
        "responses" : {
          "200" : {
            "content" : {
              "*/*" : {
                "schema" : {
                  "$ref" : "#/components/schemas/ApiResponsePlatformWebhookResponse"
                }
              }
            },
            "description" : "OK"
          }
        },
        "summary" : "Rotate the webhook secret",
        "tags" : [ "Platform - Webhook" ]
      }
    }
  },
  "security" : [ {
    "BearerAuth" : [ ]
  } ],
  "servers" : [ {
    "description" : "Production (live keys)",
    "url" : "https://api.getripa.com"
  }, {
    "description" : "Test (test keys)",
    "url" : "https://api-dev.getripa.com"
  } ],
  "tags" : [ {
    "description" : "Your one webhook: a notification that the feed has news. The feed stays the reference.",
    "name" : "Platform - Webhook"
  }, {
    "description" : "A full export of a business: everything the DGI requires, to take with you.",
    "name" : "Platform - Exports"
  }, {
    "description" : "The businesses you register under your account, and the end of a business.",
    "name" : "Platform - Businesses"
  }, {
    "description" : "The event feed: the reference for everything that happened on your account.",
    "name" : "Platform - Events"
  }, {
    "description" : "Invoices and credit notes: sent for normalisation, read back with everything needed to print them.",
    "name" : "Platform - Invoices"
  }, {
    "description" : "The e-MCF devices (points of sale) of a business, and their DGI tokens.",
    "name" : "Platform - Points of sale"
  }, {
    "description" : "The DGI reports X, X periodic, Z and A, as CSV or Excel.",
    "name" : "Platform - Reports"
  }, {
    "description" : "What you normalised, counted per business, point of sale and day.",
    "name" : "Platform - Usage"
  } ]
}
