Aller au contenu

Environnement de développement : contenu en cours de rédaction, rien ne pointe vers la production.

Sommaire de la documentation

documents

Version 0.1.06 opérations

The pieces Konnect asks of the organisation, each with its status and pages

GET/organisations/{id}/documentsClé API

Paramètres

  • idstringpathobligatoire

Réponses

  • 200

    • itemsDocumentItemDto[]obligatoire
      • codestringobligatoire
        • enum: "rne_extract", "patente", "director_cin", "statuts", "proof_of_address", "konnect_contract", "sub_merchant_form"
      • requiredbooleanobligatoire

        false: sent by the merchant but no longer asked for

      • conditionalbooleanobligatoire

        Statutes listed while the legal form is unknown

      • requiredBystring[]obligatoire

        konnect and the short names of the banks asking for the piece

      • statusstringobligatoire
        • enum: "pending_upload", "uploaded", "in_review", "approved", "rejected"
      • generatedbooleanobligatoire

        Konnect produces it: download, sign and send back

      • templateAvailablebooleanobligatoire

        GET .../template serves the document to sign

      • maxPagesnumberobligatoire
      • currentany | nullobligatoire
    • progressDocumentProgressDtoobligatoire
      • approvednumberobligatoire
      • providednumberobligatoire

        Required pieces uploaded, in review or approved

      • requirednumberobligatoire
    • limitsDocumentLimitsDtoobligatoire
      • maxFileBytesnumberobligatoire
      • mimeTypesstring[]obligatoire
  • 403permission_denied or api_key_not_allowed

Exemples de code

curl -X GET "$KONNECT_API_URL/organisations/id/documents" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Exemple : 200

{
  "items": [
    {
      "code": "rne_extract",
      "required": true,
      "conditional": true,
      "requiredBy": [
        "konnect",
        "BTE"
      ],
      "status": "pending_upload",
      "generated": true,
      "templateAvailable": true,
      "maxPages": 2,
      "current": {
        "id": "id",
        "version": 1,
        "status": "uploaded",
        "rejectionReason": "illegible",
        "rejectionNote": "rejectionNote",
        "pages": [
          null
        ],
        "createdAt": "2026-10-01T09:30:00.000Z",
        "reviewStartedAt": "2026-10-01T09:30:00.000Z",
        "reviewedAt": "2026-10-01T09:30:00.000Z"
      }
    }
  ],
  "progress": {
    "approved": 1,
    "provided": 1,
    "required": 1
  },
  "limits": {
    "maxFileBytes": 10485760,
    "mimeTypes": [
      "application/pdf",
      "image/png",
      "image/jpeg"
    ]
  }
}

Send a page of a piece (PDF, PNG or JPEG, 10 MB at most)

POST/organisations/{id}/documents/{code}/filesClé API

A piece to provide or refused gets a new version; a piece sent and not yet reviewed gets one more page, or replaceFileId replaces one of its pages.

Paramètres

  • idstringpathobligatoire
  • codestringpathobligatoire

Corps de la requête multipart/form-data

  • filestring (binary)obligatoire
  • replaceFileIdstring (uuid)

Réponses

  • 201

    • codestringobligatoire
      • enum: "rne_extract", "patente", "director_cin", "statuts", "proof_of_address", "konnect_contract", "sub_merchant_form"
    • requiredbooleanobligatoire

      false: sent by the merchant but no longer asked for

    • conditionalbooleanobligatoire

      Statutes listed while the legal form is unknown

    • requiredBystring[]obligatoire

      konnect and the short names of the banks asking for the piece

    • statusstringobligatoire
      • enum: "pending_upload", "uploaded", "in_review", "approved", "rejected"
    • generatedbooleanobligatoire

      Konnect produces it: download, sign and send back

    • templateAvailablebooleanobligatoire

      GET .../template serves the document to sign

    • maxPagesnumberobligatoire
    • currentany | nullobligatoire
  • 400file_required, file_too_large, unsupported_file_type

  • 409document_locked or document_pages_full

  • 422file_infected

