openapi: 3.1.0 info: title: Parseur async Document API description: '' version: 1.0.0 servers: - url: https://api.parseur.com description: Parseur API security: - TokenAuth: [] tags: - name: Document paths: /document/{id}: get: summary: Get a document deprecated: false description: '' tags: - Document parameters: - name: id in: path description: '' required: true example: '{{DOCUMENT_ID}}' schema: type: string responses: '200': description: OK content: application/json: schema: $ref: '#/components/schemas/Document' example: attached_to: null id: 123456789 match_master_template: false name: invoice_3.pdf ocr_ready_url: https://api.parseur.com/document//ocr_ready/invoice_3.pdf original_document_url: https://api.parseur.com/document//invoice_3.pdf parser: 98765 processed: '2025-08-06T12:06:25.210919Z' received: '2025-08-06T11:59:04.717362Z' sample_set: [] status_source: AI status: PARSEDOK template: null credits_used: 4 conventional_credits_used: 0 ai_credits_used: 4 is_ai_ready: true is_ocr_ready: true is_processable: true is_splittable: true is_split: false json_download_url: https://api.parseur.com/document//result/invoice_3.json csv_download_url: https://api.parseur.com/document//result/invoice_3.csv xls_download_url: https://api.parseur.com/document//result/invoice_3.xlsx result: '...Parsed data removed for brevity...' content: '...Content removed for brevity...' next_id: null prev_id: 123456788 ocr_page_set: - image: url: https://api.parseur.com/document/123456789/image/1.jpg width: 1836 height: 2376 content_type: image/jpeg position: 1 included_in_range: true headers: {} '403': $ref: '#/components/responses/Authentication Error' description: '' '404': $ref: '#/components/responses/Not Found' description: '' security: - TokenAuth: [] delete: summary: Delete a document deprecated: false description: '' tags: - Document parameters: - name: id in: path description: '' required: true example: '{{DOCUMENT_ID}}' schema: type: string responses: '204': description: Deleted headers: {} '403': $ref: '#/components/responses/Authentication Error' description: '' '404': $ref: '#/components/responses/Not Found' description: '' security: - TokenAuth: [] /document/{id}/log_set: get: summary: Get document logs deprecated: false description: '' tags: - Document parameters: - name: id in: path description: '' required: true example: '{{DOCUMENT_ID}}' schema: type: string - name: page in: query description: Page number for pagination (default is 1) required: false schema: type: integer minimum: 1 - name: page_size in: query description: Number of results per page (default is 25) required: false schema: type: integer minimum: 1 - name: search in: query description: Case-insensitive partial match search required: false schema: type: string - name: ordering in: query description: Field name to order by (use -prefix for descending) required: false schema: type: string responses: '200': description: List of document logs (paginated) content: application/json: schema: type: object properties: count: type: integer current: type: integer total: type: integer results: type: array items: properties: id: type: integer created: type: string code: type: string document: type: integer document_name: type: string parser: type: integer parser_name: type: string template: type: 'null' template_name: type: 'null' status: type: string source: type: string payload: type: - string - 'null' message: type: string required: - id - created - code - document - document_name - parser - parser_name - template - template_name - status - source - payload - message $ref: '#/components/schemas/Log' required: - count - current - total - results example: count: 3 current: 1 total: 1 results: - id: 2155 created: '2025-08-06T11:59:56.422755Z' code: PARSEDOK document: 123456789 document_name: invoice_3.pdf parser: 54101 parser_name: API Test Mailbox template: null template_name: null status: SUCCESS source: DOCUMENT payload: ..Log payload removed for brevity... message: 'Processed with AI. (4 credits used), here is the final result:' - id: 2153 created: '2025-08-06T11:59:04.743875Z' code: INCOMING document: 123456789 document_name: invoice_3.pdf parser: 54101 parser_name: API Test Mailbox template: null template_name: null status: INFO source: DOCUMENT payload: null message: Received headers: {} '403': $ref: '#/components/responses/Authentication Error' description: '' '404': $ref: '#/components/responses/Not Found' description: '' security: - TokenAuth: [] /document/{id}/skip: post: summary: Skip a document deprecated: false description: '' tags: - Document parameters: - name: id in: path description: '' required: true example: '{{DOCUMENT_ID}}' schema: type: string responses: '200': description: '' content: application/json: schema: $ref: '#/components/schemas/Document' example: attached_to: null id: 123456789 match_master_template: false name: invoice_3.pdf ocr_ready_url: https://api.parseur.com/document//ocr_ready/invoice_3.pdf original_document_url: https://api.parseur.com/document//invoice_3.pdf parser: 98765 processed: '2025-08-06T12:06:25.210919Z' received: '2025-08-06T11:59:04.717362Z' sample_set: [] status_source: AI status: SKIPPED template: null credits_used: 4 conventional_credits_used: 0 ai_credits_used: 4 is_ai_ready: true is_ocr_ready: true is_processable: true is_splittable: true is_split: false json_download_url: https://api.parseur.com/document//result/invoice_3.json csv_download_url: https://api.parseur.com/document//result/invoice_3.csv xls_download_url: https://api.parseur.com/document//result/invoice_3.xlsx result: '...Parsed data removed for brevity...' content: '...Content removed for brevity...' next_id: null prev_id: 123456788 ocr_page_set: - image: url: https://api.parseur.com/document/123456789/image/1.jpg width: 1836 height: 2376 content_type: image/jpeg position: 1 included_in_range: true headers: {} '403': $ref: '#/components/responses/Authentication Error' description: '' '404': $ref: '#/components/responses/Not Found' description: '' security: - TokenAuth: [] components: responses: Not Found: description: '' content: application/json: schema: type: object properties: non_field_errors: type: string required: - non_field_errors examples: Document not found: summary: Document not found value: non_field_errors: Not found Authentication Error: description: '' content: application/json: schema: type: object properties: non_field_errors: type: string required: - non_field_errors examples: Not Authenticated: summary: Not Authenticated value: non_field_errors: Not authenticated Authentication failed: summary: Authentication failed value: non_field_errors: Authentication failed schemas: LogStatusEnum: type: string enum: - SUCCESS - ERROR - INFO - WARNING readOnly: true DocumentStatusSourceEnum: type: - string - 'null' readOnly: true enum: - AI - AUTO - CSV - METADATA - MANUAL - TEMPLATE - TRANSFORM OcrPage: type: object properties: image: type: object properties: url: type: string format: uri readOnly: true width: type: integer readOnly: true height: type: integer readOnly: true content_type: type: string const: image/jpeg readOnly: true required: - url - width - height - content_type readOnly: true position: type: integer readOnly: true included_in_range: type: boolean readOnly: true readOnly: true DocumentStatusEnum: type: string enum: - INCOMING - ANALYZING - PROGRESS - PARSEDOK - PARSEDKO - QUOTAEXC - SKIPPED - SPLIT - EXPORTKO - TRANSKO - INVALID readOnly: true TemplateSample: type: - object - 'null' properties: template_id: type: integer readOnly: true name: type: string readOnly: true sample_count: type: integer readOnly: true required: - template_id - name - sample_count readOnly: true LogSourceEnum: type: string enum: - DOCUMENT - OCRDOC - WEBHOOK readOnly: true Document: type: object properties: attached_to: type: - integer - 'null' readOnly: true id: type: integer readOnly: true match_master_template: type: boolean readOnly: true name: type: string readOnly: true ocr_ready_url: type: - string - 'null' format: uri readOnly: true original_document_url: type: string format: uri readOnly: true parser: type: integer readOnly: true processed: type: string format: date-time readOnly: true received: type: string format: date-time readOnly: true sample_set: type: array items: $ref: '#/components/schemas/TemplateSample' readOnly: true status_source: $ref: '#/components/schemas/DocumentStatusSourceEnum' status: $ref: '#/components/schemas/DocumentStatusEnum' template: type: - integer - 'null' readOnly: true credits_used: type: integer readOnly: true conventional_credits_used: type: integer readOnly: true ai_credits_used: type: integer readOnly: true is_ai_ready: type: boolean readOnly: true is_ocr_ready: type: boolean readOnly: true is_processable: type: boolean readOnly: true is_splittable: type: boolean readOnly: true is_split: type: boolean readOnly: true json_download_url: type: string format: uri readOnly: true csv_download_url: type: string format: uri readOnly: true xls_download_url: type: string format: uri readOnly: true result: type: - string - 'null' readOnly: true content: type: string readOnly: true next_id: type: - integer - 'null' readOnly: true prev_id: type: - integer - 'null' readOnly: true ocr_page_set: type: array items: properties: image: type: object properties: url: type: string width: type: integer height: type: integer content_type: type: string required: - url - width - height - content_type position: type: integer included_in_range: type: boolean $ref: '#/components/schemas/OcrPage' readOnly: true required: - id - match_master_template - name - parser - is_processable - is_splittable - is_split - json_download_url - csv_download_url - xls_download_url - result - content - next_id - prev_id - ocr_page_set - attached_to - ocr_ready_url - original_document_url - processed - received - status_source - status - template - credits_used - is_ai_ready - is_ocr_ready - conventional_credits_used - ai_credits_used - sample_set Log: type: object properties: id: type: integer readOnly: true created: type: string readOnly: true format: date-time code: type: string maxLength: 128 readOnly: true document: type: integer readOnly: true document_name: type: string readOnly: true parser: type: integer readOnly: true parser_name: type: string readOnly: true template: type: - integer - 'null' readOnly: true template_name: type: - string - 'null' readOnly: true status: $ref: '#/components/schemas/LogStatusEnum' source: $ref: '#/components/schemas/LogSourceEnum' payload: type: - string - 'null' readOnly: true message: type: string readOnly: true required: - id - created - code - document - document_name - parser - template - template_name - status - source - payload - message - parser_name securitySchemes: TokenAuth: type: apiKey in: header name: Authorization description: 'Use header: Authorization: Token YOUR_API_KEY. API keys are here: https://app.parseur.com/account/api-keys'