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

# Choose when a consumer's sync runs

> Sets the cron the sync runs on for this consumer, one of those the account offers.



## OpenAPI

````yaml put /consumers/{consumer_id}/syncs/{syncid}/triggers
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}/triggers:
    put:
      tags:
        - Syncs
      summary: Choose when a consumer's sync runs
      description: >-
        Sets the cron the sync runs on for this consumer, one of those the
        account offers.
      operationId: agentic_syncs_update_consumer_triggers
      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
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateConsumerTriggers'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsumerTriggers'
        '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:
              example:
                message: The account does not offer the cron '0 3 * * 1' for this sync
                status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Unprocessable Entity
components:
  schemas:
    UpdateConsumerTriggers:
      properties:
        cron:
          type: string
          title: Cron
          description: The one of the account's `crons` the sync runs on for this consumer.
          examples:
            - 0 3 1 * *
      type: object
      required:
        - cron
      title: UpdateConsumerTriggers
    ConsumerTriggers:
      properties:
        crons:
          items:
            type: string
          type: array
          title: Crons
          description: >-
            The cron expressions the account offers, the default first. Empty:
            the sync runs only when started by hand.
          examples:
            - - 0 3 * * *
              - 0 3 * * 1
              - 0 3 1 * *
        cron:
          anyOf:
            - type: string
            - type: 'null'
          title: Cron
          description: >-
            The one of `crons` the sync runs on for this consumer. Null: only
            when started by hand.
          examples:
            - 0 3 * * *
      type: object
      required:
        - crons
        - cron
      title: ConsumerTriggers
    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
  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.