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

# The objects a preview would create

> One page of them, in the order they would be created, filtered by kind or capability.



## OpenAPI

````yaml get /consumers/{consumer_id}/syncs/{syncid}/previews/{preview_id}/objects
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}/previews/{preview_id}/objects:
    get:
      tags:
        - Syncs
      summary: The objects a preview would create
      description: >-
        One page of them, in the order they would be created, filtered by kind
        or capability.
      operationId: agentic_syncs_get_preview_objects
      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: preview_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Preview Id
        - name: kind
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Only the objects of this kind, e.g. 'invoice'.
            title: Kind
          description: Only the objects of this kind, e.g. 'invoice'.
        - name: capability
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            description: Only the objects of this capability (its key).
            title: Capability
          description: Only the objects of this capability (its key).
        - name: page
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            default: 1
            title: Page
        - name: size
          in: query
          required: false
          schema:
            type: integer
            maximum: 500
            minimum: 1
            default: 50
            title: Size
        - 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/ChiftPage_PreviewObjectItem_'
        '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
                Preview not found:
                  value:
                    message: The preview does not exist
                    status: error
              schema:
                $ref: '#/components/schemas/ChiftError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ChiftPage_PreviewObjectItem_:
      properties:
        items:
          items:
            $ref: '#/components/schemas/PreviewObjectItem'
          type: array
          title: Items
        total:
          type: integer
          minimum: 0
          title: Total
        page:
          type: integer
          minimum: 1
          title: Page
        size:
          type: integer
          minimum: 1
          title: Size
      type: object
      required:
        - items
        - total
        - page
        - size
      title: ChiftPage[PreviewObjectItem]
    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'
    PreviewObjectItem:
      properties:
        synthetic_id:
          type: string
          title: Synthetic Id
          description: >-
            The object's id in the preview: the same data gets the same id in
            every preview.
          examples:
            - preview:invoice:3f2a9c1e0b4d
        kind:
          type: string
          title: Kind
          description: What would be created.
          examples:
            - invoice
        kind_title:
          type: string
          title: Kind Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
          examples:
            - Invoice
        capability:
          type: string
          title: Capability
          description: Key of the capability creating it.
        capability_title:
          type: string
          title: Capability Title
          description: >-
            Name to show, in the requested language; its translation key without
            one.
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
          description: The source object it is created for.
        summary:
          $ref: '#/components/schemas/PreviewSummary'
          description: What a list shows of it.
        links:
          items:
            $ref: '#/components/schemas/PreviewLink'
          type: array
          title: Links
          description: The objects it needs, e.g. an invoice's supplier.
        payload:
          additionalProperties: true
          type: object
          title: Payload
          description: >-
            What would be sent to the target, as its create route takes it, but
            each partner it books on by its name (an invoice's partner, an entry
            line's partner account).
      type: object
      required:
        - synthetic_id
        - kind
        - kind_title
        - capability
        - capability_title
        - source_id
        - summary
        - links
        - payload
      title: PreviewObjectItem
    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
    PreviewSummary:
      properties:
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: Its name or number.
        amount:
          anyOf:
            - type: number
            - type: 'null'
          title: Amount
          description: Its total or amount.
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
          description: The amount's currency.
        date:
          anyOf:
            - type: string
              format: date
            - type: 'null'
          title: Date
          description: Its date.
      type: object
      title: PreviewSummary
    PreviewLink:
      properties:
        relation:
          type: string
          title: Relation
          description: How the objects relate.
          examples:
            - needs
        synthetic_id:
          type: string
          title: Synthetic Id
          description: The other object's id in the preview.
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
          description: The other object's summary title, else its source id.
      type: object
      required:
        - relation
        - synthetic_id
      title: PreviewLink
  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.