# List Social Security Quarterly Declarations Returns the declaration history, grouped by year, newest year first, with the quarters of each year newest first. Takes no query parameters other than api_key and ignores any that are sent. niss and worker_type are read live and appear once per year; each quarter object has the fields of the single declaration minus year, niss and worker_type. Needs a NISS: answers 422 until the settings exist. Served under /services/v1/, not /api/v3/, on the same host. Which quarters are listed, as a union: every quarter of the current year, including open and future ones (zeros when nothing is invoiced yet); every quarter the account invoiced in since 1 January two years before the current year (for example, since 1 January 2024 in 2026); every quarter that already has cached data, from any year, so history does not drop off. Each listed quarter is re-aggregated over its 3 months, so a total is never partial. A quarter with no invoicing still shows estimated_monthly_payment: 20.0, the monthly minimum. Money totals are decimal strings. Every estimated_* field is an estimate; total_amount is the figure to declare. Requires the administrator or contributor role. Error messages follow the language of the account (pt, en or es), not the Accept-Language header. JSON only. This feature only calculates and records; it submits nothing to Segurança Social. Endpoint: GET /services/v1/social_security/quarterly_declarations Version: 3.1.0 Security: apiKeyAuth ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Response 200 fields (application/json): - `year` (integer) Example: 2026 - `quarters` (array) Newest quarter first. - `quarters.quarter` (integer) Example: 2 - `quarters.start_date` (string) First day of the quarter. Example: "2026-04-01" - `quarters.end_date` (string) Last day of the quarter. Example: "2026-06-30" - `quarters.total_amount` (string) The figure to declare in Segurança Social Direta: the gross amount invoiced in the quarter, before VAT. Decimal string (for example "1250.5"), not a JSON number. Counts Invoice, SimplifiedInvoice and InvoiceReceipt documents (and legacy documents with no type) with status sent, settled or second_copy, dated inside the quarter. Example: "1250.5" - `quarters.services_amount` (string) Heuristic services share of total_amount, from the unit of each invoice line. Normally adds up to total_amount together with goods_amount, but the two come from different sources (total_amount from the document totals, the split from the line subtotals) and may differ by rounding. Decimal string. Example: "1000.5" - `quarters.goods_amount` (string) Heuristic goods share of total_amount. Decimal string. Example: "250.0" - `quarters.document_count` (integer) Number of documents counted. Example: 4 - `quarters.monthly_breakdown` (array) Always exactly 3 entries, in month order. - `quarters.monthly_breakdown.month` (integer) Calendar month number. Example: 5 - `quarters.monthly_breakdown.total_amount` (string) Gross invoiced amount of the month before VAT (total_before_taxes), as a decimal string (for example "500.0"). Not a JSON number. Example: "500.0" - `quarters.monthly_breakdown.services_amount` (string) Part of total_amount classified as services (invoice lines whose unit is not unit, product or article). A heuristic split. Decimal string. Example: "400.0" - `quarters.monthly_breakdown.goods_amount` (string) Part of total_amount classified as goods (invoice lines whose unit is unit, product or article). A heuristic split. Decimal string. Example: "100.0" - `quarters.monthly_breakdown.document_count` (integer) Number of documents counted in the month. Example: 2 - `quarters.contribution_year` (integer) Year whose IAS caps the contribution base. Equals year, except for quarter 4, which is declared in January and uses year + 1. If that year is not in the IAS table (a future year, or before 2014) the latest known IAS is used (537.13, the 2026 value). Example: 2026 - `quarters.ias` (string) IAS (Indexante dos Apoios Sociais) of contribution_year, as a decimal string without fixed decimals ("537.13", "522.5"). Returned so a client can explain the estimate. Example: "537.13" - `quarters.monthly_base_cap` (string) Cap on the monthly contribution base, 12 times ias. Decimal string. Example: "6445.56" - `quarters.estimated_relevant_income` (number) ESTIMATE. services_amount x 0.70 + goods_amount x 0.20, rounded to 2 decimals. JSON number. Example: 750.35 - `quarters.estimated_monthly_payment` (number) ESTIMATE. Contribution for each of the 3 months this declaration bills, not for the quarter. max(round(min(estimated_relevant_income / 3, monthly_base_cap) x rate, 2), 20.00), with rate 0.214 for independente and 0.252 for eni. Never below the 20.00 monthly minimum, so a quarter with no invoicing still shows 20.0. JSON number. Example: 53.52 - `quarters.submitted_at` (string,null) When the account recorded a self-report for this quarter, otherwise null. It can be set on a quarter that is still open. - `niss` (string) Read live from the current settings. Example: "12345678902" - `worker_type` (string) Read live from the current settings. Enum: "independente", "eni" ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 403 fields (application/json): - `errors` (array) Example: [{"error":"You do not have permission to perform this action"}] - `errors.error` (string) ## Response 422 fields (application/json): - `errors` (array) Example: [{"error":"No NISS is set for this account yet."}] - `errors.error` (string) ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string)