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

# A consumer's setup of an agentic sync

> What the consumer can choose, what runs, which mapping tables and questions that needs, and what still stops the sync from being enabled. Capabilities your account does not offer are absent.



## OpenAPI

````yaml get /consumers/{consumer_id}/syncs/{syncid}/capabilities
openapi: 3.1.0
info:
  title: Chift API
  description: >-
    The Chift API is a universal API giving you access to financial data from
    the software of your clients. It helps software companies to offer native
    integrations to their clients without the effort needed to maintain those
    native integrations. By using the APIs (Accounting, POS, eCommerce) of
    Chift, you connect once and allow your clients to use their software
    packages.
  version: 1.0.0
servers:
  - url: https://api.chift.eu
    description: Chift
security:
  - bearerAuth: []
paths:
  /consumers/{consumer_id}/syncs/{syncid}/capabilities:
    get:
      tags:
        - Syncs
      summary: A consumer's setup of an agentic sync
      description: >-
        What the consumer can choose, what runs, which mapping tables and
        questions that needs, and what still stops the sync from being enabled.
        Capabilities your account does not offer are absent.
      operationId: agentic_syncs_get_consumer_capabilities
      parameters:
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Consumer Id
        - name: syncid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Syncid
        - name: language
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: >-
              ISO 639-1 code of the language of the texts (en, fr, nl, de, es;
              any case), falling back to English. Without it, translation keys.
            title: Language
          description: >-
            ISO 639-1 code of the language of the texts (en, fr, nl, de, es; any
            case), falling back to English. Without it, translation keys.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerCapabilities'
        '404':
          content:
            application/json:
              examples:
                Sync not found:
                  value:
                    message: The sync does not exist
                    status: error
                Not configured:
                  value:
                    message: The consumer is not configured for this sync
                    status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ConsumerCapabilities:
      properties:
        flowid:
          type: string
          format: uuid
          title: Flowid
          description: >-
            The sync's one flow: what enable, disable, the answers' PATCH and
            the executions take as {flowid}.
        enabled:
          type: boolean
          title: Enabled
          description: Whether the sync is enabled for this consumer.
        capabilities:
          items:
            $ref: '#/components/schemas/ConsumerCapabilityItem'
          type: array
          title: Capabilities
          description: The capabilities the account offers.
        tables:
          items:
            $ref: '#/components/schemas/ConsumerTable'
          type: array
          title: Tables
          description: The mapping tables the running capabilities need.
        questions:
          items:
            $ref: '#/components/schemas/ConsumerQuestion'
          type: array
          title: Questions
          description: The questions the running capabilities ask.
        completeness:
          $ref: '#/components/schemas/SetupCompleteness'
          description: What stops the sync from being enabled.
        connections:
          items:
            $ref: '#/components/schemas/SyncConnection'
          type: array
          title: Connections
          description: >-
            Each vertical of the sync, source first: whether the consumer's
            connection to it is in place.
        latest_preview_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Latest Preview Id
          description: The most recent preview of this consumer sync, if any.
      type: object
      required:
        - flowid
        - enabled
        - capabilities
        - tables
        - questions
        - completeness
        - connections
        - latest_preview_id
      title: ConsumerCapabilities
      description: >-
        The consumer's setup of a sync: what is offered, what runs, what it
        needs, and how far along it is.
    ChiftError:
      properties:
        message:
          type: string
          title: Message
        status:
          anyOf:
            - type: string
            - type: 'null'
          title: Status
          default: error
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
          default: ''
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Error Code
      type: object
      required:
        - message
      title: ChiftError
    HTTPValidationError:
      title: Validation Error
      required:
        - message
      type: object
      properties:
        message:
          title: Message
          type: string
          default: Validation error
        status:
          title: Status
          type: string
          default: error
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    ConsumerCapabilityItem:
      properties:
        key:
          type: string
          title: Key
          description: >-
            Stable key, e.g. 'spend_to_accounting.SupplierInvoices'. Send it
            back as is.
          examples:
            - spend_to_accounting.SupplierInvoices
        id:
          type: string
          format: uuid
          title: Id
          description: >-
            The stable uuid derived from the key, as the legacy sync routes
            identify the same item.
        title:
          type: string
          title: Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
        description:
          type: string
          title: Description
          description: >-
            What it does, the tooltip: in the requested language, its
            translation key without one.
        kind:
          type: string
          enum:
            - main
            - supporting
          title: Kind
          description: >-
            'main': the consumer chooses it. 'supporting': shown as a tooltip,
            turned on by what needs it.
        selected:
          type: boolean
          title: Selected
          description: >-
            The consumer chose it. False for one running only because another
            needs it (`auto_enabled_by`).
        effective:
          type: boolean
          title: Effective
          description: 'It runs: chosen or needed by something that runs, and available.'
        auto_enabled_by:
          items:
            type: string
          type: array
          title: Auto Enabled By
          description: >-
            Keys of the capabilities running because of it. It cannot be turned
            off while there are some.
        requires:
          items:
            type: string
          type: array
          title: Requires
          description: >-
            Keys of the capabilities it needs directly, whatever its mode; each
            mode lists what it adds. Choosing it turns them on.
        available:
          type: boolean
          title: Available
          description: >-
            Whether the consumer's connections can do it. An unavailable one
            cannot be chosen.
        reason_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason Key
          description: >-
            Why not, as a translation key, so a client can translate it itself.
            Null when there is no reason.
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: >-
            Why not, in the requested language; its translation key without one.
            Null when there is no reason.
        mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Mode
          description: >-
            Key of the mode in use. Null when it has no modes, is unavailable,
            or awaits the consumer's choice.
        chooses_mode:
          type: boolean
          title: Chooses Mode
          description: Several modes are available, so the consumer must choose one.
        awaits_mode:
          type: boolean
          title: Awaits Mode
          description: >-
            Chosen or needed, but no mode is chosen yet: it, and what needs it,
            run once the consumer chooses.
        default_mode:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Mode
          description: >-
            The mode your account preselects for the consumer's choice. Null
            when none is set.
          examples:
            - spend_to_accounting.SupplierInvoices.AsInvoice
        modes:
          items:
            $ref: '#/components/schemas/ConsumerCapabilityMode'
          type: array
          title: Modes
          description: >-
            The alternative ways of doing it, each with whether the connections
            can do it. Empty when there is only one.
      type: object
      required:
        - key
        - id
        - title
        - description
        - kind
        - selected
        - effective
        - auto_enabled_by
        - requires
        - available
        - reason_key
        - reason
        - mode
        - chooses_mode
        - awaits_mode
        - default_mode
        - modes
      title: ConsumerCapabilityItem
    ConsumerTable:
      properties:
        key:
          type: string
          title: Key
          description: >-
            Stable key, e.g. 'spend_to_accounting.SupplierInvoices'. Send it
            back as is.
          examples:
            - spend_to_accounting.PurchaseVatCodes
        id:
          type: string
          format: uuid
          title: Id
          description: >-
            The stable uuid derived from the key, as the legacy sync routes
            identify the same item.
        title:
          type: string
          title: Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
        description:
          type: string
          title: Description
          description: >-
            What it does, the tooltip: in the requested language, its
            translation key without one.
        used_by:
          items:
            type: string
          type: array
          title: Used By
          description: Keys of the capabilities or modes that need it.
        rows:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Rows
          description: The rows in use when only some are. Null when the whole table is.
      type: object
      required:
        - key
        - id
        - title
        - description
        - used_by
        - rows
      title: ConsumerTable
    ConsumerQuestion:
      properties:
        key:
          type: string
          title: Key
          description: >-
            Stable key, e.g. 'spend_to_accounting.SupplierInvoices'. Send it
            back as is.
          examples:
            - spend_to_accounting.ExpensesSince
        id:
          type: string
          format: uuid
          title: Id
          description: >-
            The stable uuid derived from the key, as the legacy sync routes
            identify the same item.
        title:
          type: string
          title: Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
        description:
          type: string
          title: Description
          description: >-
            What it does, the tooltip: in the requested language, its
            translation key without one.
        used_by:
          items:
            type: string
          type: array
          title: Used By
          description: Keys of the capabilities or modes that ask it.
        required:
          type: boolean
          title: Required
          description: >-
            It has no default, so it must be answered before the sync is
            enabled.
        field:
          $ref: '#/components/schemas/SettingField'
          description: 'How to render it: the same shape as a setting.'
      type: object
      required:
        - key
        - id
        - title
        - description
        - used_by
        - required
        - field
      title: ConsumerQuestion
    SetupCompleteness:
      properties:
        missing_connections:
          items:
            $ref: '#/components/schemas/SetupMissingItem'
          type: array
          title: Missing Connections
          description: >-
            Verticals the sync needs and the consumer has no connection to, or
            none chosen.
        missing_questions:
          items:
            $ref: '#/components/schemas/SetupMissingItem'
          type: array
          title: Missing Questions
          description: Questions with no default and no answer.
        missing_tables:
          items:
            $ref: '#/components/schemas/SetupMissingItem'
          type: array
          title: Missing Tables
          description: Mapping tables with a row that has no value.
        missing_modes:
          items:
            $ref: '#/components/schemas/SetupMissingItem'
          type: array
          title: Missing Modes
          description: >-
            Capabilities chosen or needed, with several modes and none chosen
            yet.
      type: object
      required:
        - missing_connections
        - missing_questions
        - missing_tables
        - missing_modes
      title: SetupCompleteness
      description: 'What stops the consumer sync from being enabled. All empty: it can be.'
    SyncConnection:
      properties:
        vertical:
          type: string
          title: Vertical
          description: One of the sync's verticals.
          examples:
            - accounting
        title:
          type: string
          title: Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
        state:
          type: string
          enum:
            - connected
            - missing
            - to_choose
            - unavailable
          title: State
          description: >-
            `connected`: the sync uses the connection of `integration_id`.
            `missing`: the consumer has no active connection of this vertical.
            `to_choose`: it has several (`integration_ids`) and none was chosen
            for this sync. `unavailable`: the integration chosen for this sync
            (`integration_id`) has no active connection any more, and another is
            never used in its place. Until one is chosen, the vertical counts as
            not connected.
        integration_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Integration Id
          description: >-
            The integration of the connection the sync uses, or the one chosen
            when `unavailable`. Null otherwise.
        integration_ids:
          items:
            type: string
          type: array
          title: Integration Ids
          description: >-
            The integrations to choose from, when `to_choose` or `unavailable`.
            Send the one to use as `integrationids` when linking the consumer to
            the sync again, or when enabling it.
      type: object
      required:
        - vertical
        - title
        - state
        - integration_id
        - integration_ids
      title: SyncConnection
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    ConsumerCapabilityMode:
      properties:
        key:
          type: string
          title: Key
          description: Key of the mode.
          examples:
            - spend_to_accounting.SupplierInvoices.AsInvoice
        title:
          type: string
          title: Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
        description:
          type: string
          title: Description
          description: >-
            What it does, the tooltip: in the requested language, its
            translation key without one.
        available:
          type: boolean
          title: Available
          description: Whether the consumer's connections can do it this way.
        reason_key:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason Key
          description: >-
            Why not, as a translation key, so a client can translate it itself.
            Null when there is no reason.
        reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Reason
          description: >-
            Why not, in the requested language; its translation key without one.
            Null when there is no reason.
        requires:
          items:
            type: string
          type: array
          title: Requires
          description: >-
            Keys of the capabilities this mode needs on top of its capability's
            `requires`.
        requires_modes:
          items:
            $ref: '#/components/schemas/RequiredMode'
          type: array
          title: Requires Modes
          description: >-
            The modes other capabilities must run in for this one to be
            available, so a screen can show or hide it as the consumer picks
            those modes, before saving. Empty when it has none.
      type: object
      required:
        - key
        - title
        - description
        - available
        - reason_key
        - reason
        - requires
        - requires_modes
      title: ConsumerCapabilityMode
    SettingField:
      properties:
        key:
          type: string
          title: Key
        type:
          $ref: '#/components/schemas/SettingType'
        group:
          $ref: '#/components/schemas/SettingGroup'
        title:
          type: string
          title: Title
        tooltip:
          type: string
          title: Tooltip
        default:
          title: Default
        options:
          items:
            $ref: '#/components/schemas/SettingOption'
          type: array
          title: Options
          default: []
        supported:
          type: boolean
          title: Supported
          default: true
        unsupported_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Unsupported Reason
      type: object
      required:
        - key
        - type
        - group
        - title
        - tooltip
      title: SettingField
      description: 'Declaration of one setting: everything a client needs to render it.'
    SetupMissingItem:
      properties:
        key:
          type: string
          title: Key
          description: Key of what is missing.
        title:
          type: string
          title: Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
      type: object
      required:
        - key
        - title
      title: SetupMissingItem
    RequiredMode:
      properties:
        capability:
          type: string
          title: Capability
          description: Key of the other capability.
          examples:
            - spend_to_accounting.SupplierInvoices
        mode:
          type: string
          title: Mode
          description: Key of the mode it must run in.
          examples:
            - spend_to_accounting.SupplierInvoices.AsInvoice
      type: object
      required:
        - capability
        - mode
      title: RequiredMode
    SettingType:
      type: string
      enum:
        - date
        - str
        - bool
        - int
        - enum
        - str_list
        - dict
      title: SettingType
      description: The input control the frontend should render for a setting.
    SettingGroup:
      type: string
      enum:
        - period
        - write
        - state
        - observability
        - scope
      title: SettingGroup
      description: Non-overlapping concerns. A setting belongs to exactly one.
    SettingOption:
      properties:
        value:
          type: string
          title: Value
        title:
          type: string
          title: Title
      type: object
      required:
        - value
        - title
      title: SettingOption
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        This access token needs to be included in each of your request to the
        Chift API.

````

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