---
title: "Sync Gusto payroll history into the local cache"
method: POST
path: "/payroll/sync"
tags: ["Payroll"]
---

# Sync Gusto payroll history into the local cache

`POST /payroll/sync`

## Request

- Base URL: `https://ledgerhq.pro/api/v1`
- URL: `https://ledgerhq.pro/api/v1/payroll/sync`
- Auth: one of:
  - HTTP bearer and API key in header `x-organization-id`
  - HTTP bearer and API key in header `x-organization-id`

Pulls new/changed payrolls from Gusto into the org's snapshot cache. Skips Gusto entirely when the last completed sync is fresh unless {force:true}. Read-only against Gusto (list_payrolls + get_payroll only); never runs, updates, or modifies payroll. Scoped to the authorized organization.

## Request body

- object
  - `force` boolean: Sync even when the cache is fresh.

## Response `200`

{synced, fresh, inserted, updated, skippedImmutable, total, lastSyncedAt, lastCompletedAt}

---

[API](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api.md) · [All operations](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ledgerhq-pro/apis/ledgerhq-bookkeeping-api/revisions/9a8269f0a586?raw)
