Procurize.AI REST API-referentie#

Programmeert toegang tot je kennisbank – documenten, vragenlijsten, RAG en rapporten – met je API-token.

Van toepassing op: Procurize.AI API v1
Authenticatie: API-sleutel via X-API-Key header (zie API Tokens voor tokenbeheer)
Basis-URL: https://api.procurize.com

Overzicht#

De Procurize.AI REST API biedt programmatische toegang tot belangrijke platformfuncties. Het stelt je in staat om Procurize.AI te integreren met je interne systemen, beheer van de kennisbank te automatiseren en aangepaste workflows te bouwen.

Ondersteunde modules (token‑geauthenticeerd):

Authenticatie#

Alle geauthenticeerde eindpunten vereisen een API-token dat wordt meegegeven in de request-header.

HeaderWaarde
X-API-Key<YOUR_API_TOKEN>

Voorbeeld:

curl -X GET "https://api.procurize.com/v1/..." \
  -H "X-API-Key: your-api-token-here"

💡 Tokens zijn gekoppeld aan je organisatie – je hoeft geen organisatie‑ID op te geven in het verzoek.

Basis-URL#

Alle REST API‑eindpunten worden geserveerd onder:

https://api.procurize.com

Foutafhandeling#

De API gebruikt standaard HTTP‑statuscodes.

CodeBetekenis
200 OKVerzoek geslaagd
201 CreatedResource succesvol aangemaakt
204 No ContentVerzoek geslaagd, geen responsinhoud
400 Bad RequestOngeldige parameters of verkeerd gevormd verzoek
401 UnauthorizedOntbrekende of ongeldige API-token
403 ForbiddenToken heeft geen toestemming voor deze actie
404 Not FoundResource bestaat niet
500 Internal Server ErrorOnverwachte serverfout

Foutreacties bevatten een machinaal leesbare foutcode en een menselijk leesbaar bericht.

Module-referentie#

RagArticle#

GET /questionnaire/rag/articles/summary#

Samenvatting: Samenvatting voor startpagina

Parameters:

NaamInTypeVerplichtBeschrijving
projquerystring (uuid)NeeProject‑ID.

Respons (200):

{
  "active": 5
}

GET /questionnaire/rag/articles/total#

Samenvatting: Aantal artikelen

Parameters:

NaamInTypeVerplichtBeschrijving
qquerystringNeeFilter op artikeltitel of -code.
statequeryarrayNeeFilter op statussen.
projectqueryarrayNeeFilter op projecten.
typequeryarrayNeeFilter op documenttypes.

Respons (200):

42

GET /questionnaire/rag/articles/list#

Samenvatting: Lijst van artikelen ophalen

Parameters:

NaamInTypeVerplichtBeschrijving
qquerystringNeeFilter op artikeltitel of -code.
statequeryarrayNeeFilter op statussen.
projectqueryarrayNeeFilter op projecten.
typequeryarrayNeeFilter op documenttypes.
squerystringNeeSorteerveld.
ascquerybooleanNeeOplopende sortering.
psqueryinteger (int32)NeePagina‑grootte.
pqueryinteger (int32)NeePagina‑nummer (beginnend bij 1).

Respons (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 42,
    "totalPages": 5
  },
  "items": [
    {
      "code": "ART-001",
      "org": "00000000-0000-0000-0000-000000000000",
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Article Title",
      "description": "Article description",
      "documentTypes": [
        {
          "id": "00000000-0000-0000-0000-000000000000",
          "name": "Type Name",
          "plural": "Type Names",
          "count": 5
        }
      ],
      "size": 150,
      "revision": {
        "id": "00000000-0000-0000-0000-000000000000",
        "collectionId": "00000000-0000-0000-0000-000000000000",
        "rev": 3,
        "date": "2025-01-15T10:30:00Z",
        "author": {
          "id": "user123",
          "name": "John Doe",
          "email": "john.doe@example.com",
          "login": "johndoe",
          "ra": true
        },
        "authorName": "John Doe",
        "analysisSummary": {
          "id": "00000000-0000-0000-0000-000000000000",
          "initiator": {
            "id": "user123",
            "name": "John Doe",
            "email": "john.doe@example.com",
            "login": "johndoe",
            "ra": true
          },
          "created": "2025-01-15T10:30:00Z",
          "state": "Completed",
          "stateDate": "2025-01-15T10:35:00Z",
          "stateDetails": "Analysis completed successfully",
          "operationId": "op-12345"
        }
      },
      "type": "Article",
      "state": "Active",
      "projects": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "items": [
        "00000000-0000-0000-0000-000000000000"
      ],
      "isShared": false
    }
  ]
}

