Procurize.AI REST API Reference#

Programmatically access your knowledge base – documents, questionnaires, RAG, and reports – using your API token.

Applies to: Procurize.AI API v1
Authentication: API key via X-API-Key header (see API Tokens for token management)
Base URL: https://api.procurize.com

Overview#

The Procurize.AI REST API provides programmatic access to key platform features. It enables you to integrate Procurize.AI with your internal systems, automate knowledge base management, and build custom workflows.

Supported modules (token‑authenticated):

Authentication#

All authenticated endpoints require an API token passed in the request header.

HeaderValue
X-API-Key<YOUR_API_TOKEN>

Example:

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

💡 Tokens are bound to your organization – you do not need to specify an organization ID in the request .

Base URL#

All REST API endpoints are served under:

https://api.procurize.com

Error Handling#

The API uses standard HTTP status codes.

CodeMeaning
200 OKRequest successful
201 CreatedResource created successfully
204 No ContentRequest successful, no response body
400 Bad RequestInvalid parameters or malformed request
401 UnauthorizedMissing or invalid API token
403 ForbiddenToken does not have permission for this action
404 Not FoundResource does not exist
500 Internal Server ErrorUnexpected server error

Error responses include a machine‑readable error code and a human‑readable message.

Module Reference#

RagArticle#

GET /questionnaire/rag/articles/summary#

Summary: Summary for Home page

Parameters:

NameInTypeRequiredDescription
projquerystring (uuid)NoProject ID.

Response (200):

{
  "active": 5
}

GET /questionnaire/rag/articles/total#

Summary: Number of articles

Parameters:

NameInTypeRequiredDescription
qquerystringNoFilter on article name or code.
statequeryarrayNoFilter on states.
projectqueryarrayNoFilter on projects.
typequeryarrayNoFilter on document types.

Response (200):

42

GET /questionnaire/rag/articles/list#

Summary: Get list of articles

Parameters:

NameInTypeRequiredDescription
qquerystringNoFilter on article name or code.
statequeryarrayNoFilter on states.
projectqueryarrayNoFilter on projects.
typequeryarrayNoFilter on document types.
squerystringNoSort field.
ascquerybooleanNoAscending sort.
psqueryinteger (int32)NoPage size.
pqueryinteger (int32)No1-based page number.

Response (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#

Summary: Returns Markdown content from the file

Request Body (multipart/form-data):

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

Response (200):

"Markdown content from file"

POST /questionnaire/rag/article/create#

Summary: Create an article

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"
}

