---
title: "Refresh tax-agency status"
method: GET
path: "/invoices/{id}/tax_agency_status/"
tags: ["Billing"]
---

# Refresh tax-agency status

`GET /invoices/{id}/tax_agency_status/`

## Request

- Base URL: `https://api.piriod.com`
- URL: `https://api.piriod.com/invoices/{id}/tax_agency_status/`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/piriod/apis/piriod-api/docs/invoices/:id/tax_agency_status/get.ts> (a function with typed inputs; its response is checked against the schema)

Polls the configured tax agency for the document status and updates
`biller_status` and `tax_agency`. Only applicable when the document
type has a local biller and the invoice is not imported.

## Response `200`

Refreshed invoice.

- Invoice
  - `id` string
  - `customer` string, required: Customer ID.
  - `document` integer, required: Document type ID (fiscal document; depends on country).
  - `number` integer: Sequence number assigned at finalize time.
  - `currency` string: Currency code from the customer's currency.
  - `date` string, date, required
  - `due_date` string, date, nullable
  - `period_start` string, date, nullable
  - `period_end` string, date, nullable
  - `collection_method` 'deferred' | 'deferred_dues' | 'automatically', required
  - `note` string, nullable
  - `amount` number, nullable: Subtotal of taxable lines (computed).
  - `exempt` number, nullable: Subtotal of tax-exempt lines (computed).
  - `tax` number, nullable: Total tax (computed).
  - `tax_percent` number, nullable
  - `subtotal` number, nullable
  - `total` number, nullable: Final amount (computed).
  - `total_adjusted` number, nullable
  - `retention` number, nullable
  - `discount` number, nullable
  - `discount_scheme` '%' | '$', nullable
  - `custom_change` number, nullable: Custom currency conversion factor.
  - `status` 'draft' | 'finalized' | 'paid' | 'cancelled' | 'uncollectible' | 'pending'
  - `biller_status` 'pending' | 'queued' | 'succeeded' | 'failed' | 'processing'
  - `tax_agency` object: Tax-agency response payload (country-specific).
  - `local_file` string, uri, nullable: Signed URL to the fiscal PDF/XML when applicable.
  - `subscription` integer, nullable: Linked subscription ID when generated by a subscription cycle.
  - `imported` boolean
  - `uncollectible` string, date-time, nullable
  - `test_mode` boolean
  - `lines` InvoiceLine[], required
    - `id` string
    - `name` string, required
    - `description` string, nullable
    - `amount` number, required: Unit price.
    - `quantity` number, required
    - `total` number
    - `exempt` boolean
    - `tax` number, nullable
    - `tax_percent` number, nullable
    - `discount` number, nullable
    - `discount_scheme` '%' | '$', nullable
    - `code` string, nullable
    - `code_scheme` string, nullable
    - `plan` integer, nullable: Linked plan ID when this line bills a subscription plan.
    - `retention` number, nullable
    - `retention_percent` number
    - `retention_scheme` 'subtotal' | 'tax'
    - `unit_label` string, nullable
  - `references` InvoiceReference[]
    - `date` string, date, required
    - `document` string, required: Document reference type (country-specific).
    - `description` string, nullable
    - `serial` string, required
  - `payments` object[]
  - `created` string, date-time
  - `updated` string, date-time

## Other responses

- `400`: Request body or query parameters failed validation.

---

[API](https://skmtc.dev/piriod/apis/piriod-api.md) - [All operations](https://skmtc.dev/piriod/apis/piriod-api/llms.txt) - [OpenAPI document](https://skmtc.dev/piriod/apis/piriod-api/revisions/70cbc827dc7b?raw)