POST /questionnaire/rag/file-to-md#

Samenvatting: Retourneert Markdown‑inhoud van het bestand

Request Body (multipart/form-data):

{
  "url": "https://example.com/file.pdf",
  "file": "binary"
}

Respons (200):

"Markdown content from file"

POST /questionnaire/rag/article/create#

Samenvatting: Een artikel aanmaken

Request Body (multipart/form-data):

{
  "code": "ART-001",
  "name": "Article Title",
  "description": "Article description",
  "content": "# Article Content\n\nThis is the article content.",
  "url": "https://example.com/file.pdf",
  "file": "binary"
}

Respons (200):

{
  "code": "ART-001",
  "org": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Article Title",
  "description": "Article description",
  "documentTypes": null,
  "size": 150,
  "revision": null,
  "type": "Article",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

GET /questionnaire/rag/article/check#

Samenvatting: Controleer of een artikel bestaat.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.

Respons (200):

true

GET /questionnaire/rag/article-info#

Samenvatting: Haal artikel‑informatie op via code.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.

Respons (200):

{
  "code": "ART-001",
  "org": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "Article Title",
  "description": "Article description",
  "documentTypes": null,
  "size": 150,
  "revision": null,
  "type": "Article",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

GET /questionnaire/rag/article#

Samenvatting: Haal artikel‑inhoud op via code

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.
formatquerystringNeeIndien true, retourneert HTML‑inhoud; anders Markdown.
splitquerybooleanNeeIndien true, retourneert de inhoud gesplitst per RAG‑element.
cssquerybooleanNeeIndien true, retourneert HTML/PDF‑inhoud met CSS.

Respons (200):

"# Article Title\n\nThis is the article content in Markdown format."

POST /questionnaire/rag/article#

Samenvatting: Metagegevens van artikel bijwerken

Request Body:

{
  "code": "ART-001",
  "name": "Updated Article Title",
  "description": "Updated description",
  "projects": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "documentTypes": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "Type Name",
      "plural": "Type Names"
    }
  ],
  "isShared": true,
  "state": "Active"
}

Respons (200):

{}

DELETE /questionnaire/rag/article#

Samenvatting: Artikel verwijderen

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.

GET /questionnaire/rag/article/pdf#

Samenvatting: Artikel als PDF ophalen via code

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.

Respons (200):

(pdf binary)

GET /questionnaire/rag/article/content#

Samenvatting: Artikelinhoud ophalen

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.

Respons (200):

{
  "content": "# Article Title\n\nContent here."
}

POST /questionnaire/rag/article/content#

Samenvatting: Artikelinhoud bijwerken

Request Body (multipart/form-data):

{
  "code": "ART-001",
  "content": "# Updated Content",
  "file": "binary"
}

POST /questionnaire/rag/plural#

Samenvatting: Meervoudsvorm van een zelfstandig naamwoord ophalen

Parameters:

NaamInTypeVerplichtBeschrijving
nounquerystringNeeZelfstandig naamwoord om te meervoudigen.

Respons (200):

{
  "plural": "Articles"
}

POST /questionnaire/rag/article/find-types#

Samenvatting: Analyseer artikel met AI en retourneer hun types

Request Body (multipart/form-data):

{
  "code": "ART-001",
  "content": "# Article Content"
}

Respons (200):

[
  {
    "plural": "Types"
  }
]

POST /questionnaire/rag/article/format-with-ai#

Samenvatting: Artikelinhoud formatteren met AI

Request Body (multipart/form-data):

{
  "code": "ART-001",
  "content": "# Article Content"
}

Respons (200):

{
  "formattedContent": "# Formatted Article Content"
}

POST /questionnaire/rag/article/improve-on-suggestions#

Samenvatting: Document verbeteren op basis van suggesties

Request Body (multipart/form-data):

{
  "suggestions": [
    {
      "sectionTitle": "Introduction",
      "suggestion": "Add more details here."
    }
  ],
  "code": "ART-001",
  "content": "# Article Content"
}

Respons (200):

{
  "improvedContent": "# Improved Content"
}

