> ## Documentation Index
> Fetch the complete documentation index at: https://docs.aicoflow.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get sync status

> Returns the current synchronization status including last sync time, duration, and any errors.



## OpenAPI

````yaml /connectors/openapi/reit-openapi.json get /api/sync/status
openapi: 3.1.0
info:
  title: PlanSo Connector
  description: >

    ## PlanSo Order Management Integration


    This connector provides a REST API for the PlanSo workshop management
    system, enabling order synchronization and queries.


    ### Features


    - **Order Sync**: Automatic background synchronization from PlanSo to local
    SQLite database

    - **Rich Queries**: Search orders by plate, person, phone, email, status,
    damage type, and date ranges

    - **Parts Tracking**: View parts lists with order/delivery status

    - **CRUD Operations**: Create, update, and delete orders in PlanSo


    ### Sync Architecture


    The connector maintains a local SQLite database that mirrors PlanSo data:


    1. **Background Sync**: Runs automatically during business hours
    (configurable)

    2. **Manual Sync**: Trigger via `/api/sync` endpoint

    3. **Incremental Updates**: Only fetches changed orders when possible


    ### Data Model


    - **Orders**: Repair projects with customer, vehicle, and scheduling info

    - **Parts**: Individual parts linked to orders with ordering/delivery status

    - **Extended Data**: Damaged areas, documents, images (optional sync)


    ### Authentication


    All endpoints (except `/health` and `/ready`) require an `X-API-Key` header.
    Requests may also be restricted by IP whitelist.
  contact:
    name: AICO Engineering
    url: https://aicoflow.com/
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://reit.connectors.aicoflow.com
    description: Production
  - url: http://localhost:8102
    description: Local development
security:
  - ApiKeyAuth: []
tags:
  - name: Authentication
    description: PlanSo session management. Login and maintain authenticated sessions.
  - name: Sync
    description: >-
      Data synchronization operations. Trigger manual syncs and monitor sync
      status.
  - name: Orders
    description: Order management. Query, create, update, and delete repair orders.
  - name: Parts
    description: Parts information. View parts lists and status for orders.
  - name: Health
    description: Service health and readiness checks.
paths:
  /api/sync/status:
    get:
      tags:
        - Sync
      summary: Get sync status
      description: >-
        Returns the current synchronization status including last sync time,
        duration, and any errors.
      operationId: get_sync_status_api_sync_status_get
      responses:
        '200':
          description: Current sync status details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncStatusModel'
components:
  schemas:
    SyncStatusModel:
      properties:
        is_running:
          type: boolean
          title: Is Running
        last_sync_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Sync At
        last_sync_duration_seconds:
          anyOf:
            - type: number
            - type: 'null'
          title: Last Sync Duration Seconds
        total_orders:
          anyOf:
            - type: integer
            - type: 'null'
          title: Total Orders
        synced_orders:
          anyOf:
            - type: integer
            - type: 'null'
          title: Synced Orders
        failed_orders:
          anyOf:
            - type: integer
            - type: 'null'
          title: Failed Orders
        error:
          anyOf:
            - type: string
            - type: 'null'
          title: Error
      type: object
      required:
        - is_running
      title: SyncStatusModel
      description: Sync operation status.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````