### API Combined Parameters Example Source: https://developer.parseur.com/pagination-searching-sorting An example of combining pagination, search, and sorting parameters in a single API request to refine results. ```http /parser?page=1&page_size=50&search=invoice&ordering=-created ``` -------------------------------- ### Download Mailbox JSON Export using cURL Source: https://developer.parseur.com/get-data-without-webhooks This example demonstrates how to download a mailbox's JSON export directly using a provided download URL obtained from the `/parser/{id}` endpoint. The `-L` flag ensures that redirects are followed, which is often necessary for download links. ```bash curl -L "" > mailbox.json ``` -------------------------------- ### Test API Key with Python (requests) Source: https://developer.parseur.com/authentication This Python example demonstrates how to test your API key using the `requests` library. It constructs the `Authorization` header from an environment variable and makes a GET request to the API root, raising an exception for bad status codes. ```python import os, requests headers = {"Authorization": os.environ['PARSEUR_API_KEY']} r = requests.get("https://api.parseur.com/", headers=headers) r.raise_for_status() ``` -------------------------------- ### GET /bootstrap Source: https://developer.parseur.com/get-bootstrap-config-19939632e0 Retrieves bootstrap configuration choices for various settings within the Parseur system. ```APIDOC ## GET /bootstrap ### Description Retrieves bootstrap configuration choices for various settings within the Parseur system. This endpoint provides a list of available options for document statuses, parser engines, date formats, user roles, and more. ### Method GET ### Endpoint /bootstrap ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **choices** (object) - An object containing various configuration choices. - **document.status** (array) - Array of possible document statuses. - **document.status_source** (array) - Array of possible document status sources. - **parser.ai_engine** (array) - Array of available AI engines for parsing. - **parser.ordering** (array) - Array of possible parser ordering options. - **parser.pdf_conversion_format** (array) - Array of supported PDF conversion formats. - **parser.identification_status** (array) - Array of possible identification statuses for parsers. - **parser_field.format** (array) - Array of supported formats for parser fields. - **template.action** (array) - Array of possible actions for templates. - **template.status** (array) - Array of possible template statuses. - **template.merge_row_behavior** (array) - Array of behaviors for merging template rows. - **template_field.format** (array) - Array of supported formats for template fields. - **template_object.errors.code** (array) - Array of error codes for template objects. - **account.auto_subscription_feature** (array) - Array of auto-subscription features for accounts. - **account.decimal_separator** (array) - Array of supported decimal separators for accounts. - **account.default_timezone** (array) - Array of default timezones for accounts. - **account.input_date_format** (array) - Array of supported input date formats for accounts. - **user.roles** (array) - Array of available user roles. - **user.permissions** (array) - Array of available user permissions. - **webhook.status** (array) - Array of possible webhook statuses. - **webhook.event** (array) - Array of possible webhook events. #### Response Example ```json { "choices": { "document.status": [ ["draft", "Draft"] ], "document.status_source": [ ["manual", "Manual"] ], "parser.ai_engine": [ ["ocr", "OCR"] ], "parser.ordering": [ ["asc", "Ascending"] ], "parser.pdf_conversion_format": [ ["pdf", "PDF"] ], "parser.identification_status": [ ["pending", "Pending"] ], "parser_field.format": [ ["string", "String"] ], "template.action": [ ["create", "Create"] ], "template.status": [ ["active", "Active"] ], "template.merge_row_behavior": [ ["merge", "Merge"] ], "template_field.format": [ ["date", "Date"] ], "template_object.errors.code": [ ["invalid_field", "Invalid Field"] ], "account.auto_subscription_feature": [ ["enabled", "Enabled"] ], "account.decimal_separator": [ [".", "Dot"] ], "account.default_timezone": [ ["UTC", "UTC"] ], "account.input_date_format": [ ["YYYY-MM-DD", "YYYY-MM-DD"] ], "user.roles": [ ["admin", "Admin"] ], "user.permissions": [ ["read", "Read"] ], "webhook.status": [ ["enabled", "Enabled"] ], "webhook.event": [ ["document.created", "Document Created"] ] } } ``` ``` -------------------------------- ### Install parseur-py Python Library and CLI Source: https://developer.parseur.com/official-libraries Installs the 'parseur-py' package, which includes both the Python library for programmatic access and the command-line interface (CLI) for terminal operations. It's recommended to use Python 3.10+ with a virtual environment. ```bash pip install parseur-py ``` -------------------------------- ### GET /websites/developer_parseur Source: https://developer.parseur.com/parserdiet-8568220d0 Retrieves the configuration details for a specific Parseur. ```APIDOC ## GET /websites/developer_parseur ### Description Retrieves the configuration details for a specific Parseur, including document counts, settings, and output configurations. ### Method GET ### Endpoint /websites/developer_parseur ### Parameters #### Query Parameters None #### Request Body None ### Response #### Success Response (200) - **document_count** (integer) - The number of documents in the parser. - **document_per_status_count** (object) - A breakdown of documents by status (e.g., INCOMING, ANALYZING, PARSEDOK). - **email_prefix** (string) - The email prefix for the parser. - **even_pages** (boolean) - Whether to process only even page numbers. - **force_ocr** (boolean) - Whether Parseur runs its own OCR on uploaded documents. - **id** (integer) - The internal ID number for the parser. - **is_master** (boolean) - Whether this is a master parser. - **last_activity** (string, format: date-time) - The last activity timestamp. - **name** (string) - The name of the parser. - **odd_pages** (boolean) - Whether to process only odd page numbers. - **page_range_set** (array) - The range of pages set to be processed. - **parser_object_count** (integer) - The total number of field and metadata outputs configured. - **parser_object_set_last_modified** (string, format: date-time, nullable: true) - The last modification time of parser fields. - **process_attachments** (boolean) - Whether email attachment processing is enabled. - **retention_policy** (integer) - How many days documents are stored before deletion. - **split_keywords** (array, nullable: true) - Keywords for splitting documents by page. - **split_page** (integer, nullable: true) - The number of pages to split files into. - **split_page_range_set** (array, nullable: true) - Specific page ranges for splitting. #### Response Example ```json { "document_count": 150, "document_per_status_count": { "INCOMING": 10, "ANALYZING": 5, "PROGRESS": 20, "PARSEDOK": 100, "PARSEDKO": 5, "QUOTAEXC": 0, "SKIPPED": 0, "SPLIT": 0, "DELETED": 0, "EXPORTKO": 0, "TRANSKO": 0, "INVALID": 0 }, "email_prefix": "myparser", "even_pages": false, "force_ocr": true, "id": 12345, "is_master": false, "last_activity": "2023-10-27T10:00:00Z", "name": "My Important Parser", "odd_pages": false, "page_range_set": [ { "start_page": 1, "end_page": 5 } ], "parser_object_count": 25, "parser_object_set_last_modified": "2023-10-26T09:00:00Z", "process_attachments": true, "retention_policy": 90, "split_keywords": [ { "keyword": "---", "is_before": true } ], "split_page": 0, "split_page_range_set": null } ``` ``` -------------------------------- ### Example JSON Payload for Webhook Source: https://developer.parseur.com/webhooks This is an example of the JSON payload structure that Parseur sends via HTTP POST requests when a document is processed. The actual keys will vary based on your mailbox schema and any custom metadata fields you have configured. ```json { "order_id": "12345", "total": 199.99, "items": [ {"sku": "ABC", "qty": 2}, {"sku": "XYZ", "qty": 1} ], "DocumentID": "1e2e34cba5c678a9012f3e456c789a0f" } ``` -------------------------------- ### Parse JSON Data Source: https://developer.parseur.com/get-data-without-webhooks This snippet shows how to parse JSON data obtained from polling the `/document/{id}` endpoint. It provides examples for JavaScript, Python, and the command-line tool `jq`. This is useful when webhooks cannot be used. ```javascript JSON.parse(jsonData) ``` ```python import json data = json.loads(jsonData) ``` ```bash echo "$jsonData" | jq fromjson ``` -------------------------------- ### API Pagination Example Source: https://developer.parseur.com/pagination-searching-sorting Demonstrates how to request a specific page and page size for API results. The response includes count, current page, total pages, and the results for the requested page. ```http GET /parser?page=2&page_size=50 ``` -------------------------------- ### Initialize parseur CLI with API Key Source: https://developer.parseur.com/official-libraries Initializes the parseur CLI by setting your API key. This configuration is saved to a file (typically '~/.parseur.conf') for subsequent commands, avoiding the need to repeatedly provide the API key. ```bash parseur init --api-key ``` -------------------------------- ### Parse Document Result JSON String using jq Source: https://developer.parseur.com/get-data-without-webhooks This example shows how to parse the JSON string contained within the 'result' field of a document's API response using the `jq` command-line JSON processor. It pipes the output of a cURL request directly into `jq` to convert the string into a usable JSON object. ```bash curl -s "https://api.parseur.com/document/" \ -H "Authorization: " \ | jq -r '.result | fromjson' ``` -------------------------------- ### Parser Configuration Details Source: https://developer.parseur.com/get-a-mailbox-19932195e0 Retrieves detailed configuration settings for a specific parser. ```APIDOC ## GET /websites/developer_parseur ### Description Retrieves the full configuration details for a specific parser, including settings related to email, page processing, OCR, and document splitting. ### Method GET ### Endpoint /websites/developer_parseur ### Response #### Success Response (200) - **email_prefix** (string) - The email prefix for the parser. - **even_pages** (boolean) - Whether the parser is configured to process only even page numbers. - **force_ocr** (boolean) - Whether Parseur runs its own OCR on every uploaded document. - **id** (integer) - The internal ID number for the parser. - **is_master** (boolean) - Whether this is a master parser. - **last_activity** (string, format: date-time) - The timestamp of the last activity. - **master_parser_name** (string) - The name of this parser's master parser. - **master_parser_slug** (string) - The slug of this parser's master parser. - **name** (string) - The name of the parser. - **odd_pages** (boolean) - Whether the parser is configured to process only odd page numbers. - **page_range_set** (array) - The range of pages set to be processed. - **parser_object_count** (integer) - The total number of field and metadata outputs configured. - **parser_object_set_last_modified** (string, format: date-time) - The last modified timestamp for parser objects. - **process_attachments** (boolean) - Whether email attachment processing is enabled. - **retention_policy** (integer) - How many days documents and data are stored before deletion. - **split_keywords** (array or null) - The keyword(s) used for splitting documents by page. - **split_page** (integer or null) - The number of pages to use for splitting files. - **split_page_range_set** (array) - The page ranges set for splitting documents. #### Response Example ```json { "email_prefix": "example", "even_pages": false, "force_ocr": true, "id": 12345, "is_master": false, "last_activity": "2023-10-27T10:00:00Z", "master_parser_name": "Master Parser", "master_parser_slug": "master-parser", "name": "My Parser", "odd_pages": false, "page_range_set": [ { "start_page": 1, "end_page": 5 } ], "parser_object_count": 10, "parser_object_set_last_modified": "2023-10-26T15:30:00Z", "process_attachments": true, "retention_policy": 90, "split_keywords": ["keyword1", "keyword2"], "split_page": 3, "split_page_range_set": [ { "start_page": 1, "end_page": 3 } ] } ``` ``` -------------------------------- ### Testing API Key with GET / Source: https://developer.parseur.com/authentication A simple GET request to the API root can be used to test your API key authentication. ```APIDOC ## Test API Key with GET / ### Description Perform a GET request to the API root (`https://api.parseur.com/`) to verify that your API key is correctly configured and authenticated. ### Method GET ### Endpoint `https://api.parseur.com/` ### Parameters #### Header Parameters - **Authorization** (string) - Required - Your API key. Format: `YOUR_API_KEY` ### Request Example (cURL) ```bash curl -X GET "https://api.parseur.com/" \ -H "Authorization: " \ --compressed ``` ### Request Example (Javascript - fetch) ```javascript const res = await fetch("https://api.parseur.com/", { method: "GET", headers: { Authorization: process.env.PARSEUR_API_KEY, }, }); ``` ### Request Example (Python - requests) ```python import os, requests headers = {"Authorization": os.environ['PARSEUR_API_KEY']} r = requests.get("https://api.parseur.com/", headers=headers) r.raise_for_status() ``` ### Response #### Success Response (200 OK) If authentication is successful, the API will return a 200 OK status with a JSON payload containing links to available resources. - **document** (string) - URL to the document endpoint. - **parser** (string) - URL to the parser endpoint. #### Response Example ```json { "document": "http://api.parseur.com/document", "parser": "http://api.parseur.com/parser" } ``` ``` -------------------------------- ### Bootstrap Configuration Source: https://developer.parseur.com/llms Endpoint to retrieve bootstrap configuration. ```APIDOC ## Get Bootstrap Config ### Description Retrieves the bootstrap configuration for the Parseur client. ### Method GET ### Endpoint /bootstrap ### Parameters None ### Response #### Success Response (200) - **config** (object) - The bootstrap configuration object. #### Response Example ```json { "config": { "api_url": "https://api.parseur.com/v1", "some_setting": "value" } } ``` ``` -------------------------------- ### Get Parsed Data Source: https://developer.parseur.com/list-custom-downloads-20126915e0 Retrieves the parsed data for a specific parser. You can specify the parser ID to get its associated fields and items. The data can also be downloaded in CSV or XLS format. ```APIDOC ## GET /websites/developer_parseur ### Description Retrieves parsed data from a specific parser, including fields, items, and download links for CSV and XLS formats. ### Method GET ### Endpoint /websites/developer_parseur ### Parameters #### Query Parameters - **parser_field_id** (string) - Optional - The ID of the parser field to retrieve. - **parser_field_name** (string) - Optional - The name of the parser field to retrieve. - **items** (boolean) - Optional - Whether to include items in the response. Defaults to false. - **csv_download** (boolean) - Optional - Whether to include a CSV download link. Defaults to false. - **xls_download** (boolean) - Optional - Whether to include an XLS download link. Defaults to false. ### Request Example ``` GET /websites/developer_parseur?items=true&csv_download=true ``` ### Response #### Success Response (200) - **id** (string) - The unique identifier of the parser. - **name** (string) - The name of the parser. - **type** (string) - The type of the parser. - **items** (array) - An array of parsed items (if requested). - **csv_download** (string) - URL to download data in CSV format (if requested). - **xls_download** (string) - URL to download data in XLS format (if requested). #### Response Example ```json { "id": "parser123", "name": "Invoice Parser", "type": "email", "items": [ { "field1": "value1", "field2": "value2" } ], "csv_download": "https://api.parseur.com/download/csv/parser123", "xls_download": "https://api.parseur.com/download/xls/parser123" } ``` ``` -------------------------------- ### Common parseur CLI Commands Source: https://developer.parseur.com/official-libraries Demonstrates common commands for the parseur CLI, including listing mailboxes, listing documents for a specific mailbox, uploading a file, and creating a webhook. These commands simplify interacting with Parseur from the terminal. ```bash parseur list-mailboxes parseur list-documents parseur upload-file ./path/to/file.pdf parseur create-webhook --event document.processed --target-url https://example.com/webhook --mailbox-id ``` -------------------------------- ### POST /parser Source: https://developer.parseur.com/create-a-mailbox-19932194e0 Creates a new mailbox with the specified parser configuration. This endpoint allows for the creation of mailboxes, which can be configured with various settings related to document parsing, OCR, and attachment handling. ```APIDOC ## POST /parser ### Description Creates a new mailbox with the specified parser configuration. This endpoint allows for the creation of mailboxes, which can be configured with various settings related to document parsing, OCR, and attachment handling. ### Method POST ### Endpoint /parser ### Parameters #### Query Parameters None #### Request Body - **ai_engine** (string) - Required - The AI engine to use for parsing (e.g., "GCP_AI_1"). - **identification_status** (string) - Required - The initial identification status for documents (e.g., "REQUESTED"). ### Request Example ```json { "ai_engine": "GCP_AI_1", "identification_status": "REQUESTED" } ``` ### Response #### Success Response (201) - **account_uuid** (string) - The unique identifier for the account. - **ai_engine** (string) - The AI engine used. - **attachments_only** (boolean) - Whether to only process attachments. - **attachments_only_override** (null) - Override for attachments only setting. - **can_transform** (boolean) - Whether transformation is enabled. - **disable_deskew** (boolean) - Whether to disable deskewing. - **enable_layouted_text** (boolean) - Whether to enable layouted text extraction. - **enable_image_ocr** (boolean) - Whether to enable image OCR. - **document_count** (integer) - The total number of documents. - **document_per_status_count** (object) - Count of documents per status. - **email_prefix** (string) - The email prefix for the mailbox. - **even_pages** (boolean) - Whether to process even pages. - **force_ocr** (boolean) - Whether to force OCR. - **id** (integer) - The unique identifier for the mailbox. - **is_master** (boolean) - Whether this is a master mailbox. - **last_activity** (string) - The timestamp of the last activity. - **name** (string) - The name of the mailbox. - **odd_pages** (boolean) - Whether to process odd pages. - **page_range_set** (array) - Set of page ranges. - **parser_object_count** (integer) - The number of parser objects. - **parser_object_set_last_modified** (null) - Timestamp of last modification for parser objects. - **process_attachments** (boolean) - Whether to process attachments. - **retention_policy** (integer) - The retention policy in days. - **split_keywords** (null) - Keywords for splitting documents. - **split_page** (null) - Page number for splitting documents. - **split_page_range_set** (array) - Set of page ranges for splitting. - **template_count** (integer) - The number of templates. - **webhook_count** (integer) - The number of webhooks. - **attachments_field** (boolean) - Whether the attachments field is enabled. - **original_document_field** (boolean) - Whether the original document field is enabled. - **searchable_pdf_field** (boolean) - Whether the searchable PDF field is enabled. - **headers_field** (boolean) - Whether the headers field is enabled. - **received_field** (boolean) - Whether the received field is enabled. - **received_date_field** (boolean) - Whether the received date field is enabled. - **received_time_field** (boolean) - Whether the received time field is enabled. - **processed_field** (boolean) - Whether the processed field is enabled. - **processed_date_field** (boolean) - Whether the processed date field is enabled. - **processed_time_field** (boolean) - Whether the processed time field is enabled. - **sender_field** (boolean) - Whether the sender field is enabled. - **sender_name_field** (boolean) - Whether the sender name field is enabled. - **split_page_range_field** (boolean) - Whether the split page range field is enabled. - **recipient_field** (boolean) - Whether the recipient field is enabled. - **to_field** (boolean) - Whether the to field is enabled. - **cc_field** (boolean) - Whether the cc field is enabled. - **bcc_field** (boolean) - Whether the bcc field is enabled. - **reply_to_field** (boolean) - Whether the reply to field is enabled. - **recipient_suffix_field** (boolean) - Whether the recipient suffix field is enabled. - **original_recipient_field** (boolean) - Whether the original recipient field is enabled. - **subject_field** (boolean) - Whether the subject field is enabled. - **template_field** (boolean) - Whether the template field is enabled. - **html_document_field** (boolean) - Whether the HTML document field is enabled. - **text_document_field** (boolean) - Whether the text document field is enabled. - **content_field** (boolean) - Whether the content field is enabled. - **last_reply_field** (boolean) - Whether the last reply field is enabled. - **document_id_field** (boolean) - Whether the document ID field is enabled. - **parent_id_field** (boolean) - Whether the parent ID field is enabled. - **document_url_field** (boolean) - Whether the document URL field is enabled. - **public_document_url_field** (boolean) - Whether the public document URL field is enabled. - **page_count_field** (boolean) - Whether the page count field is enabled. - **credit_count_field** (boolean) - Whether the credit count field is enabled. - **mailbox_id_field** (boolean) - Whether the mailbox ID field is enabled. - **parsing_engine_field** (boolean) - Whether the parsing engine field is enabled. - **csv_download** (string) - URL for CSV download. - **decimal_separator** (null) - Decimal separator setting. - **default_timezone** (null) - Default timezone setting. - **disable_document_links** (boolean) - Whether to disable document links. - **expand_result** (boolean) - Whether to expand the result. - **extract_xml_from_comment** (boolean) - Whether to extract XML from comments. - **input_date_format** (null) - Input date format setting. - **identification_status** (string) - The identification status. - **is_transform_enabled** (boolean) - Whether transform is enabled. - **json_download** (string) - URL for JSON download. - **parser_object_set** (array) - Set of parser objects. - **pdf_conversion_format** (string) - The PDF conversion format (e.g., "TXT_LAYOUT"). - **secret** (string) - The secret key for the mailbox. - **transform** (null) - Transform settings. - **unzip_attachments** (boolean) - Whether to unzip attachments. - **use_whitelist_instead_of_blacklist** (boolean) - Whether to use whitelist instead of blacklist. - **template_set_last_modified** (null) - Timestamp of last modification for template set. - **webhook_set** (array) - Set of webhooks. - **xls_download** (string) - URL for XLS download. - **zip_attachments** (boolean) - Whether to zip attachments. - **available_webhook_set** (array) - Set of available webhooks. - **table_set** (array) - Set of tables. #### Response Example ```json { "account_uuid": "acc_9876541ef2f5467db594234a0f4ef1af", "ai_engine": "GCP_AI_1", "attachments_only": false, "attachments_only_override": null, "can_transform": false, "disable_deskew": false, "enable_layouted_text": true, "enable_image_ocr": true, "document_count": 0, "document_per_status_count": { "INCOMING": 0, "ANALYZING": 0, "PROGRESS": 0, "PARSEDOK": 0, "PARSEDKO": 0, "QUOTAEXC": 0, "SKIPPED": 0, "SPLIT": 0, "DELETED": 0, "EXPORTKO": 0, "TRANSKO": 0, "INVALID": 0 }, "email_prefix": "steadfast.tender.tamarin", "even_pages": true, "force_ocr": false, "id": 321654, "is_master": false, "last_activity": "2025-08-08T12:00:39.796530Z", "name": "Steadfast Tender Tamarin", "odd_pages": true, "page_range_set": [], "parser_object_count": 0, "parser_object_set_last_modified": null, "process_attachments": true, "retention_policy": 90, "split_keywords": null, "split_page": null, "split_page_range_set": [], "template_count": 0, "webhook_count": 0, "attachments_field": false, "original_document_field": false, "searchable_pdf_field": false, "headers_field": false, "received_field": false, "received_date_field": false, "received_time_field": false, "processed_field": false, "processed_date_field": false, "processed_time_field": false, "sender_field": false, "sender_name_field": false, "split_page_range_field": false, "recipient_field": false, "to_field": false, "cc_field": false, "bcc_field": false, "reply_to_field": false, "recipient_suffix_field": false, "original_recipient_field": false, "subject_field": false, "template_field": false, "html_document_field": false, "text_document_field": false, "content_field": false, "last_reply_field": false, "document_id_field": false, "parent_id_field": false, "document_url_field": false, "public_document_url_field": false, "page_count_field": false, "credit_count_field": false, "mailbox_id_field": false, "parsing_engine_field": false, "csv_download": "/parser/.tender.tamarin.csv", "decimal_separator": null, "default_timezone": null, "disable_document_links": false, "expand_result": false, "extract_xml_from_comment": false, "input_date_format": null, "identification_status": "REQUESTED", "is_transform_enabled": false, "json_download": "/parser/.tender.tamarin.json", "parser_object_set": [], "pdf_conversion_format": "TXT_LAYOUT", "secret": "", "transform": null, "unzip_attachments": true, "use_whitelist_instead_of_blacklist": false, "template_set_last_modified": null, "webhook_set": [], "xls_download": "/parser/.tender.tamarin.xlsx", "zip_attachments": false, "available_webhook_set": [], "table_set": [] } ``` #### Error Response (400) - **non_field_errors** (string) - Description of the error if the input is invalid. #### Error Response (403) - **non_field_errors** (string) - Description of the error if the request is forbidden. ``` -------------------------------- ### API Sorting Example Source: https://developer.parseur.com/pagination-searching-sorting Shows how to sort API results by a specific field using the `ordering` parameter. Ascending order is default, while descending order is indicated by a hyphen prefix. ```http /parser?ordering=-document_count ``` -------------------------------- ### Get Mailbox Data Exports Source: https://developer.parseur.com/get-data-without-webhooks Retrieve stable URLs for downloading mailbox-level data exports in CSV, JSON, or Excel formats. These URLs are publicly accessible and do not change. ```APIDOC ## GET /parser/{id} ### Description Retrieves configuration and download URLs for a specific mailbox. ### Method GET ### Endpoint `/parser/` ### Parameters #### Path Parameters - **MAILBOX_ID** (string) - Required - The unique identifier of the mailbox. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET "https://api.parseur.com/parser/" \ -H "Authorization: " \ --compressed ``` ### Response #### Success Response (200) - **csv_download** (string) - URL for the CSV export. - **json_download** (string) - URL for the JSON export. - **xls_download** (string) - URL for the Excel export. #### Response Example ```json { "id": "", "name": "Example Mailbox", "csv_download": "https://api.parseur.com/download/csv/...", "json_download": "https://api.parseur.com/download/json/...", "xls_download": "https://api.parseur.com/download/xls/..." } ``` ### Notes - Use the provided download URLs to fetch the data directly. - See [Endpoints → Mailbox (Parser) → Get a mailbox](https://developer.parseur.com/get-a-mailbox-19932195e0.md) for the full response schema. ``` -------------------------------- ### Get a Document by ID Source: https://developer.parseur.com/get-data-without-webhooks Manually fetch the parsed result of a single document using its unique ID. This method is an alternative to webhooks and should be used judiciously to avoid excessive load and latency. ```APIDOC ## GET /document/{id} ### Description Retrieves the parsed data for a specific document. ### Method GET ### Endpoint `/document/` ### Parameters #### Path Parameters - **DOCUMENT_ID** (string) - Required - The unique identifier of the document. #### Query Parameters None #### Request Body None ### Request Example ```bash curl -X GET "https://api.parseur.com/document/" \ -H "Authorization: " \ --compressed ``` ### Response #### Success Response (200) - **id** (string) - The document ID. - **status** (string) - The processing status of the document (e.g., "PARSEDOK"). - **result** (string) - A JSON string containing the parsed data. #### Response Example ```json { "id": "123456789", "status": "PARSEDOK", "result": "{\"order_id\":\"12345\",\"total\":199.99,\"items\":[{\"sku\":\"ABC\",\"qty\":2}]}" } ``` ### Notes - The `result` field contains a JSON string that needs to be parsed further. - Refer to [Get a document](https://developer.parseur.com/get-a-document-19984379e0.md) for the full response schema. ``` -------------------------------- ### Parseur Python Quick Start: List Mailboxes Source: https://developer.parseur.com/official-libraries A basic Python script demonstrating how to use the 'parseur-py' library to list mailboxes. It requires setting the API key and then iterates through the mailboxes, printing their names. This serves as an entry point for programmatic interaction. ```python import parseur parseur.api_key = "YOUR_API_KEY" for mailbox in parseur.Mailbox.list(): print(mailbox.name) ``` -------------------------------- ### Parser Configuration Source: https://developer.parseur.com/create-a-mailbox-19932194e0 This section details the configuration options available for a parser, including metadata field enablement, download URLs, and various parsing settings. ```APIDOC ## GET /websites/developer_parseur ### Description Retrieves the configuration details for a specific parser. ### Method GET ### Endpoint /websites/developer_parseur ### Parameters #### Query Parameters - **template_field** (boolean) - Optional - Whether the Template metadata field is enabled for this parser. - **html_document_field** (boolean) - Optional - Whether the HTMLDocument metadata field is enabled for this parser. - **text_document_field** (boolean) - Optional - Whether the TextDocument metadata field is enabled for this parser. - **content_field** (boolean) - Optional - Whether the Content metadata field is enabled for this parser. - **last_reply_field** (boolean) - Optional - Whether the LastReply metadata field is enabled for this parser. - **document_id_field** (boolean) - Optional - Whether the DocumentID metadata field is enabled for this parser. - **parent_id_field** (boolean) - Optional - Whether the ParentID metadata field is enabled for this parser. - **document_url_field** (boolean) - Optional - Whether the DocumentURL metadata field is enabled for this parser. - **public_document_url_field** (boolean) - Optional - Whether the PublicDocumentURL metadata field is enabled for this parser. - **page_count_field** (boolean) - Optional - Whether the PageCount metadata field is enabled for this parser. - **credit_count_field** (boolean) - Optional - Whether the CreditCount metadata field is enabled for this parser. - **mailbox_id_field** (boolean) - Optional - Whether the MailboxID metadata field is enabled for this parser. - **parsing_engine_field** (boolean) - Optional - Whether the ParsingEngine metadata field is enabled for this parser. - **decimal_separator** (string) - Optional - Specifies the decimal separator to be used. Accepts values from DecimalSeparatorEnum or null. - **default_timezone** (string) - Optional - Sets the default timezone for the parser. - **disable_document_links** (boolean) - Optional - Disables document links. - **expand_result** (boolean) - Optional - Expands the result. - **extract_xml_from_comment** (boolean) - Optional - Extracts XML from comments. - **input_date_format** (string) - Optional - Specifies the input date format. Accepts values from InputDateFormatEnum or null. - **identification_status** (string) - Optional - The identification status of the parser, referencing ParserIdentificationStatusEnum. - **is_transform_enabled** (boolean) - Optional - Enables or disables transformation. ### Response #### Success Response (200) - **csv_download** (string) - URI for CSV download. ReadOnly. - **json_download** (string) - URI for JSON download. ReadOnly. - **parser_object_set** (array) - An array of parser objects, each with id, name, format, is_optional, query, json_download, csv_download, xls_download, type, and nested parser_object_set. #### Response Example ```json { "template_field": true, "html_document_field": false, "text_document_field": true, "content_field": true, "last_reply_field": false, "document_id_field": true, "parent_id_field": false, "document_url_field": true, "public_document_url_field": false, "page_count_field": true, "credit_count_field": false, "mailbox_id_field": false, "parsing_engine_field": true, "csv_download": "/path/to/csv/download", "decimal_separator": ".", "default_timezone": "UTC", "disable_document_links": false, "expand_result": true, "extract_xml_from_comment": false, "input_date_format": "YYYY-MM-DD", "identification_status": "IDENTIFIED", "is_transform_enabled": true, "json_download": "/path/to/json/download", "parser_object_set": [ { "id": "obj1", "name": "Object 1", "format": "json", "is_optional": false, "query": "$.data", "json_download": "/path/to/obj1/json", "csv_download": "/path/to/obj1/csv", "xls_download": "/path/to/obj1/xls", "type": "object", "parser_object_set": [] } ] } ``` ``` -------------------------------- ### OpenAPI Specification for /parser GET Endpoint Source: https://developer.parseur.com/list-mailboxes-19932193e0 This snippet details the OpenAPI 3.0.1 specification for the GET request to the /parser endpoint. It includes information on query parameters for pagination, filtering, and ordering, as well as the structure of the 200 OK response, which includes mailbox details. ```yaml openapi: 3.0.1 info: title: '' description: '' version: 1.0.0 paths: /parser: get: summary: List mailboxes deprecated: false description: Optional query parameters for pagination and filtering tags: - Endpoints/Mailbox (Parser) parameters: - 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 enum: - name - '-name' - document_count - '-document_count' - template_count - '-template_count' - PARSEDOK_count - '-PARSEDOK_count' - PARSEDKO_count - '-PARSEDKO_count' - QUOTAEXC_count - '-QUOTAEXC_count' - EXPORTKO_count - '-EXPORTKO_count' - TRANSKO_count - '-TRANSKO_count' x-apidog-enum: - value: name name: Name description: '' - value: '-name' name: Name (desc) description: '' - value: document_count name: Document count description: '' - value: '-document_count' name: Document count (desc) description: '' - value: template_count name: Template count description: '' - value: '-template_count' name: Template count (desc) description: '' - value: PARSEDOK_count name: Processed count description: '' - value: '-PARSEDOK_count' name: Processed count (desc) (desc) description: '' - value: PARSEDKO_count name: Process failed count description: '' - value: '-PARSEDKO_count' name: Process failed count (desc) description: '' - value: QUOTAEXC_count name: Quota exceeded count description: '' - value: '-QUOTAEXC_count' name: Quota exceeded count (desc) description: '' - value: EXPORTKO_count name: Export failed count description: '' - value: '-EXPORTKO_count' name: Export failed count (desc) description: '' - value: TRANSKO_count name: Post processing failed count description: '' - value: '-TRANSKO_count' name: Post processing failed count (desc) description: '' nullable: true responses: '200': description: '' content: application/json: schema: type: object properties: count: type: integer readOnly: true current: type: integer readOnly: true total: type: integer readOnly: true results: type: array items: properties: account_uuid: type: string ai_engine: type: string attachments_only: type: boolean attachments_only_override: type: 'null' can_transform: type: boolean disable_deskew: type: boolean enable_layouted_text: type: boolean enable_image_ocr: type: boolean document_count: type: integer document_per_status_count: type: object properties: INCOMING: ```