GET /questionnaire/rag/article/parts#

Samenvatting: Lijst van artikelonderdelen retourneren

Parameters:

NaamInTypeVerplichtBeschrijving
idqueryarrayJaLijst van artikelonderdelen.

Respons (200):

[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "code": "part-1",
    "title": "Introduction",
    "orderNumber": 1,
    "content": "Introduction content."
  }
]

GET /questionnaire/rag/article/revisions#

Samenvatting: Lijst van artikelrevisies retourneren

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.

Respons (200):

[
  {
    "id": "00000000-0000-0000-0000-000000000000",
    "collectionId": "00000000-0000-0000-0000-000000000000",
    "rev": 1,
    "date": "2025-01-15T10:30:00Z",
    "author": {
      "id": "user123",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "login": "johndoe",
      "ra": true
    },
    "authorName": "John Doe",
    "analysisSummary": {
      "id": "00000000-0000-0000-0000-000000000000",
      "initiator": {
        "id": "user123",
        "name": "John Doe",
        "email": "john.doe@example.com",
        "login": "johndoe",
        "ra": true
      },
      "created": "2025-01-15T10:30:00Z",
      "state": "Completed",
      "stateDate": "2025-01-15T10:35:00Z",
      "stateDetails": "Analysis completed",
      "operationId": "op-12345"
    }
  }
]

GET /questionnaire/rag/article/revisions/info/{id}#

Samenvatting: Revisie‑informatie van artikel ophalen

Parameters:

NaamInTypeVerplichtBeschrijving
idpathstring (uuid)JaRevisie‑ID.

Respons (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "collectionId": "00000000-0000-0000-0000-000000000000",
  "rev": 1,
  "date": "2025-01-15T10:30:00Z",
  "author": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "authorName": "John Doe",
  "analysisSummary": {
    "id": "00000000-0000-0000-0000-000000000000",
    "initiator": {
      "id": "user123",
      "name": "John Doe",
      "email": "john.doe@example.com",
      "login": "johndoe",
      "ra": true
    },
    "created": "2025-01-15T10:30:00Z",
    "state": "Completed",
    "stateDate": "2025-01-15T10:35:00Z",
    "stateDetails": "Analysis completed",
    "operationId": "op-12345"
  }
}

GET /questionnaire/rag/article/revisions/{id}#

Samenvatting: Revisie‑inhoud van artikel ophalen

Parameters:

NaamInTypeVerplichtBeschrijving
idpathstring (uuid)JaRevisie‑ID.

Respons (200):

"# Article Revision Content\n\nPrevious version."

GET /questionnaire/rag/article/analyze#

Samenvatting: Artikelinhoud analyseren met AI

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van het artikel.
revqueryinteger (int32)NeeRevisienummer.
forcequerybooleanNeeForceer het aanmaken van een nieuwe analyse en verwijder eventueel onvoltooide resultaten.

Respons (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "initiator": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "created": "2025-01-15T10:30:00Z",
  "state": "Completed",
  "stateDate": "2025-01-15T10:35:00Z",
  "stateDetails": "Analysis completed",
  "operationId": "op-12345"
}

GET /questionnaire/rag/article/analyze/{id}#

Samenvatting: Analyse‑resultaat van artikel ophalen

Parameters:

NaamInTypeVerplichtBeschrijving
idpathstring (uuid)JaAnalyse‑ID.

Respons (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "initiator": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "created": "2025-01-15T10:30:00Z",
  "state": "Completed",
  "stateDate": "2025-01-15T10:35:00Z",
  "stateDetails": "Analysis completed",
  "operationId": "op-12345",
  "fragments": [
    "fragment-1",
    "fragment-2"
  ],
  "ownInconcies": "Own inconsistencies found",
  "ragInconcies": "RAG inconsistencies found",
  "proposals": "Improvement proposals"
}

GET /questionnaire/rag/messages/list#

Samenvatting: Alle berichten opsommen

Parameters:

NaamInTypeVerplichtBeschrijving
idquerystring (uuid)JaRAG‑collectie‑ID.
itemquerystring (uuid)NeeRAG‑item‑ID.
messagequerystring (uuid)NeeBericht‑ID.
ascquerybooleanNeeOplopende sortering.
psqueryinteger (int32)NeePagina‑grootte.
pqueryinteger (int32)NeePagina‑nummer (beginnend bij 1).