Response (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#

Summary: Check existence of article.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.

Response (200):

true

GET /questionnaire/rag/article-info#

Summary: Get article info by code.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.

Response (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#

Summary: Get article content by code

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.
formatquerystringNoIf true, returns HTML content in the response body. Otherwise returns the article content in Markdown format.
splitquerybooleanNoIf true, returns the content separated by RAG elements.
cssquerybooleanNoIf true, returns the HTML/PDF content with CSS.

Response (200):

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

POST /questionnaire/rag/article#

Summary: Update article metadata

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"
}

Response (200):

{}

DELETE /questionnaire/rag/article#

Summary: Delete article

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.

GET /questionnaire/rag/article/pdf#

Summary: Get article as PDF by code

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.

Response (200):

(pdf binary)

GET /questionnaire/rag/article/content#

Summary: Get article content

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.

Response (200):

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

POST /questionnaire/rag/article/content#

Summary: Update article content

Request Body (multipart/form-data):

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

POST /questionnaire/rag/plural#

Summary: Get plural form of the noun

Parameters:

NameInTypeRequiredDescription
nounquerystringNoNoun to pluralize.

Response (200):

{
  "plural": "Articles"
}

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

Summary: Analyze article with AI and return their types

Request Body (multipart/form-data):

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

Response (200):

[
  {
    "plural": "Types"
  }
]

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

Summary: Format article content with AI

Request Body (multipart/form-data):

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

Response (200):

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

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

Summary: Improve the document based on suggestions

Request Body (multipart/form-data):

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

Response (200):

{
  "improvedContent": "# Improved Content"
}

GET /questionnaire/rag/article/parts#

Summary: Returns list of article parts

Parameters:

NameInTypeRequiredDescription
idqueryarrayYesList of article parts.

Response (200):

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

GET /questionnaire/rag/article/revisions#

Summary: Returns list of article revisions

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.

Response (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}#

Summary: Get article revision info

Parameters:

NameInTypeRequiredDescription
idpathstring (uuid)YesRevision ID.

Response (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}#

Summary: Get article revision content

Parameters:

NameInTypeRequiredDescription
idpathstring (uuid)YesRevision ID.

Response (200):

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

GET /questionnaire/rag/article/analyze#

Summary: Analyze article content with AI

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.
revqueryinteger (int32)NoRevision number.
forcequerybooleanNoForce create new analysis and delete previous incomplete analysis result if exists.

Response (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}#

Summary: Get article analysis result

Parameters:

NameInTypeRequiredDescription
idpathstring (uuid)YesAnalysis ID.

Response (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#

Summary: List all messages

Parameters:

NameInTypeRequiredDescription
idquerystring (uuid)YesRAG Collection ID.
itemquerystring (uuid)NoRAG Item ID.
messagequerystring (uuid)NoMessage ID.
ascquerybooleanNoAscending sort.
psqueryinteger (int32)NoPage size.
pqueryinteger (int32)No1-based page number.

Response (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#

Summary: Add new message

Parameters:

NameInTypeRequiredDescription
idquerystring (uuid)YesRAG Collection ID.
itemquerystring (uuid)NoRAG Item ID.
messagequerystring (uuid)NoMessage ID to reply.

Request Body:

{
  "text": "New message content"
}

Response (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#

Summary: Update existing message

Parameters:

NameInTypeRequiredDescription
cquerystring (uuid)YesRAG Collection ID.
idquerystring (uuid)YesMessage ID.

Request Body:

{
  "text": "Updated message content"
}

Response (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#

Summary: Delete existing message

Parameters:

NameInTypeRequiredDescription
idquerystring (uuid)YesMessage ID.

Response (200):

{}

RagFaq#

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

Summary: Summary for Home page

Parameters:

NameInTypeRequiredDescription
projquerystring (uuid)NoProject ID.

Response (200):

{
  "active": 3
}

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

Summary: Number of FAQ collections.

Parameters:

NameInTypeRequiredDescription
qquerystringNoFilter on collection name or code.
statequeryarrayNoFilter on states.
projectqueryarrayNoFilter on projects.

Response (200):

3

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

Summary: Get list of FAQ collections.

Parameters:

NameInTypeRequiredDescription
qquerystringNoFilter on collection name or code.
statequeryarrayNoFilter on states.
projectqueryarrayNoFilter on projects.
squerystringNoSort field.
ascquerybooleanNoAscending sort.
psqueryinteger (int32)NoPage size.
pqueryinteger (int32)No1-based page number.

Response (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#

Summary: Find FAQ items.

Parameters:

NameInTypeRequiredDescription
qquerystringYesFilter on question.
projectquerystring (uuid)NoFilter on project.
psqueryinteger (int32)NoPage size.
pqueryinteger (int32)No1-based page number.

Response (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#

Summary: Create new FAQ collection.

Request Body (multipart/form-data):

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

Response (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#

Summary: Update FAQ collection metadata.

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#

Summary: Delete FAQ collection.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the article.

GET /questionnaire/rag/faq-collection#

Summary: Get FAQ collection.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the collection.

Response (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#

Summary: Check existence of FAQ collection.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the collection.

Response (200):

true

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

Summary: Number of FAQ items.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the collection.
qquerystringNoFilter on FAQ item content.

Request Body:

["Active", "Default"]

Response (200):

5

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

Summary: Get list of FAQ items.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the collection.
qquerystringNoFilter on FAQ item content.
statequeryarrayNoFilter on states.
squerystringNoSort field.
ascquerybooleanNoAscending sort.
psqueryinteger (int32)NoPage size.
pqueryinteger (int32)No1-based page number.

Response (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#

Summary: Create new FAQ item.

Request Body:

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

Response (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#

Summary: Get FAQ item.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the collection.
indexqueryinteger (int32)YesZero-based index of the FAQ item in the collection.

Response (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#

Summary: Update FAQ item.

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#

Summary: Delete FAQ item.

Parameters:

NameInTypeRequiredDescription
codequerystringYesCode of the collection.
indexqueryinteger (int32)YesZero-based index of the FAQ item in the collection.

RagQuery#

POST /questionnaire/rag/query#

Summary: Do query in RAG Knowledge Base

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
}

Response (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#

Summary: Do query in RAG Knowledge Base

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
}

Response (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#

Summary: Do query in RAG Knowledge Base

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
}

Response (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
    }
  ]
}
to top
Select language