> ## Documentation Index
> Fetch the complete documentation index at: https://docs.invopop.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get an import's record



## OpenAPI

````yaml GET /apps/connect/v1/documents/{id}
openapi: 3.1.0
info:
  title: Invopop Connect configuration API
  version: 1.0.0
  description: >-
    Configure how Connect receives and imports a workspace's invoices: rules
    (short instructions for the AI that reads PDFs and images), profiles
    (ordered groups of rules a workflow's import step uses) and endpoints (HTTP
    upload URLs and email addresses that receive documents). Documents give what
    an import recorded for a silo entry.


    Call it through Invopop's API at https://api.invopop.com/apps/connect with a
    workspace token: `Authorization: Bearer <token>`. The workspace must have
    the Connect app enabled.


    Typical setup:

    1. Create rules: `POST /v1/rules {"text": "Use the de-xrechnung-v3 addon"}`.
    Each gets a `number`.

    2. Create a profile from them: `POST /v1/profiles {"name": "Germany",
    "rules": [1, 2]}`, and keep its `id`.

    3. In the workflow's "Import document" step, choose that profile (its config
    is `{"profile_id": "<id>"}`).

    4. Create an endpoint that runs the workflow: `POST /v1/endpoints
    {"channel": "http", "slug": "suppliers", "workflow_id": "<workflow id>",
    "config": {"security": {"type": "bearer", "token": "<secret>"}}}`. Send
    documents to its `uri`.


    Errors answer `{"status": "error", "message": "..."}`: 401 bad token or
    Connect not enabled, 404 not found, 422 invalid request (the message says
    which field and why).
  contact:
    email: dev@invopop.com
    name: Invopop Developers
servers:
  - description: production
    url: https://api.invopop.com
security:
  - InvopopAuth: []
paths:
  /apps/connect/v1/documents/{id}:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
        description: The silo entry's ID
    get:
      summary: >-
        Get what Connect's import recorded for a silo entry: the job's
        confidence and summary, and what needs review with its GOBL paths
      operationId: getDocument
      responses:
        '200':
          description: The document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '404':
          $ref: '#/components/responses/Error'
components:
  schemas:
    Document:
      type: object
      properties:
        silo_entry_id:
          type: string
        job_id:
          type: string
          description: >-
            The job that first imported the entry; a re-run updates the document
            and keeps it
        message_id:
          type: string
          description: The message the invoice came in
        profile:
          type: string
          description: The import step's profile
        rules:
          type: array
          items:
            type: integer
          description: The numbers of the profile's rules the import used
        confidence:
          type: string
          enum:
            - parsed
            - high
            - low
          description: >-
            How sure the reading is: parsed, converted as it was; high or low,
            read with AI. The job's code can still be low with high confidence,
            when the entry doesn't validate or the import has doubts (listed in
            review)
        format:
          type: string
          description: 'How it was read: gobl, an XML format (e.g. ubl, cii), or ai'
        summary:
          type: string
          description: What the import did
        review:
          type: array
          description: What needs review, up to 50
          items:
            type: object
            properties:
              message:
                type: string
              brief:
                type: string
                description: >-
                  The field and, for a doubt, what about it, e.g.
                  "supplier.vat_id (missing)"
              paths:
                type: array
                items:
                  type: string
                description: Where it is in the envelope, e.g. $.doc.supplier.tax_id.code
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
  responses:
    Error:
      description: An error
      content:
        application/json:
          schema:
            type: object
            properties:
              status:
                const: error
              message:
                type: string
  securitySchemes:
    InvopopAuth:
      type: http
      scheme: bearer
      description: >-
        A workspace token in the `Bearer` scheme. The workspace must have the
        Connect app enabled.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.