Respons (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 5,
    "totalPages": 1
  },
  "items": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "replyTo": null,
      "questionnaire": null,
      "section": null,
      "question": null,
      "ragCollection": "00000000-0000-0000-0000-000000000000",
      "ragItem": "00000000-0000-0000-0000-000000000000",
      "targetId": "00000000-0000-0000-0000-000000000000",
      "targetType": "Question",
      "targetNum": 1,
      "author": {
        "id": "user123",
        "name": "John Doe",
        "email": "john.doe@example.com",
        "login": "johndoe",
        "ra": true
      },
      "text": "Message content",
      "created": "2025-01-15T10:30:00Z",
      "updated": "2025-01-15T10:30:00Z",
      "replies": 0
    }
  ]
}

POST /questionnaire/rag/messages/add#

Samenvatting: Nieuw bericht toevoegen

Parameters:

NaamInTypeVerplichtBeschrijving
idquerystring (uuid)JaRAG‑collectie‑ID.
itemquerystring (uuid)NeeRAG‑item‑ID.
messagequerystring (uuid)NeeBericht‑ID om op te antwoorden.

Request Body:

{
  "text": "New message content"
}

Respons (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "replyTo": null,
  "questionnaire": null,
  "section": null,
  "question": null,
  "ragCollection": "00000000-0000-0000-0000-000000000000",
  "ragItem": "00000000-0000-0000-0000-000000000000",
  "targetId": "00000000-0000-0000-0000-000000000000",
  "targetType": "Question",
  "targetNum": 1,
  "author": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "text": "New message content",
  "created": "2025-01-15T10:30:00Z",
  "updated": "2025-01-15T10:30:00Z",
  "replies": 0
}

POST /questionnaire/rag/message#

Samenvatting: Bestaand bericht bijwerken

Parameters:

NaamInTypeVerplichtBeschrijving
cquerystring (uuid)JaRAG‑collectie‑ID.
idquerystring (uuid)JaBericht‑ID.

Request Body:

{
  "text": "Updated message content"
}

Respons (200):

{
  "id": "00000000-0000-0000-0000-000000000000",
  "replyTo": null,
  "questionnaire": null,
  "section": null,
  "question": null,
  "ragCollection": "00000000-0000-0000-0000-000000000000",
  "ragItem": "00000000-0000-0000-0000-000000000000",
  "targetId": "00000000-0000-0000-0000-000000000000",
  "targetType": "Question",
  "targetNum": 1,
  "author": {
    "id": "user123",
    "name": "John Doe",
    "email": "john.doe@example.com",
    "login": "johndoe",
    "ra": true
  },
  "text": "Updated message content",
  "created": "2025-01-15T10:30:00Z",
  "updated": "2025-01-15T10:45:00Z",
  "replies": 0
}

DELETE /questionnaire/rag/message#

Samenvatting: Bestaand bericht verwijderen

Parameters:

NaamInTypeVerplichtBeschrijving
idquerystring (uuid)JaBericht‑ID.

Respons (200):

{}

RagFaq#

GET /questionnaire/rag/faq-collections/summary#

Samenvatting: Samenvatting voor startpagina

Parameters:

NaamInTypeVerplichtBeschrijving
projquerystring (uuid)NeeProject‑ID.

Respons (200):

{
  "active": 3
}

GET /questionnaire/rag/faq-collections/total#

Samenvatting: Aantal FAQ‑collecties.

Parameters:

NaamInTypeVerplichtBeschrijving
qquerystringNeeFilter op collectienaam of -code.
statequeryarrayNeeFilter op statussen.
projectqueryarrayNeeFilter op projecten.

Respons (200):

3

GET /questionnaire/rag/faq-collections/list#

Samenvatting: Lijst van FAQ‑collecties ophalen.

Parameters:

NaamInTypeVerplichtBeschrijving
qquerystringNeeFilter op collectienaam of -code.
statequeryarrayNeeFilter op statussen.
projectqueryarrayNeeFilter op projecten.
squerystringNeeSorteerveld.
ascquerybooleanNeeOplopende sortering.
psqueryinteger (int32)NeePagina‑grootte.
pqueryinteger (int32)NeePagina‑nummer (beginnend bij 1).

