Skip to main content
GET
/
invoices
/
{id}
Retrieve invoice
curl --request GET \
  --url https://api.piriod.com/invoices/{id}/ \
  --header 'Authorization: <api-key>' \
  --header 'x-simple-workspace: <x-simple-workspace>'
{
  "customer": "<string>",
  "document": 123,
  "date": "2023-12-25",
  "collection_method": "deferred",
  "lines": [
    {
      "name": "<string>",
      "amount": 123,
      "quantity": 123,
      "id": "<string>",
      "description": "<string>",
      "total": 123,
      "exempt": false,
      "tax": 123,
      "tax_percent": 123,
      "discount": 123,
      "discount_scheme": "%",
      "code": "<string>",
      "code_scheme": "<string>",
      "plan": 123,
      "retention": 123,
      "retention_percent": 0,
      "retention_scheme": "subtotal",
      "unit_label": "<string>"
    }
  ],
  "id": "inv_01H8XYZ123ABC",
  "number": 123,
  "currency": "<string>",
  "due_date": "2023-12-25",
  "period_start": "2023-12-25",
  "period_end": "2023-12-25",
  "note": "<string>",
  "amount": 123,
  "exempt": 123,
  "tax": 123,
  "tax_percent": 123,
  "subtotal": 123,
  "total": 123,
  "total_adjusted": 123,
  "retention": 123,
  "discount": 123,
  "discount_scheme": "%",
  "custom_change": 2,
  "status": "draft",
  "biller_status": "pending",
  "tax_agency": {},
  "local_file": "<string>",
  "subscription": 123,
  "imported": true,
  "uncollectible": "2023-11-07T05:31:56Z",
  "test_mode": true,
  "references": [
    {
      "date": "2023-12-25",
      "document": "<string>",
      "serial": "<string>",
      "description": "<string>"
    }
  ],
  "payments": [
    {}
  ],
  "created": "2023-11-07T05:31:56Z",
  "updated": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://piriod-d406ac55.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use header Authorization: Token <api_token>. API tokens are obtained from the Piriod dashboard.

Headers

x-simple-workspace
string
required

Workspace (account) identifier. Required for every request.

x-piriod-test-mode
boolean
default:false

Whether to operate against test-mode data. Defaults to false.

Path Parameters

id
string
required

Resource identifier.

Response

The invoice.

customer
string
required

Customer ID.

document
integer
required

Document type ID (fiscal document; depends on country).

date
string<date>
required
collection_method
enum<string>
required
Available options:
deferred,
deferred_dues,
automatically
lines
object[]
required
id
string
read-only
Example:

"inv_01H8XYZ123ABC"

number
integer
read-only

Sequence number assigned at finalize time.

currency
string
read-only

Currency code from the customer's currency.

due_date
string<date> | null
period_start
string<date> | null
period_end
string<date> | null
note
string | null
Maximum string length: 256
amount
number | null

Subtotal of taxable lines (computed).

exempt
number | null

Subtotal of tax-exempt lines (computed).

tax
number | null

Total tax (computed).

tax_percent
number | null
subtotal
number | null
total
number | null

Final amount (computed).

total_adjusted
number | null
read-only
retention
number | null
discount
number | null
discount_scheme
enum<string> | null
Available options:
%,
$
custom_change
number | null

Custom currency conversion factor.

Required range: x >= 1
status
enum<string>
read-only
Available options:
draft,
finalized,
paid,
cancelled,
uncollectible,
pending
biller_status
enum<string>
read-only
Available options:
pending,
queued,
succeeded,
failed,
processing
tax_agency
object
read-only

Tax-agency response payload (country-specific).

local_file
string<uri> | null
read-only

Signed URL to the fiscal PDF/XML when applicable.

subscription
integer | null

Linked subscription ID when generated by a subscription cycle.

imported
boolean
read-only
uncollectible
string<date-time> | null
read-only
test_mode
boolean
read-only
references
object[]
payments
object[]
read-only
created
string<date-time>
read-only
updated
string<date-time>
read-only