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

# Update flow mappings for a specific consumer

> Route that can be used to update the flow mappings for a specific consumer. It will replace the existing configuration with the provided one.



## OpenAPI

````yaml patch /consumers/{consumer_id}/syncs/{syncid}
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}:
    patch:
      tags:
        - Syncs
      summary: Update flow mappings for a specific consumer
      description: >-
        Route that can be used to update the flow mappings for a specific
        consumer. It will replace the existing configuration with the provided
        one.
      operationId: syncs_update_synctoconsumer
      parameters:
        - name: syncid
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Syncid
        - name: consumer_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Consumer Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: array
              items:
                $ref: '#/components/schemas/ReadSyncMappingItem'
              title: Body
      responses:
        '204':
          description: Successful Response
        '404':
          content:
            application/json:
              example:
                message: The flow is not yet activated for this consumer
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Not Found
        '422':
          content:
            application/json:
              example:
                message: The body should be a list
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Unprocessable Entity
components:
  schemas:
    ReadSyncMappingItem:
      properties:
        name:
          type: string
          title: Name
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        display_order:
          type: integer
          title: Display Order
          default: 0
        challenge_question:
          anyOf:
            - type: string
            - type: 'null'
          title: Challenge Question
        conditions:
          anyOf:
            - additionalProperties:
                additionalProperties: true
                type: object
              propertyNames:
                const: hideIf
              type: object
            - type: 'null'
          title: Conditions
        values:
          items:
            $ref: '#/components/schemas/ReadMappingItem'
          type: array
          title: Values
        hidden_source_ids:
          items:
            type: string
          type: array
          title: Hidden Source Ids
        sub_mapping_name:
          type: string
          title: Sub Mapping Name
        sub_mapping_description:
          anyOf:
            - type: string
            - type: 'null'
          title: Sub Mapping Description
      type: object
      required:
        - name
        - values
        - hidden_source_ids
        - sub_mapping_name
      title: ReadSyncMappingItem
    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: ''
      type: object
      required:
        - message
      title: ChiftError
    ReadMappingItem:
      properties:
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        target_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Id
      type: object
      title: ReadMappingItem
  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.

````