Docpier IDP API
  1. Endpoints
Docpier IDP API
  • IDP API
  • Webhook
  • Endpoints
    • Agent Login (client credential flow)
      POST
    • Upload a document
      POST
    • Retrieve structured data
      GET
    • Provide feedback
      PATCH
  • Schemas
    • Schemas
      • api
        • ApiError
        • DocumentInProgressResponse
        • FeedbackRequest
        • DocumentResponse
      • document
        • element
          • Amount
          • Identification
          • PaymentMethod
          • TaxId
          • CreditCardInfo
        • Unknown
        • Core Document
        • Invoice
        • Reminder
        • CreditCard Statement
        • Insurance Policy
        • Policy Adjustment
      • workspace
        • Workspace
        • Membership
        • Document
        • FlowLog
        • Error
  1. Endpoints

Retrieve structured data

GET
/v1/workspaces/{workspaceId}/documents/{documentId}
Last modified:2025-09-05 14:33:08
Retrieves the structured JSON data extracted from the document identified by the documentId.
This endpoint should be polled periodically until the status in the 202 Accepted response indicates 'COMPLETED'.
A single uploaded file might contain multiple logical documents (e.g., multiple QR bills on one page) or a single one.
Therefore, the response is an array of detected and structured documents.

Request

Authorization
OAuth 2.0
Authorization Code
Client Credentials
Add the parameter
Authorization
to Headers
,whose value is to concatenate the Token after the Bearer.
Example:
Authorization: Bearer ********************
Authorize URL: https://auth.docpier.com/oauth/authorize
Token URL: https://auth.docpier.com/oauth/token
or
Path Params

Responses

🟢200OK
application/json
Processing complete. Returns an array of identified documents.
Body

🟢202Accepted
🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request GET '/v1/workspaces//documents/'
Response Response Example
200 - Example 1
{
    "apiVersion": "1.2.0",
    "workspaceId": "string",
    "documentId": "string",
    "extRef": "string",
    "status": "PENDING",
    "createdAt": "2019-08-24T14:15:22.123Z",
    "file": {
        "filename": "string",
        "source": "UPLOAD",
        "mimeType": "application/pdf",
        "fileSize": 0,
        "fileHash": "string",
        "numberOfPages": 0,
        "pdfVersion": "string",
        "pdfEncrypted": true,
        "pdfSigned": true,
        "pdfAnnotations": true,
        "pdfPermissions": [
            "string"
        ],
        "pdfPasswordProtected": true,
        "pdfLinearized": true,
        "pdfDefaultLanguage": "DE",
        "textLayer": {
            "present": true,
            "source": "EMBEDDED",
            "qualityScore": 0
        },
        "contentEncoding": "string",
        "content": "string"
    },
    "process": {
        "pipeline": "string",
        "startedAt": "2019-08-24T14:15:22Z",
        "completedAt": "2019-08-24T14:15:22Z",
        "duration": 0,
        "warnings": [
            {
                "code": "string",
                "message": "string",
                "level": "INFO",
                "affectedPages": [
                    1
                ],
                "affectedFields": [
                    "string"
                ],
                "hint": "string"
            }
        ],
        "errors": [
            {
                "code": "string",
                "message": "string",
                "level": "INFO",
                "affectedPages": [
                    1
                ],
                "affectedFields": [
                    "string"
                ],
                "hint": "string"
            }
        ]
    },
    "data": [
        {
            "accountName": "Business Checking Account",
            "accountOwner": "string",
            "accountNumber": "01-162385-29",
            "iban": "CH9300762011623852957",
            "periodFrom": "2025-05-01",
            "periodTo": "2025-05-31",
            "transactions": [
                {
                    "date": "2024-11-01",
                    "valueDate": "2024-11-01",
                    "description": "Ordre e-banking Etat de Vaud - Office des poursuites",
                    "debit": {
                        "currency": "CHF",
                        "value": 42.5
                    },
                    "credit": {
                        "currency": "CHF",
                        "value": 42.5
                    },
                    "balance": {
                        "currency": "CHF",
                        "value": 42.5
                    },
                    "isReconsiled": true,
                    "subDetails": [
                        {
                            "party": "Etat de Vaud - Office des poursuites",
                            "account": "string",
                            "amount": {
                                "currency": "CHF",
                                "value": 42.5
                            },
                            "fee": {
                                "currency": "CHF",
                                "value": 42.5
                            },
                            "message": "00 00000 00001 82024 42018 00001 202442018"
                        }
                    ]
                }
            ],
            "openingBalance": {
                "currency": "CHF",
                "value": 42.5
            },
            "closingBalance": {
                "currency": "CHF",
                "value": 42.5
            },
            "totalCredits": {
                "currency": "CHF",
                "value": 42.5
            },
            "totalDebits": {
                "currency": "CHF",
                "value": 42.5
            },
            "documentId": "string",
            "documentType": "INVOICE",
            "documentDate": "2025-06-15",
            "sender": {
                "name": "Invoice Beneficiary SA",
                "address": {
                    "addressSupplement": "Attn: Accounting Dept.",
                    "street": "Musterstrasse",
                    "streetNumber": "12A",
                    "poBox": "PO Box 123",
                    "zipCode": "8001",
                    "city": "Zürich",
                    "country": "CHE"
                },
                "phoneNumbers": [
                    "string"
                ],
                "emails": [
                    "string"
                ],
                "taxIds": [
                    {
                        "type": "UID",
                        "value": "CHE-999.999.999"
                    }
                ],
                "legalForm": "SOLE_PROPRIETORSHIP"
            },
            "recipient": {
                "name": "Invoice Beneficiary SA",
                "address": {
                    "addressSupplement": "Attn: Accounting Dept.",
                    "street": "Musterstrasse",
                    "streetNumber": "12A",
                    "poBox": "PO Box 123",
                    "zipCode": "8001",
                    "city": "Zürich",
                    "country": "CHE"
                },
                "phoneNumbers": [
                    "string"
                ],
                "emails": [
                    "string"
                ],
                "taxIds": [
                    {
                        "type": "UID",
                        "value": "CHE-999.999.999"
                    }
                ],
                "legalForm": "SOLE_PROPRIETORSHIP"
            },
            "language": "DE",
            "notes": "This document contains a special promotion.",
            "title": "Docpier AG",
            "identifications": [
                {
                    "type": "INVOICE_NUMBER",
                    "value": "string"
                }
            ],
            "officialEntity": {
                "name": "Invoice Beneficiary SA",
                "address": {
                    "addressSupplement": "Attn: Accounting Dept.",
                    "street": "Musterstrasse",
                    "streetNumber": "12A",
                    "poBox": "PO Box 123",
                    "zipCode": "8001",
                    "city": "Zürich",
                    "country": "CHE"
                },
                "phoneNumbers": [
                    "string"
                ],
                "emails": [
                    "string"
                ],
                "taxIds": [
                    {
                        "type": "UID",
                        "value": "CHE-999.999.999"
                    }
                ],
                "legalForm": "SOLE_PROPRIETORSHIP"
            }
        }
    ]
}
Modified at 2025-09-05 14:33:08
Previous
Upload a document
Next
Provide feedback
Built with