Skip to main content

Create Documents

Create multiple documents in the Odoo system and associate them with a specific Quantum AI agent.

Endpoint

Authentication

Bearer Token RequiredThe token must be valid for documents endpoint and POST method.

Input Parameters

Body Parameters

integer
required
Document owner ID
integer
required
Company ID
integer
required
Quantum AI agent ID
array
required
Array of documents to create. Each document must contain:

Responses

Usage Examples

Example 1: Multiple documents

Example 2: Simple text document

Common MIME Types

  • PDF: application/pdf
  • Word: application/msword
  • Word (nuevo): application/vnd.openxmlformats-officedocument.wordprocessingml.document
  • Excel: application/vnd.ms-excel
  • Excel (nuevo): application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
  • JPEG: image/jpeg
  • PNG: image/png
  • GIF: image/gif
  • WebP: image/webp
  • Plain text: text/plain
  • ZIP: application/zip
  • JSON: application/json
  • XML: application/xml

Important Considerations

Validations

  • All required fields must be present
  • IDs must be valid integers
  • The documents array cannot be empty
  • Base64 content must be valid
  • Company, Agent and Owner must exist

Behavior

  • Individual processing per document
  • Automatic logging of errors and successes
  • Automatic linking to agent
  • Creation in attachment and document

Limits

  • Consider size limits for large files
  • No specific limit on number of documents
  • Possible timeouts on large requests

Troubleshooting

Solution: Verify that the base64 content is valid
Solution: Verify that the agent exists and is active:
  • The agent must have active = True
  • The ID must be correct
Solution: Contact your system administrator to verify the owner ID and ensure proper user access permissions.
Version: 1.0
Last updated: 2025-01-13