Respons (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 3,
    "totalPages": 1
  },
  "items": [
    {
      "code": "FAQ-001",
      "org": "00000000-0000-0000-0000-000000000000",
      "id": "00000000-0000-0000-0000-000000000000",
      "name": "FAQ Collection",
      "description": "FAQ collection description",
      "documentTypes": null,
      "size": 5,
      "revision": null,
      "type": "Faq",
      "state": "Active",
      "projects": null,
      "items": null,
      "isShared": false
    }
  ]
}

GET /questionnaire/rag/faq-collections/find-items#

Samenvatting: FAQ‑items zoeken.

Parameters:

NaamInTypeVerplichtBeschrijving
qquerystringJaFilter op vraag.
projectquerystring (uuid)NeeFilter op project.
psqueryinteger (int32)NeePagina‑grootte.
pqueryinteger (int32)NeePagina‑nummer (beginnend bij 1).

Respons (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 5,
    "totalPages": 1
  },
  "items": [
    {
      "index": 0,
      "question": "What is this product?",
      "answer": "This is a great product.",
      "comment": "Product FAQ",
      "state": "Active"
    }
  ]
}

POST /questionnaire/rag/faq-collection/create#

Samenvatting: Nieuwe FAQ‑collectie aanmaken.

Request Body (multipart/form-data):

{
  "code": "FAQ-001",
  "name": "FAQ Collection",
  "description": "FAQ collection description",
  "content": "Content here",
  "file": "binary"
}

Respons (200):

