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

# Check the sign-in sending goes through

> Checks, as the person signed in to Tripletex on the integration, what sending invoices needs: the company is on Tripletex’s new supplier invoice flow and has opened Tripletex to assistants, the person may register supplier invoices, and the company’s currency is NOK. Records the result as capabilities.invoices_write.status and steps, and returns the integration. A sign-in Tripletex no longer accepts comes back with sign_in.status expired.



## OpenAPI

````yaml /openapi.json post /v1/integrations/{id}/sign-in/check
openapi: 3.1.0
info:
  title: Watchdog API
  version: 1.0.0
  description: >-
    The Watchdog API is served from https://api.watchdog.no. Request bodies are
    limited to 2 MiB unless an endpoint says otherwise. Files are uploaded
    directly to storage, not through the API.
servers:
  - url: https://api.watchdog.no
    description: Watchdog API
security: []
paths:
  /v1/integrations/{id}/sign-in/check:
    post:
      tags:
        - Integrations
      summary: Check the sign-in sending goes through
      description: >-
        Checks, as the person signed in to Tripletex on the integration, what
        sending invoices needs: the company is on Tripletex’s new supplier
        invoice flow and has opened Tripletex to assistants, the person may
        register supplier invoices, and the company’s currency is NOK. Records
        the result as capabilities.invoices_write.status and steps, and returns
        the integration. A sign-in Tripletex no longer accepts comes back with
        sign_in.status expired.
      operationId: checkIntegrationSignIn
      parameters:
        - name: X-Organization-Id
          in: header
          required: false
          schema:
            type: string
          description: >-
            The organization to act in. Required for personal API keys; list the
            organizations you can access with GET /v1/organizations.
        - schema:
            type: string
            format: uuid
          required: true
          name: id
          in: path
      responses:
        '200':
          description: The resource.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Integration'
        '400':
          description: >-
            The request is invalid. details lists up to 20 field errors. Request
            bodies are limited to 2 MiB.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
          content:
            application/json:
              example:
                error:
                  code: validation_error
                  message: >-
                    The request is invalid. details lists up to 20 field errors.
                    Request bodies are limited to 2 MiB.
                  request_id: req_example
              schema:
                $ref: '#/components/schemas/Error_validation_error'
        '401':
          description: The bearer token is missing or invalid.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
            WWW-Authenticate:
              schema:
                type: string
              required: false
              description: Bearer authentication challenge, when supplied.
          content:
            application/json:
              example:
                error:
                  code: invalid_token
                  message: The bearer token is missing or invalid.
                  request_id: req_example
              schema:
                $ref: '#/components/schemas/Error_invalid_token'
        '403':
          description: >-
            Access denied. The error code says why: forbidden, token_disabled,
            organization_required, insufficient_role or mfa_required.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
          content:
            application/json:
              example:
                error:
                  code: forbidden
                  message: >-
                    Access denied. The error code says why: forbidden,
                    token_disabled, organization_required, insufficient_role or
                    mfa_required.
                  request_id: req_example
              schema:
                $ref: >-
                  #/components/schemas/Error_forbidden_token_disabled_organization_required_insufficient_role_mfa_required
        '404':
          description: The resource does not exist in the current organization.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
          content:
            application/json:
              example:
                error:
                  code: not_found
                  message: The resource does not exist in the current organization.
                  request_id: req_example
              schema:
                $ref: '#/components/schemas/Error_not_found'
        '409':
          description: >-
            No one has signed in to Tripletex on the integration, or the sign-in
            has expired.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
          content:
            application/json:
              example:
                error:
                  code: conflict
                  message: >-
                    No one has signed in to Tripletex on the integration, or the
                    sign-in has expired.
                  request_id: req_example
              schema:
                $ref: '#/components/schemas/Error_conflict'
        '429':
          description: Too many requests. Wait for the Retry-After delay before retrying.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
            Retry-After:
              schema:
                type: string
                example: '60'
              required: true
              description: Seconds to wait before retrying the request.
          content:
            application/json:
              example:
                error:
                  code: rate_limit_exceeded
                  message: >-
                    Too many requests. Wait for the Retry-After delay before
                    retrying.
                  request_id: req_example
              schema:
                $ref: '#/components/schemas/Error_rate_limit_exceeded'
        '500':
          description: >-
            Unexpected server failure. Include the request ID when contacting
            support.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
          content:
            application/json:
              example:
                error:
                  code: internal_error
                  message: >-
                    Unexpected server failure. Include the request ID when
                    contacting support.
                  request_id: req_example
              schema:
                $ref: '#/components/schemas/Error_internal_error'
        '503':
          description: >-
            Tripletex did not answer, or signing in to Tripletex is not
            configured. Nothing changed; try again.
          headers:
            X-Request-Id:
              schema:
                type: string
              required: true
              description: >-
                Request ID, also included in error bodies. Include it when
                contacting support.
            Cache-Control:
              schema:
                type: string
                enum:
                  - private, no-store
                  - private, no-store, no-transform
              required: false
              description: API responses are private and must not be cached.
            X-RateLimit-Limit:
              schema:
                type: string
                example: '500'
              required: false
              description: >-
                Requests allowed per minute for this credential, or failed API
                key attempts allowed per minute from this IP address.
          content:
            application/json:
              example:
                error:
                  code: service_unavailable
                  message: >-
                    Tripletex did not answer, or signing in to Tripletex is not
                    configured. Nothing changed; try again.
                  request_id: req_example
              schema:
                $ref: '#/components/schemas/Error_service_unavailable'
      security:
        - ApiKeyBearer: []