Exemples de code

curl -X POST "$KONNECT_API_URL/organisations/id/documents/code/files" \
  -H "Authorization: Bearer $KONNECT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "file": "file",
  "replaceFileId": "replaceFileId"
}'

Exemple : corps de la requête

{
  "file": "file",
  "replaceFileId": "replaceFileId"
}

Exemple : 201

{
  "code": "rne_extract",
  "required": true,
  "conditional": true,
  "requiredBy": [
    "konnect",
    "BTE"
  ],
  "status": "pending_upload",
  "generated": true,
  "templateAvailable": true,
  "maxPages": 2,
  "current": {
    "id": "id",
    "version": 1,
    "status": "uploaded",
    "rejectionReason": "illegible",
    "rejectionNote": "rejectionNote",
    "pages": [
      {
        "fileId": "fileId",
        "page": 1,
        "originalName": "originalName",
        "mimeType": "image/jpeg",
        "sizeBytes": 1,
        "scanStatus": "not_scanned",
        "createdAt": "2026-10-01T09:30:00.000Z"
      }
    ],
    "createdAt": "2026-10-01T09:30:00.000Z",
    "reviewStartedAt": "2026-10-01T09:30:00.000Z",
    "reviewedAt": "2026-10-01T09:30:00.000Z"
  }
}

Remove a page of a piece sent and not yet reviewed

DELETE/organisations/{id}/documents/{code}/files/{fileId}Clé API

Paramètres

  • idstringpathobligatoire
  • codestringpathobligatoire
  • fileIdstringpathobligatoire

Réponses

  • 200

    • codestringobligatoire
      • enum: "rne_extract", "patente", "director_cin", "statuts", "proof_of_address", "konnect_contract", "sub_merchant_form"
    • requiredbooleanobligatoire

      false: sent by the merchant but no longer asked for

    • conditionalbooleanobligatoire

      Statutes listed while the legal form is unknown

    • requiredBystring[]obligatoire

      konnect and the short names of the banks asking for the piece

    • statusstringobligatoire
      • enum: "pending_upload", "uploaded", "in_review", "approved", "rejected"
    • generatedbooleanobligatoire

      Konnect produces it: download, sign and send back

    • templateAvailablebooleanobligatoire

      GET .../template serves the document to sign

    • maxPagesnumberobligatoire
    • currentany | nullobligatoire
  • 404file_not_found

  • 409document_locked

Exemples de code

curl -X DELETE "$KONNECT_API_URL/organisations/id/documents/code/files/fileId" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Exemple : 200

{
  "code": "rne_extract",
  "required": true,
  "conditional": true,
  "requiredBy": [
    "konnect",
    "BTE"
  ],
  "status": "pending_upload",
  "generated": true,
  "templateAvailable": true,
  "maxPages": 2,
  "current": {
    "id": "id",
    "version": 1,
    "status": "uploaded",
    "rejectionReason": "illegible",
    "rejectionNote": "rejectionNote",
    "pages": [
      {
        "fileId": "fileId",
        "page": 1,
        "originalName": "originalName",
        "mimeType": "image/jpeg",
        "sizeBytes": 1,
        "scanStatus": "not_scanned",
        "createdAt": "2026-10-01T09:30:00.000Z"
      }
    ],
    "createdAt": "2026-10-01T09:30:00.000Z",
    "reviewStartedAt": "2026-10-01T09:30:00.000Z",
    "reviewedAt": "2026-10-01T09:30:00.000Z"
  }
}

A signed URL of a page, valid 5 minutes (audited)

GET/organisations/{id}/documents/{code}/files/{fileId}/urlClé API

Paramètres

  • idstringpathobligatoire
  • codestringpathobligatoire
  • fileIdstringpathobligatoire
  • dispositionstringquery
    • enum: "inline", "attachment"

