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

# Sync open Invoices and Bills from a ledger connection

> Pulls the current open set from the bookkeeping system, upserts Open items, and marks missing rows closed (not deleted). Runs in the request. Overlapping sync on the same connection is rejected. Settlement push is out of scope.



## OpenAPI

````yaml /api-reference/platform-api.json post /v2/account-connections/bookkeeping/{connectionId}/open-items/sync
openapi: 3.0.0
info:
  title: Range Platform API
  description: >-
    The Range Platform API for workspace management, counterparties, and
    operational tooling.
  version: 1.7.21
  contact: {}
servers:
  - url: https://api.range.org
    description: Range API Server
security:
  - Authorization: []
  - Authorization: []
tags:
  - name: Address Information
    description: Get information about a crypto address.
  - name: Transfer Enrichments
    description: Attach workspace-scoped notes and categories to transfers.
  - name: Counterparties
    description: Manage external entities, their addresses, bank accounts, and documents.
paths:
  /v2/account-connections/bookkeeping/{connectionId}/open-items/sync:
    post:
      tags:
        - Account Connections
      summary: Sync open Invoices and Bills from a ledger connection
      description: >-
        Pulls the current open set from the bookkeeping system, upserts Open
        items, and marks missing rows closed (not deleted). Runs in the request.
        Overlapping sync on the same connection is rejected. Settlement push is
        out of scope.
      operationId: syncOpenItems
      parameters:
        - name: connectionId
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncOpenItemsResponseDto'
        '409':
          description: An Open item sync is already running for this Ledger connection
components:
  schemas:
    SyncOpenItemsResponseDto:
      type: object
      properties:
        upserted:
          type: number
          description: Open items upserted from this snapshot (Invoices and Bills).
        closed:
          type: number
          description: >-
            Previously open rows no longer in the provider open set, marked
            closed.
      required:
        - upserted
        - closed
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: X-API-KEY
      description: Authorization method required to allow user to access the api endpoints.

````