components:
  schemas:
    Integration:
      type: object
      properties:
        id:
          type: string
          format: uuid
        provider:
          type: string
        name:
          type: string
        status:
          type: string
          enum:
            - connected
            - invalid_credentials
            - permission_denied
            - server_error
            - not_tested
          description: Result of the latest test or sync. not_tested until the first test.
        syncable:
          type: boolean
          description: Enabled and in a status that allows a sync to start.
        enabled:
          type: boolean
        auto_sync:
          type: boolean
          description: >-
            Automatic invoice import: after capture for SFTP, otherwise on the
            schedule sync_interval sets and through supported webhooks.
        sync_interval:
          type: string
          enum:
            - nightly
            - hourly
            - every_15_minutes
          description: >-
            How often automatic sync reads new invoices: nightly, hourly or
            every_15_minutes. Every night it also rereads recent invoices for
            changes. Other than nightly only where the provider supports it
            (capabilities.sync_interval); applies while auto_sync is on.
        auto_create_companies:
          type: boolean
          description: >-
            Whether a company the login reaches becomes a workspace company of
            its own when its first invoice arrives, if nobody has linked it
            (listCompanyLinks): the one company with its registration number, or
            else a new company from the name, country and registration number
            the provider states. A company whose identity is incomplete, or that
            a workspace company could already be (one with its number, or one
            without a number yet), waits without a company as before. Only for a
            login that reaches several companies (discovers_companies).
        capture:
          type:
            - object
            - 'null'
          properties:
            enabled:
              type: boolean
            cadence:
              type: string
              enum:
                - daily
                - hourly
            timezone:
              type: string
              description: Timezone for the daily midnight capture.
            last_captured_at:
              type:
                - string
                - 'null'
              format: date-time
          required:
            - enabled
            - cadence
            - timezone
            - last_captured_at
        scope:
          $ref: '#/components/schemas/VisibleIntegrationScope'
        credentials:
          type: object
          properties:
            values:
              type: object
              additionalProperties: {}
              description: Saved values of fields that are not secret.
            secrets_set:
              type: array
              items:
                type: string
              description: Secret fields that have a saved value.
            readable:
              type: boolean
              description: >-
                false: the saved credentials cannot be read, so values and
                secrets_set are empty. Saving every credential field replaces
                them, except for a provider whose connection details are fixed
                at creation: remove that integration and connect it again.
            marketplace:
              type: boolean
              description: >-
                true: connected from the provider's marketplace (Tripletex
                Integrasjoner), which issued the key. false: a key someone
                entered.
          required:
            - values
            - secrets_set
            - readable
            - marketplace
          description: Secret values are never returned.
        realtime:
          type: object
          properties:
            supported:
              type: boolean
            status:
              type: string
              enum:
                - active
                - degraded
                - inactive
          required:
            - supported
            - status
        rate_limited_until:
          type:
            - string
            - 'null'
          format: date-time
          description: The provider asked Watchdog to pause requests until this time.
        last_successful_sync:
          type:
            - object
            - 'null'
          properties:
            started_at:
              type: string
              format: date-time
            trigger:
              type: string
              enum:
                - manual
                - scheduled
          required:
            - started_at
            - trigger
          description: Latest sync that completed with full coverage.
        vocabulary_synced_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            When the accounts, VAT codes and dimensions, and the supplier
            register where the provider has one, last synced completely.
        capabilities:
          type: object
          properties:
            invoices_read:
              type:
                - object
                - 'null'
              properties:
                enabled:
                  type: boolean
                  description: 'Switched on: Watchdog may do this through the integration.'
                status:
                  type: string
                  enum:
                    - unchecked
                    - ok
                    - warning
                    - denied
                    - failed
                  description: >-
                    What the latest test or run proved under the current
                    credentials and scope: unchecked until then; ok; warning,
                    usable with a caveat in its steps; denied, refused by the
                    provider (a missing module or grant); failed.
                checked_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: When that test or run was recorded.
                steps:
                  $ref: '#/components/schemas/IntegrationCapabilityCheckSteps'
              required:
                - enabled
                - status
                - checked_at
                - steps
              description: Sync invoices from the accounting system.
            purchase_orders_read:
              type:
                - object
                - 'null'
              properties:
                enabled:
                  type: boolean
                  description: 'Switched on: Watchdog may do this through the integration.'
                status:
                  type: string
                  enum:
                    - unchecked
                    - ok
                    - warning
                    - denied
                    - failed
                  description: >-
                    What the latest test or run proved under the current
                    credentials and scope: unchecked until then; ok; warning,
                    usable with a caveat in its steps; denied, refused by the
                    provider (a missing module or grant); failed.
                checked_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: When that test or run was recorded.
                steps:
                  $ref: '#/components/schemas/IntegrationCapabilityCheckSteps'
                auto_sync:
                  type: boolean
                  description: >-
                    Nightly purchase order sync, independent of the invoice
                    auto_sync.
                earliest_order_date:
                  type:
                    - string
                    - 'null'
                  format: date
                  description: >-
                    Import only orders created on or after this date (UTC). Null
                    imports every order. Orders imported before it was set are
                    kept.
              required:
                - enabled
                - status
                - checked_at
                - steps
                - auto_sync
                - earliest_order_date
              description: Sync purchase orders from the accounting system.
            purchase_orders_write:
              type:
                - object
                - 'null'
              properties:
                enabled:
                  type: boolean
                  description: 'Switched on: Watchdog may do this through the integration.'
                status:
                  type: string
                  enum:
                    - unchecked
                    - ok
                    - warning
                    - denied
                    - failed
                  description: >-
                    What the latest test or run proved under the current
                    credentials and scope: unchecked until then; ok; warning,
                    usable with a caveat in its steps; denied, refused by the
                    provider (a missing module or grant); failed.
                checked_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: When that test or run was recorded.
                steps:
                  $ref: '#/components/schemas/IntegrationCapabilityCheckSteps'
              required:
                - enabled
                - status
                - checked_at
                - steps
              description: >-
                Create purchase orders made in Watchdog in the accounting
                system.
            accounting_data_read:
              type:
                - object
                - 'null'
              properties:
                enabled:
                  type: boolean
                  description: 'Switched on: Watchdog may do this through the integration.'
                status:
                  type: string
                  enum:
                    - unchecked
                    - ok
                    - warning
                    - denied
                    - failed
                  description: >-
                    What the latest test or run proved under the current
                    credentials and scope: unchecked until then; ok; warning,
                    usable with a caveat in its steps; denied, refused by the
                    provider (a missing module or grant); failed.
                checked_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: When that test or run was recorded.
                steps:
                  $ref: '#/components/schemas/IntegrationCapabilityCheckSteps'
              required:
                - enabled
                - status
                - checked_at
                - steps
              description: >-
                Accounting data: import the accounts, VAT codes, dimensions and
                supplier register, where the provider has them. At most one
                integration per organization has it on; coding and sending use
                that one. A run proves its status.
            invoices_write:
              type:
                - object
                - 'null'
              properties:
                enabled:
                  type: boolean
                  description: 'Switched on: Watchdog may do this through the integration.'
                status:
                  type: string
                  enum:
                    - unchecked
                    - ok
                    - warning
                    - denied
                    - failed
                  description: >-
                    What the latest test or run proved under the current
                    credentials and scope: unchecked until then; ok; warning,
                    usable with a caveat in its steps; denied, refused by the
                    provider (a missing module or grant); failed.
                checked_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: When that test or run was recorded.
                steps:
                  $ref: '#/components/schemas/IntegrationCapabilityCheckSteps'
                book_after_sending:
                  type: boolean
                  description: >-
                    Book each invoice in the accounting system right after
                    sending it, as the person signed in. Off by default, which
                    leaves it ready to book there. A booked invoice can only be
                    corrected in the accounting system. Tripletex only.
                sign_in:
                  $ref: '#/components/schemas/IntegrationSignIn'
              required:
                - enabled
                - status
                - checked_at
                - steps
                - book_after_sending
                - sign_in
              description: >-
                Send approved invoices to the accounting system. Only on an
                integration with accounting_data_read on. A send proves its
                status; for Tripletex, so does the check of the sign-in (POST
                /v1/integrations/{id}/sign-in/check), whose steps say what is
                missing.
            coding_history:
              type:
                - object
                - 'null'
              properties:
                enabled:
                  type: boolean
                  description: 'Switched on: Watchdog may do this through the integration.'
                status:
                  type: string
                  enum:
                    - unchecked
                    - ok
                    - warning
                    - denied
                    - failed
                  description: >-
                    What the latest test or run proved under the current
                    credentials and scope: unchecked until then; ok; warning,
                    usable with a caveat in its steps; denied, refused by the
                    provider (a missing module or grant); failed.
                checked_at:
                  type:
                    - string
                    - 'null'
                  format: date-time
                  description: When that test or run was recorded.
                steps:
                  $ref: '#/components/schemas/IntegrationCapabilityCheckSteps'
              required:
                - enabled
                - status
                - checked_at
                - steps
              description: >-
                Booking history: keep how the accounting system booked every
                supplier invoice it holds, which coding suggestions learn from.
                At most one integration per organization has it on for an ERP
                and one for an AP system (an approval system that hands coding
                to the ERP); where an invoice has both, coding learns from the
                ERP’s booking.
          required:
            - invoices_read
            - purchase_orders_read
            - purchase_orders_write
            - accounting_data_read
            - invoices_write
            - coding_history
          description: >-
            What the integration does, each switched on or off with PATCH, and
            whether it works. Null when its provider cannot, or the organization
            does not have the module (purchase orders, or accounts payable for
            accounting_data_read, invoices_write and coding_history).
        active_sync_id:
          type:
            - string
            - 'null'
          format: uuid
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - provider
        - name
        - status
        - syncable
        - enabled
        - auto_sync
        - sync_interval
        - auto_create_companies
        - capture
        - scope
        - credentials
        - realtime
        - rate_limited_until
        - last_successful_sync
        - vocabulary_synced_at
        - capabilities
        - active_sync_id
        - created_at
        - updated_at
    Error_validation_error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - validation_error
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    Error_invalid_token:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - invalid_token
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    Error_forbidden_token_disabled_organization_required_insufficient_role_mfa_required:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - forbidden
                - token_disabled
                - organization_required
                - insufficient_role
                - mfa_required
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    Error_not_found:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - not_found
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    Error_conflict:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - conflict
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    Error_rate_limit_exceeded:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - rate_limit_exceeded
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    Error_internal_error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - internal_error
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    Error_service_unavailable:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              enum:
                - service_unavailable
            message:
              type: string
            request_id:
              type: string
            description:
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  code:
                    type: string
                  field:
                    type: string
                  message:
                    type: string
                required:
                  - code
                  - field
                  - message
              maxItems: 20
            workflow_run_id:
              type: string
              format: uuid
            import_id:
              type: string
              format: uuid
            existing_party:
              type: object
              properties:
                type:
                  type: string
                  enum:
                    - supplier
                    - recipient
                id:
                  type: string
                  format: uuid
              required:
                - type
                - id
          required:
            - code
            - message
            - request_id
      required:
        - error
    VisibleIntegrationScope:
      type: object
      properties:
        suppliers:
          type: object
          properties:
            mode:
              type: string
              enum:
                - all
                - include
                - exclude
            items:
              type: array
              items:
                type: object
                properties:
                  id:
                    type: string
                    minLength: 1
                    maxLength: 255
                  name:
                    type: string
                    maxLength: 500
                  code:
                    type: string
                    maxLength: 255
                  group:
                    type: object
                    properties:
                      kind:
                        type: string
                        enum:
                          - vendor-sites
                      prefixes:
                        type: array
                        items:
                          type: string
                          minLength: 1
                          maxLength: 255
                        minItems: 1
                        maxItems: 1000
                      site_count:
                        type: integer
                        exclusiveMinimum: 0
                      inactive_site_count:
                        type: integer
                        minimum: 0
                    required:
                      - kind
                      - prefixes
                      - site_count
                      - inactive_site_count
                    description: >-
                      Set when one supplier stands for several provider vendor
                      sites.
                required:
                  - id
                  - name
              maxItems: 5000
            include_unidentified:
              type: boolean
              description: >-
                With mode include or exclude, also read invoices whose supplier
                the provider does not identify. Omitted reads them.
          required:
            - mode
            - items
          additionalProperties: false
        companies:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
                minLength: 1
                maxLength: 255
              name:
                type: string
                maxLength: 500
              country_code:
                type:
                  - string
                  - 'null'
                maxLength: 10
              accounting_currency_code:
                type:
                  - string
                  - 'null'
                maxLength: 10
            required:
              - id
              - name
          maxItems: 1000
          description: Provider companies to read. Empty or omitted reads every company.
        processing_statuses:
          type: array
          items:
            type: string
            minLength: 1
            maxLength: 100
          minItems: 1
          maxItems: 50
        module_company_codes:
          type: object
          properties:
            costinvoice:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 100
              maxItems: 50
            purchaseorder:
              type: array
              items:
                type: string
                minLength: 1
                maxLength: 100
              maxItems: 50
        hidden_counts:
          type: object
          properties:
            suppliers:
              type: integer
              minimum: 0
            companies:
              type: integer
              minimum: 0
          required:
            - suppliers
            - companies
          description: >-
            Set only when your access limits hide some of the suppliers or
            companies: how many are left out of suppliers.items and companies. A
            run you start reads only what you can see, so name the companies to
            read when every saved one is hidden.
    IntegrationCapabilityCheckSteps:
      type:
        - array
        - 'null'
      items:
        type: object
        properties:
          step:
            type: string
            enum:
              - authenticate
              - list_invoices
              - download_attachment
              - identify_company
              - list_purchase_orders
              - list_accounting_data
              - list_suppliers
              - create_purchase_order
              - supplier_invoice_flow
              - company_module
              - granted_access
              - person_access
              - company_currency
              - supplier_access
          outcome:
            type: string
            enum:
              - ok
              - warning
              - failed
              - skipped
          category:
            type:
              - string
              - 'null'
            enum:
              - invalid_credentials
              - permission_denied
              - not_found
              - timeout
              - server_error
              - rate_limited
              - unknown
              - no_content
              - not_verified
              - not_enabled
              - not_offered
              - read_only
              - script_mode
              - null
            description: >-
              Why a step warned or failed. not_verified: deliberately not tried,
              such as creating a purchase order in the accounting system.
        required:
          - step
          - outcome
          - category
      description: The test’s steps; null when a run proved the status, or before any test.
    IntegrationSignIn:
      type:
        - object
        - 'null'
      properties:
        status:
          type: string
          enum:
            - none
            - active
            - expired
          description: >-
            none: no one has signed in. active: invoices are sent as
            person_name. expired: Tripletex no longer accepts the sign-in;
            someone signs in again.
        person_name:
          type:
            - string
            - 'null'
          description: The Tripletex user invoices are sent as.
        signed_in_at:
          type:
            - string
            - 'null'
          format: date-time
        booking_blocked:
          type:
            - string
            - 'null'
          enum:
            - approval_required
            - permission_missing
            - null
          description: >-
            Why Watchdog cannot book sent invoices in Tripletex, as the latest
            check read it: approval_required, the company requires its own
            approval in Tripletex before an invoice is booked;
            permission_missing, the person may not book. Null when it can, and
            before a check.
      required:
        - status
        - person_name
        - signed_in_at
        - booking_blocked
      description: >-
        The Tripletex sign-in sending goes through: an admin signs in to
        Tripletex on the integration (POST /v1/integrations/authorizations with
        provider tripletex and integration_id), and invoices are sent in that
        person’s name. Null for providers that send without one.
  securitySchemes:
    ApiKeyBearer:
      type: http
      scheme: bearer
      description: >-
        Personal API key sent as a bearer token, together with
        X-Organization-Id. The key must have at least the access level the
        endpoint requires (read, write or admin).

````

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