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

# Xero Resync Reference

`POST /api/v1/xero/resync_reference`

## Request

- Base URL: `https://api.caresquare.com.au` (the document declares no server; this is the origin it was published from)
- URL: `https://api.caresquare.com.au/api/v1/xero/resync_reference`
- Auth: none declared

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/caresquare-api.md) - [All operations](https://skmtc.dev/caresquare/apis/caresquare-api/llms.txt) - [OpenAPI document](https://skmtc.dev/caresquare/apis/caresquare-api/revisions/d428fe38bf62?raw)
