List this company's SIRE periods
Every period this company has opened, in either book, newest movement first. Reading is always available even on a deployment that cannot RUN a period: a caller has to be able to find out what state a period is in.
Every period this company has opened, in either book, newest movement first. Reading is always available even on a deployment that cannot RUN a period: a caller has to be able to find out what state a period is in.
Authorization
bearerAuth Tenant-bound, scoped and expiring Apifact credential. Migrated legacy credentials are accepted only on deprecated v1 writes and tenant-scoped v2 read, poll and download routes. Each operation names the single scope it requires in x-required-scope; the scope array of the security requirement itself is empty because OpenAPI 3.0 requires it to be for a non-oauth2 scheme.
In: header
Response Body
application/json
application/json
application/json
curl -X GET "https://example.com/api/v2/sire/periods" \ -H "Authorization: Bearer apf_v2_tu_credencial"{ "schemaVersion": "2.0", "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6", "periods": [ { "book": "rvie", "period": "string", "status": "string", "ticket": "string", "updatedAt": "2019-08-24T14:15:22Z" } ]}File a complaint or a grievance into a company's complaint book POST POST
The public door of the Libro de Reclamaciones. NO CREDENTIAL: the caller is a consumer, not an integrator, and has no account here. THE BOOK IDENTIFIER IS THE CAPABILITY. It is an opaque UUID we mint for a company and can rotate; it lets its holder WRITE ONE COMPLAINT into one book and nothing else. There is no GET under /public/v1: a leaked identifier cannot read a complaint, cannot reveal whose book it is, and cannot reach anything else on this hostname. EVERY UNUSABLE BOOK ANSWERS THE SAME 404. Unknown identifier, retired book, company no longer active: one code, one message. Distinguishing them would answer 'is this business a client of yours?' for anyone willing to iterate. CORS IS ALLOWED HERE AND NOWHERE ELSE ON THIS HOSTNAME, because the form lives on the client's own domain. `Access-Control-Allow-Origin: *` with NO `Access-Control-Allow-Credentials`, so a browser will not attach the console session cookie to these requests and will not expose a response to a script that tried. RATE LIMITED PER IP, ten entries per sixty seconds, keyed on the address Cloudflare saw. Per IP and not per book on purpose: a per-book bucket would let one flood close a company's legal complaint form for everybody else. THE RECEIPT IS NOT THE BOOK IDENTIFIER. The response carries a tracking code issued per company and per year, which is what the consumer quotes to follow up.
Open a period in the ledger, or return the one already open POST POST
Records that somebody intends to work on this month. IT SENDS NOTHING TO SUNAT, which is why it needs only sire:read — requiring sire:manage would make looking impossible without also holding the capability to close a period. Idempotent by the schema: one operation per (company, book, period), so a repeat returns the one that exists rather than starting a second. Reopening never resets a period that is already awaiting a ticket. A COMPANY IN BETA IS REFUSED with 409 SIRE_REQUIRES_PRODUCTION. SIRE only knows real RUCs and has no test environment: it is not that a beta company would fail, it is that there is nowhere for it to try. The refusal comes from the database, not from this route.