Discovery
- Liveness and the deployed version; with deep=1, whether the database has the schema this version expectsGET
/health - Start here: how to authenticate, where the contract is, and the rulesGET
/v1 - The catalog of every error codeGET
/v1/errors - One error code: what it means and what to doGET
/v1/errors/{code} - The contract of this API (OpenAPI 3.1), generated from the code that serves itGET
/v1/openapi.json - The guides of this API: the indexGET
/v1/docs - One guide, as MarkdownGET
/v1/docs/{page}
Identity
Organizations
- The organizations of the person, each with its live and its test idGET
/v1/organizations - Create an organization and its test twin, with the RUC of the companyPOST
/v1/organizations - The organization this credential acts onGET
/v1/organization - Rename the organization (both halves of the pair)PATCH
/v1/organization - Archive the organization (both halves of the pair)POST
/v1/organization/archive
Members
- The members of the organizationGET
/v1/members - Change the role of a memberPUT
/v1/members/{user_id} - Remove a member, or leave the organizationDEL
/v1/members/{user_id} - The invitations of the organization, newest firstGET
/v1/invitations - Invite a person by email, with a rolePOST
/v1/invitations - Accept an invitation, as the person signed inPOST
/v1/invitations/accept - See an invitation before accepting it, as the person signed inPOST
/v1/invitations/inspect - Revoke a pending invitationDEL
/v1/invitations/{id} - Send a pending invitation again, with a new codePOST
/v1/invitations/{id}/resend
Service accounts
- The service accounts of the organizationGET
/v1/service_accounts - Create a service accountPOST
/v1/service_accounts - One service accountGET
/v1/service_accounts/{id} - Change the name or the scopes of a service accountPATCH
/v1/service_accounts/{id} - Disable a service account: all its keys stop workingPOST
/v1/service_accounts/{id}/disable - The keys of a service account (never their secrets)GET
/v1/service_accounts/{id}/keys - Create a key. Its secret is in this answer and nowhere else, everPOST
/v1/service_accounts/{id}/keys - Revoke a key: it stops working at the next requestDEL
/v1/service_accounts/{id}/keys/{key_id}
Issuer
Series
Events
- What happened in the organization, in order (optionally waiting for the next event)GET
/v1/events - The catalog of event types, with an example of what a destination receives for eachGET
/v1/event_types - One eventGET
/v1/events/{id} - Where an event went: its delivery to each destination, resends includedGET
/v1/events/{id}/deliveries - Send an event again, to one destination or to every subscribed onePOST
/v1/events/{id}/resend
Customers
Establishments
Brand
- The brand of the organizationGET
/v1/brand - Replace the brand of the organizationPUT
/v1/brand - Change some entries of the brand, without overwriting what someone else savedPATCH
/v1/brand - The image library of the organizationGET
/v1/assets - Upload an image to the library, under a namePUT
/v1/assets/{name} - Remove an image from the libraryDEL
/v1/assets/{name}
Templates
- The fonts a template or the brand may useGET
/v1/fonts - The JSON Schema of the print data and of a template's manifest, and the template functionsGET
/v1/print_data/schema - The official samples every template is validated withGET
/v1/print_data/samples - The templates of the organization and the shared onesGET
/v1/templates - Create a templatePOST
/v1/templates - One template, with its draft and its versionsGET
/v1/templates/{id} - Save the draft of a templatePUT
/v1/templates/{id}/draft - Archive a templatePOST
/v1/templates/{id}/archive - Choose the version LIVE documents print withPOST
/v1/templates/{id}/promote - The preview links of a templateGET
/v1/templates/{id}/preview_links - A secret link to see (or edit) the template without a sessionPOST
/v1/templates/{id}/preview_links - Revoke a preview linkDEL
/v1/templates/{id}/preview_links/{link_id} - Run every check of the template on its draft (II-D197)POST
/v1/templates/{id}/validate - Publish the draft as a new version (TEST documents use it at once)POST
/v1/templates/{id}/publish - Look at a template: its draft, a version or a shared one, as HTML, PNG or PDF (II-D213)POST
/v1/templates/{id}/render - A short-lived token for the live preview of a template in a page (II-D221)POST
/v1/templates/{id}/preview_tokens - The links to the galleryGET
/v1/template_gallery/preview_links - A secret link to the gallery: your templates and the shared ones, without a sessionPOST
/v1/template_gallery/preview_links - Revoke a link to the galleryDEL
/v1/template_gallery/preview_links/{link_id} - What a preview link opens: its template, its draft and what the link allowsGET
/v1/template_previews/{secret} - Save the draft through a preview link (scope edit or publish)PUT
/v1/template_previews/{secret}/draft - Validate the draft through a preview link (scope edit or publish)POST
/v1/template_previews/{secret}/validate - Publish the draft through a preview link (scope publish only)POST
/v1/template_previews/{secret}/publish - Render what a preview link opens (any scope): the paper of the pagePOST
/v1/template_previews/{secret}/render - The live preview room of a template: a WebSocket told of every saveGET
/v1/template_rooms/{credential} - The paper of a preview: the sanitized HTML of a sample, for an iframe (II-D221)GET
/paper/{credential} - The paper of a preview with your own edits of the sample data (UX D2)POST
/paper/{credential}
Provider
- Who answers when this organization issues, per connection, and the state of each provider accountGET
/v1/provider - What is still missing to issue for real, and who must do each thingGET
/v1/readiness - Activate the live organization for production (staff of the service only)POST
/v1/issuer/activate_production
Staff
- What is held because the provider gave an answer the service cannot interpret, in every organization, by signature (staff only)GET
/v1/staff/held - Release held invoices and voids, by signature or by ids, in every organization (staff only)POST
/v1/staff/held/release - See what closing held invoices and voids as failed would do, after asking their provider (staff only)POST
/v1/staff/held/close/preview - Close held invoices and voids as failed, with the token of their preview (staff only)POST
/v1/staff/held/close - The open access requests of every organization (staff only)GET
/v1/staff/production_access - Accept an organization on the production access list (staff only)POST
/v1/staff/production_access/{id}/accept - Reject an access request, with a note (staff only)POST
/v1/staff/production_access/{id}/reject - Revoke the access of an organization, with a note (staff only)POST
/v1/staff/production_access/{id}/revoke - The activation requests in progress of every organization (staff only)GET
/v1/staff/production_activations - An activation request with everything to review it (staff only)GET
/v1/staff/production_activations/{id} - The bytes of a screenshot of an activation request (staff only)GET
/v1/staff/production_activations/{id}/files/{file_id}/content - Mark a screenshot valid or invalid (staff only)POST
/v1/staff/production_activations/{id}/files/{file_id}/review - Ask the organization to change its activation request, with a note (staff only)POST
/v1/staff/production_activations/{id}/request_changes - Approve an activation request: the enrolment with the provider starts (staff only)POST
/v1/staff/production_activations/{id}/approve - Reject an activation request, with a note (staff only)POST
/v1/staff/production_activations/{id}/reject
Production access
- The latest access request of the organization and its stateGET
/v1/production_access - Ask to enter the production access listPOST
/v1/production_access - Withdraw the open access requestPOST
/v1/production_access/withdraw - The activation request: its state, the note of the staff and the review of each screenshotGET
/v1/production_activation - Send the activation request with the two SUNAT screenshotsPOST
/v1/production_activation - Replace one screenshot while the staff asks for changesPUT
/v1/production_activation/files/{kind} - Send the activation request again after the requested changesPOST
/v1/production_activation/resubmit - Withdraw the activation request in progressPOST
/v1/production_activation/withdraw - The bytes of a screenshot of this organizationGET
/v1/production_activation/files/{id}/content
Invoices
- The invoices of a period as a CSV fileGET
/v1/invoices/export - Search the invoices of the organization, newest first, by cursorGET
/v1/invoices - Issue an invoice (factura or boleta)POST
/v1/invoices - See what would be issued, without issuing itPOST
/v1/invoices/preview - One invoice, optionally waiting for its outcomeGET
/v1/invoices/{id}
Test mode
- The condition the simulated provider account is inGET
/v1/test/provider - Put the simulated provider account in a condition, or lift itPUT
/v1/test/provider - Connect this test organization to the provider's sandbox (staff of the service only)POST
/v1/test/provider/connect_sandbox - Run now the next scheduled step of a test invoice that is waitingPOST
/v1/test/invoices/{id}/advance - What the simulated provider can be told to answerGET
/v1/test/scenarios - Decide the outcome of a test invoice that waits for onePOST
/v1/test/invoices/{id}/resolve - What the simulated provider can be told to answer to a voidGET
/v1/test/void_scenarios - Decide the outcome of a test void that waits for onePOST
/v1/test/invoices/{id}/void/resolve - Run now the next scheduled step of a test void that is waitingPOST
/v1/test/invoices/{id}/void/advance
Voids
- See what voiding an invoice would do, and get the token that allows itPOST
/v1/invoices/{id}/void/preview - The latest void of an invoiceGET
/v1/invoices/{id}/void - Void an accepted invoicePOST
/v1/invoices/{id}/void - Record that an accepted invoice was reversed by hand at the providerPOST
/v1/invoices/{id}/mark_externally_reversed
Corrections
Files
- The files of an invoice, each with its stateGET
/v1/invoices/{id}/files - The content of one file of an invoiceGET
/v1/invoices/{id}/files/{kind} - Render the PDF of an invoice againPOST
/v1/invoices/{id}/files/pdf/regenerate - Ask the provider again for a file that failedPOST
/v1/invoices/{id}/files/{kind}/refetch - The share links of an invoice, with how many times each was openedGET
/v1/invoices/{id}/share_links - A link to share one file of an invoice, revocablePOST
/v1/invoices/{id}/share_links - Revoke a share link: it stops opening at onceDEL
/v1/invoices/{id}/share_links/{link_id} - The renders on request of an invoiceGET
/v1/invoices/{id}/renders - The invoice printed with another template, as PDF or PNGPOST
/v1/invoices/{id}/renders - One render on requestGET
/v1/invoices/{id}/renders/{render_id} - The file of a render on requestGET
/v1/invoices/{id}/renders/{render_id}/content - Download a file by its signed linkGET
/f/{organization_id}/{invoice_id}/{file} - Download a file by its share linkGET
/s/{code}
Emails
Webhooks
- The webhook destinations of the organization (never their secrets)GET
/v1/webhook_endpoints - Create a webhook destination. Its signing secret is in this answer and nowhere else, everPOST
/v1/webhook_endpoints - One webhook destination (never its secret)GET
/v1/webhook_endpoints/{id} - Delete a destination: nothing more is delivered to itDEL
/v1/webhook_endpoints/{id} - Change the URL, the description or the event types of a destination, or disable and enable itPATCH
/v1/webhook_endpoints/{id} - Rotate the signing secret. The new one is in this answer and nowhere else, everPOST
/v1/webhook_endpoints/{id}/rotate_secret - Send a signed sample event to the destination now, and get what it answeredPOST
/v1/webhook_endpoints/{id}/test - The delivery log of a destination, newest firstGET
/v1/webhook_endpoints/{id}/deliveries