Factuarea APIDevelopers

Preview the refund of a return

Preview, without issuing it, the corrective invoice a refund of a received return would issue: invoice, scope, totals and received lines. - Optional target_invoice_id; without it the refund rule applies (the saved invoice while still a candidate, else the only one). - Reserves no series number and changes nothing; refunding against that invoice issues exactly this. - Rejected with the 422 of the refund; a return of another company answers as not found.

GET
/companies/{company}/returns/{return}/refund-preview

Authorization

AuthorizationBearer <token>

Your API key as a bearer token: fact_live_… in production, fact_test_… in sandbox. See the authentication guide.

In: header

Path Parameters

company*string

Public identifier (UUID v7) of the company. Get it from GET /v1/me (data.scope[].id).

Formatuuid
return*string

Public identifier (UUID v7) of the goods return.

Formatuuid

Query Parameters

target_invoice_id?|

Public ID of the invoice to correct. Optional: without it, the refund rule applies (the invoice saved on the return if still a candidate, else the only candidate)

Formatuuid

Headers

Factuarea-Version?string

Pin the API version (YYYY-MM-DD, Stripe-style date versioning) for this request; omit to use the key's pinned version, or the latest if none. Unsupported version → 400 unsupported_api_version; malformed → 400 parameter_invalid_format. The effective version is echoed in the Factuarea-Version response header. See the Versioning guide.

Formatdate

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json