Réponses

  • 200

    • urlstringobligatoire

      Pre-signed URL, valid 5 minutes

    • expiresAtstring (date-time)obligatoire

Exemples de code

curl -X GET "$KONNECT_API_URL/organisations/id/documents/code/files/fileId/url" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Exemple : 200

{
  "url": "url",
  "expiresAt": "2026-10-01T09:30:00.000Z"
}

The document to sign: the Konnect contract, or the BTE sub-merchant form

GET/organisations/{id}/documents/{code}/templateClé API

Paramètres

  • idstringpathobligatoire
  • codestringpathobligatoire

Réponses

  • 200A PDF

  • 404template_not_available

Exemples de code

curl -X GET "$KONNECT_API_URL/organisations/id/documents/code/template" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Exemple : 200

"string"

Versions and journal of a piece, newest first

GET/organisations/{id}/documents/{code}/historyClé API

Paramètres

  • idstringpathobligatoire
  • codestringpathobligatoire

Réponses

  • 200

    • codestringobligatoire
      • enum: "rne_extract", "patente", "director_cin", "statuts", "proof_of_address", "konnect_contract", "sub_merchant_form"
    • versionsDocumentVersionDto[]obligatoire

      Newest first

      • idstring (uuid)obligatoire
      • versionnumberobligatoire
      • statusstringobligatoire
        • enum: "uploaded", "in_review", "approved", "rejected", "replaced"
      • rejectionReasonstring | nullobligatoire
        • enum: "illegible", "expired", "wrong_document", "incomplete", "name_mismatch", "not_signed", "other"
      • rejectionNotestring | nullobligatoire
      • pagesDocumentPageDto[]obligatoire
        • fileIdstring (uuid)obligatoire
        • pagenumberobligatoire
        • originalNamestringobligatoire
        • mimeTypestringobligatoire
        • sizeBytesnumberobligatoire
        • scanStatusstringobligatoire
          • enum: "not_scanned", "clean"
        • createdAtstring (date-time)obligatoire
      • createdAtstring (date-time)obligatoire
      • reviewStartedAtstring (date-time) | nullobligatoire
      • reviewedAtstring (date-time) | nullobligatoire
    • eventsDocumentEventDto[]obligatoire

      Newest first

      • idstring (uuid)obligatoire
      • typestringobligatoire
        • enum: "uploaded", "page_added", "page_replaced", "page_deleted", "withdrawn", "review_started", "approved", "rejected", "replaced", "backfilled"
      • versionnumber | nullobligatoire
      • actorTypestringobligatoire
        • enum: "merchant", "staff", "system"
      • actorNamestring | nullobligatoire

        Staff only; null for the merchant

      • detailsobjectobligatoire

        Reason, note, page or status of the event

      • createdAtstring (date-time)obligatoire

Exemples de code

curl -X GET "$KONNECT_API_URL/organisations/id/documents/code/history" \
  -H "Authorization: Bearer $KONNECT_API_KEY"

Exemple : 200

{
  "code": "rne_extract",
  "versions": [
    {
      "id": "id",
      "version": 1,
      "status": "uploaded",
      "rejectionReason": "illegible",
      "rejectionNote": "rejectionNote",
      "pages": [
        {
          "fileId": "fileId",
          "page": 1,
          "originalName": "originalName",
          "mimeType": "image/jpeg",
          "sizeBytes": 1,
          "scanStatus": "not_scanned",
          "createdAt": "2026-10-01T09:30:00.000Z"
        }
      ],
      "createdAt": "2026-10-01T09:30:00.000Z",
      "reviewStartedAt": "2026-10-01T09:30:00.000Z",
      "reviewedAt": "2026-10-01T09:30:00.000Z"
    }
  ],
  "events": [
    {
      "id": "id",
      "type": "uploaded",
      "version": 1,
      "actorType": "merchant",
      "actorName": "actorName",
      "details": {},
      "createdAt": "2026-10-01T09:30:00.000Z"
    }
  ]
}