> ## 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.

# Answer a consumer's questions

> Stores the answers given and leaves the others as they are. A question no running capability asks, or an answer of the wrong type, is refused.



## OpenAPI

````yaml patch /consumers/{consumer_id}/syncs/{syncid}/questions
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}/questions:
    patch:
      tags:
        - Syncs
      summary: Answer a consumer's questions
      description: >-
        Stores the answers given and leaves the others as they are. A question
        no running capability asks, or an answer of the wrong type, is refused.
      operationId: agentic_syncs_update_consumer_questions
      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.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConsumerQuestions'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerQuestions'
        '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':
          content:
            application/json:
              examples:
                Unknown question:
                  value:
                    message: >-
                      The sync does not ask the question '{key}' of this
                      consumer
                    status: error
                Invalid answer:
                  value:
                    message: '{key} expects a date, not ''tomorrow'''
                    status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Unprocessable Entity
components:
  schemas:
    UpdateConsumerQuestions:
      properties:
        answers:
          additionalProperties: true
          type: object
          title: Answers
          description: Question key -> answer. Only the questions given change.
          examples:
            - spend_to_accounting.ExpensesSince: '2026-01-01'
      type: object
      required:
        - answers
      title: UpdateConsumerQuestions
    ConsumerQuestions:
      properties:
        fields:
          items:
            $ref: '#/components/schemas/SettingField'
          type: array
          title: Fields
          description: The questions to ask, rendered as settings.
        answers:
          additionalProperties: true
          type: object
          title: Answers
          description: >-
            Question key -> the answer, or its default while unanswered (null
            when there is none).
          examples:
            - spend_to_accounting.ExpensesSince: '2026-01-01'
      type: object
      required:
        - fields
        - answers
      title: ConsumerQuestions
    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
    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.'
    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.