{
  "code": "FAQ-001",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "FAQ Collection",
  "description": "FAQ collection description",
  "documentTypes": null,
  "size": 5,
  "revision": null,
  "type": "Faq",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

POST /questionnaire/rag/faq-collection#

Samenvatting: Metagegevens van FAQ‑collectie bijwerken.

Request Body:

{
  "code": "FAQ-001",
  "name": "Updated FAQ Collection",
  "description": "Updated description",
  "projects": null,
  "documentTypes": null,
  "isShared": false,
  "state": "Active"
}

DELETE /questionnaire/rag/faq-collection#

Samenvatting: FAQ‑collectie verwijderen.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van de collectie.

GET /questionnaire/rag/faq-collection#

Samenvatting: FAQ‑collectie ophalen.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van de collectie.

Respons (200):

{
  "code": "FAQ-001",
  "org": "00000000-0000-0000-0000-000000000000",
  "id": "00000000-0000-0000-0000-000000000000",
  "name": "FAQ Collection",
  "description": "FAQ collection description",
  "documentTypes": null,
  "size": 5,
  "revision": null,
  "type": "Faq",
  "state": "Active",
  "projects": null,
  "items": null,
  "isShared": false
}

GET /questionnaire/rag/faq-collection/check#

Samenvatting: Controleer of FAQ‑collectie bestaat.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van de collectie.

Respons (200):

true

GET /questionnaire/rag/faq-collection/items-total#

Samenvatting: Aantal FAQ‑items.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van de collectie.
qquerystringNeeFilter op FAQ‑item‑inhoud.

Request Body:

["Active", "Default"]

Respons (200):

5

GET /questionnaire/rag/faq-collection/items#

Samenvatting: Lijst van FAQ‑items ophalen.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van de collectie.
qquerystringNeeFilter op FAQ‑item‑inhoud.
statequeryarrayNeeFilter op statussen.
squerystringNeeSorteerveld.
ascquerybooleanNeeOplopende sortering.
psqueryinteger (int32)NeePagina‑grootte.
pqueryinteger (int32)NeePagina‑nummer (beginnend bij 1).

Respons (200):

{
  "paging": {
    "pageNumber": 1,
    "pageSize": 10,
    "total": 5,
    "totalPages": 1
  },
  "items": [
    {
      "index": 0,
      "question": "What is this product?",
      "answer": "This is a great product.",
      "comment": "Product FAQ",
      "state": "Active"
    }
  ]
}

POST /questionnaire/rag/faq-collection/item/create#

Samenvatting: Nieuw FAQ‑item aanmaken.

Request Body:

{
  "code": "FAQ-001",
  "index": 0,
  "question": "What is this product?",
  "answer": "This is a great product.",
  "comment": "Product FAQ",
  "state": "Active"
}

Respons (200):

{
  "index": 0,
  "question": "What is this product?",
  "answer": "This is a great product.",
  "comment": "Product FAQ",
  "state": "Active"
}

GET /questionnaire/rag/faq-collection/item#

Samenvatting: FAQ‑item ophalen.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van de collectie.
indexqueryinteger (int32)JaNul‑gebaseerde index van het FAQ‑item in de collectie.

Respons (200):

{
  "index": 0,
  "question": "What is this product?",
  "answer": "This is a great product.",
  "comment": "Product FAQ",
  "state": "Active"
}

POST /questionnaire/rag/faq-collection/item#

Samenvatting: FAQ‑item bijwerken.

Request Body:

{
  "code": "FAQ-001",
  "index": 0,
  "newIndex": 1,
  "question": "Updated question?",
  "answer": "Updated answer.",
  "comment": "Updated comment",
  "state": "Active"
}

DELETE /questionnaire/rag/faq-collection/item#

Samenvatting: FAQ‑item verwijderen.

Parameters:

NaamInTypeVerplichtBeschrijving
codequerystringJaCode van de collectie.
indexqueryinteger (int32)JaNul‑gebaseerde index van het FAQ‑item in de collectie.

RagQuery#

POST /questionnaire/rag/query#

Samenvatting: Query uitvoeren in RAG‑kennisbank

Request Body:

{
  "project": "00000000-0000-0000-0000-000000000000",
  "excludeCollections": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "question": "What is this product?",
  "yourCompanyName": "Acme Corp",
  "yourCompanyAlias": "Acme",
  "customerName": "John Doe",
  "options": [
    "option1",
    "option2"
  ],
  "multiselect": false,
  "nArticles": 5,
  "nFaqs": 3,
  "threshold": 0.5,
  "debug": false,
  "withJustification": true,
  "withConfidenceLevel": true,
  "withFragments": true,
  "nAttempts": 3
}

Respons (200):

{
  "attempt": 1,
  "preparedQuery": {
    "original": "What is this product?",
    "enhanced": "What is this product and its features?"
  },
  "ragItems": [
    {
      "id": "00000000-0000-0000-0000-000000000000",
      "distance": 0.25
    }
  ],
  "question": "What is this product?",
  "generalInstructions": "Based on the knowledge base, here is the answer:",
  "text": "This product is a great solution for your needs.",
  "explanation": "The answer was found in multiple sources with high confidence."
}

POST /questionnaire/rag/query-stream#

Samenvatting: Query uitvoeren in RAG‑kennisbank (streaming)

Request Body: (identiek aan bovenstaande)

{
  "project": "00000000-0000-0000-0000-000000000000",
  "excludeCollections": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "question": "What is this product?",
  "yourCompanyName": "Acme Corp",
  "yourCompanyAlias": "Acme",
  "customerName": "John Doe",
  "options": [
    "option1",
    "option2"
  ],
  "multiselect": false,
  "nArticles": 5,
  "nFaqs": 3,
  "threshold": 0.5,
  "debug": false,
  "withJustification": true,
  "withConfidenceLevel": true,
  "withFragments": true,
  "nAttempts": 3
}

Respons (200):

[
  {
    "text": "This product is a great solution",
    "fragments": [
      {
        "id": "00000000-0000-0000-0000-000000000000",
        "part": 1,
        "distance": 0.25,
        "type": "Article",
        "code": "ART-001",
        "title": "Product Title",
        "fragment": "Product content fragment"
      }
    ]
  },
  {
    "text": " for your needs.",
    "fragments": []
  }
]

POST /questionnaire/rag/query-fragments#

Samenvatting: Query uitvoeren in RAG‑kennisbank (fragmenten)

Request Body:

{
  "project": "00000000-0000-0000-0000-000000000000",
  "exclude_documents": [
    "00000000-0000-0000-0000-000000000000"
  ],
  "query": "What is this product?",
  "top_k": 5,
  "similarity_threshold": 0.5,
  "prepare_query": true
}

Respons (200):

{
  "results": [
    {
      "document_id": "00000000-0000-0000-0000-000000000000",
      "document_code": "ART-001",
      "document_title": "Product Title",
      "revision": 3,
      "chunk_index": 0,
      "content": "Product content fragment",
      "metadata": {
        "author": "John Doe",
        "created_at": "2025-01-15T10:30:00Z",
        "last_updated_at": "2025-01-15T10:35:00Z",
        "doc_categories": [
          "Product",
          "Information"
        ]
      },
      "similarity_score": 0.85
    }
  ]
}

Gerelateerde artikelen#

Naar boven
Selecteer taal