chore(retentions): add new retentions method for support drafts (#282) - #289
Open
raul-facturapi wants to merge 1 commit into
Open
chore(retentions): add new retentions method for support drafts (#282)#289raul-facturapi wants to merge 1 commit into
raul-facturapi wants to merge 1 commit into
Conversation
raul-facturapi
requested review from
edgtz and
javorosas
and
a lite review from Copilot
August 12, 2026 15:27
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the OpenAPI v2 specs (ES + EN) to document new functionality around retention drafts (draft creation, draft-only update, copy-to-draft, and stamp-draft flows) and adds a new set of endpoints to create/list/retrieve/download monthly invoice ZIP export requests.
Changes:
- Document draft retentions support: creation via
status: "draft", draft update viaPUT /retentions/{retention_id}, draft stamping, and copy-to-draft. - Add retention list filtering by
statusand extendRetentionschema withis_ready_to_stamp. - Add
/invoices/zip-requestsendpoints plus related schemas/parameters/responses for monthly invoice ZIP generation and download.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| website/openapi_v2.yaml | Adds monthly invoice ZIP request endpoints and extends retention endpoints/schemas to support draft workflows (Spanish spec). |
| website/openapi_v2.en.yaml | Mirrors the same monthly invoice ZIP request endpoints and retention draft workflow documentation (English spec). |
Suppressed comments (2)
website/openapi_v2.yaml:6798
- En los ejemplos de este endpoint se usa un ID de retención de 24 caracteres hex (p. ej.
6062d9fb...), pero el ejemplo de Java usaret_123, que no coincide con el formato mostrado y puede confundir. Sugiero usar el mismo ID de ejemplo que los otros lenguajes.
var retention = facturapi.retentions().retrieve(
"ret_123"
);
website/openapi_v2.en.yaml:6584
- The examples for this endpoint use a 24-hex retention id (e.g.
6062d9fb...), but the Java snippet usesret_123, which doesn't match the shown format and may confuse readers. Consider using the same example id as the other languages.
var retention = facturapi.retentions().retrieve(
"ret_123"
);
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+3695
to
+3700
| /invoices/zip-requests: | ||
| post: | ||
| operationId: createInvoiceZipRequest | ||
| tags: | ||
| - invoice | ||
| summary: Crear o recuperar solicitud de ZIP mensual |
| Realiza una solicitud de cancelación de retención ante el SAT. | ||
|
|
||
| A diferencia de las facturas comunes, la cancelación de la retención es inmediata y no requiere autorización de parte del receptor. | ||
| A diferencia de las facturas comúnes, la cancelación de la retención es inmediata y no requiere autorización de parte del receptor. |
Comment on lines
+6995
to
+6996
| Clave que representa el motivo de la cancelación de la retención. | ||
| Requerido para retenciones que no son borrador. |
Comment on lines
+6790
to
+6792
| import io.facturapi.Facturapi; | ||
| import java.util.List; | ||
| import java.util.Map; |
Comment on lines
+6519
to
+6523
| - draft | ||
| - pending | ||
| - valid | ||
| - canceled | ||
| - failed |
Comment on lines
+6576
to
+6578
| import io.facturapi.Facturapi; | ||
| import java.util.List; | ||
| import java.util.Map; |
javorosas
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.