---
title: "Xero Resync Reference"
method: POST
path: "/api/v1/xero/resync_reference"
---

# Xero Resync Reference

`POST /api/v1/xero/resync_reference`

Resync the Reference field for an invoice that was already synced to Xero.

Use this when the initial sync didn't include a Reference (clearing_number/payment_ref),
but now has that data available in the line items.

The reference is built using the same logic as the initial sync:
- If both clearing_number and payment_ref exist: "{clearing_number}_{payment_ref}"
- If only clearing_number exists: "{clearing_number}"
- If only payment_ref exists: "{payment_ref}"

## Request body

- XeroResyncReferenceRequest
  - `bill_id` integer, required
  - `plan_manager_id` string, required

## Response `200`

Successful Response

- object

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.dev/caresquare/apis/fastapi.md) · [All operations](https://skmtc.dev/caresquare/apis/fastapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/caresquare/fastapi/revisions/c9df874d8d59/schema)
