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

# What a consumer's sync did to one object

> Its state, what happened to it (each step with its execution), the objects it needed and those that needed it, and the open issues holding it up. `kind` is the object's type, e.g. `supplier_invoice`.



## OpenAPI

````yaml get /consumers/{consumer_id}/syncs/{syncid}/objects/{kind}/{object_id}
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}/objects/{kind}/{object_id}:
    get:
      tags:
        - Syncs
      summary: What a consumer's sync did to one object
      description: >-
        Its state, what happened to it (each step with its execution), the
        objects it needed and those that needed it, and the open issues holding
        it up. `kind` is the object's type, e.g. `supplier_invoice`.
      operationId: agentic_syncs_get_object
      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: kind
          in: path
          required: true
          schema:
            type: string
            title: Kind
        - name: object_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Object Id
        - 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/ObjectDetail'
        '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
                Object not found:
                  value:
                    message: The object 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:
    ObjectDetail:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: 'The object''s id: read it with `GET …/objects/{kind}/{id}`.'
        kind:
          type: string
          title: Kind
          description: The object's type, e.g. 'supplier_invoice'.
        capability:
          type: string
          title: Capability
          description: Key of the capability that handles it.
        source_id:
          type: string
          title: Source Id
          description: Its id in the source.
        scope:
          additionalProperties:
            type: string
          type: object
          title: Scope
          description: >-
            What identifies it beside its source id, for a sync keying its
            objects on something the consumer runs several of: `{"location_id":
            "paris"}`. Empty otherwise.
        status:
          type: string
          title: Status
          description: >-
            Where it stands, e.g. 'pending', 'success', 'failed', 'skipped',
            'never_retry'.
        target_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Id
          description: What it was booked as in the target. Null until then.
        booked_as:
          anyOf:
            - type: string
            - type: 'null'
          title: Booked As
          description: Key of the mode that booked it.
        attempts:
          type: integer
          title: Attempts
          description: How many times it failed.
        last_error_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error Code
          description: The code of its last failure.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When the sync first saw it.
        updated_at:
          type: string
          format: date-time
          title: Updated At
          description: When it last changed.
        succeeded_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Succeeded At
          description: When it was booked.
        target:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Target
          description: What it was booked as, as the target answered.
        history:
          items:
            $ref: '#/components/schemas/ObjectEventItem'
          type: array
          title: History
          description: What happened to it, the oldest first.
        links:
          items:
            $ref: '#/components/schemas/ObjectLink'
          type: array
          title: Links
          description: The objects it needed, and those that needed it.
        issues:
          items:
            $ref: '#/components/schemas/SyncIssue'
          type: array
          title: Issues
          description: The open issues holding it up.
      type: object
      required:
        - id
        - kind
        - capability
        - source_id
        - scope
        - status
        - target_id
        - booked_as
        - attempts
        - last_error_code
        - created_at
        - updated_at
        - succeeded_at
        - target
        - history
        - links
        - issues
      title: ObjectDetail
    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'
    ObjectEventItem:
      properties:
        action:
          type: string
          title: Action
          description: >-
            What happened: 'seen', a status it moved to, or a step the sync
            recorded.
        details:
          additionalProperties: true
          type: object
          title: Details
          description: What the step recorded.
        chainexecution_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Chainexecution Id
          description: The execution it last happened in.
        created_at:
          type: string
          format: date-time
          title: Created At
          description: When it first happened.
        last_at:
          type: string
          format: date-time
          title: Last At
          description: 'When it last happened: `created_at` when it happened once.'
        occurrences:
          type: integer
          title: Occurrences
          description: >-
            How many times in a row it happened: a retry failing the same way
            every day is one event.
      type: object
      required:
        - action
        - details
        - chainexecution_id
        - created_at
        - last_at
        - occurrences
      title: ObjectEventItem
    ObjectLink:
      properties:
        relation:
          type: string
          enum:
            - needs
            - needed_by
          title: Relation
          description: >-
            'needs': this object needed the other (an invoice its supplier);
            'needed_by': the other needed this one.
        kind:
          type: string
          title: Kind
          description: The object's type, e.g. 'supplier_invoice'.
        id:
          type: string
          format: uuid
          title: Id
          description: The other object's id.
        source_id:
          type: string
          title: Source Id
          description: The other object's id in the source.
        scope:
          additionalProperties:
            type: string
          type: object
          title: Scope
          description: >-
            What identifies it beside its source id, for a sync keying its
            objects on something the consumer runs several of: `{"location_id":
            "paris"}`. Empty otherwise.
        status:
          type: string
          title: Status
          description: Where the other object stands.
      type: object
      required:
        - relation
        - kind
        - id
        - source_id
        - scope
        - status
      title: ObjectLink
    SyncIssue:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: The issue's id.
        status:
          type: string
          enum:
            - open
            - resolved
            - ignored
          title: Status
          description: Open until the objects it holds up are booked or never retried.
        kind:
          type: string
          title: Kind
          description: What kind of problem it is, and so who acts on it.
          examples:
            - configuration
        owner:
          type: string
          enum:
            - consumer
            - self_healing
            - engineering
          title: Owner
          description: Who acts on it.
        code:
          type: string
          title: Code
          description: The error code.
          examples:
            - ERROR_SYNC_MISSING_MAPPING_VALUE
        title:
          type: string
          title: Title
          description: >-
            What the problem is, for the consumer: in `language` when we word
            this error in it, the error code's English title otherwise.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: What to do about it, worded as `title` is.
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: 'What its last occurrence said: the technical detail, in English.'
        cause:
          additionalProperties: true
          type: object
          title: Cause
          description: What the objects it holds up have in common.
        scope:
          additionalProperties: true
          type: object
          title: Scope
          description: >-
            What it is limited to: the folder, location or bank account of the
            objects it holds up (`{"location_id": "paris"}`), empty if none. An
            issue holding up no object names the capability whose step failed:
            `{"capability": key}` (its fetch), `{"setup": key}` (its setup) or
            `{"mode": key}` (its chosen mode cannot run).
        occurrences:
          type: integer
          title: Occurrences
          description: How many times executions raised it.
        first_seen_at:
          type: string
          format: date-time
          title: First Seen At
          description: When it was first raised.
        last_seen_at:
          type: string
          format: date-time
          title: Last Seen At
          description: When it was last raised.
        resolved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Resolved At
          description: When it was resolved. Null while it is not.
        objects_count:
          type: integer
          title: Objects Count
          description: How many objects it holds up.
        actions:
          items:
            type: string
          type: array
          title: Actions
          description: What fixes it, e.g. 'fix_mapping', 'retry', 'never_retry'.
      type: object
      required:
        - id
        - status
        - kind
        - owner
        - code
        - title
        - description
        - message
        - cause
        - scope
        - occurrences
        - first_seen_at
        - last_seen_at
        - resolved_at
        - objects_count
        - actions
      title: SyncIssue
    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
  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.