diff --git a/website/openapi_v2.en.yaml b/website/openapi_v2.en.yaml index 0514d3d7d..fc35b7508 100644 --- a/website/openapi_v2.en.yaml +++ b/website/openapi_v2.en.yaml @@ -8558,6 +8558,52 @@ paths: $ref: "#/components/responses/RateLimited" "500": $ref: "#/components/responses/UnexpectedError" + /organizations/{organization_id}/manifiesto/download-url: + get: + operationId: getOrganizationManifiestoDownloadUrl + tags: + - organization + summary: Get Carta Manifiesto download URL + description: | + Returns a temporary URL to download the signed Carta Manifiesto that matches the tax ID in the organization's uploaded CSD as a ZIP file. + + The organization must have an uploaded CSD, and a signed Carta Manifiesto must exist for the tax ID extracted from that certificate. The URL grants access to the file while it remains valid: treat it as a credential and do not store it. + x-codeSamples: + - lang: Bash + label: cURL + source: | + curl https://www.facturapi.io/v2/organizations/5a2a307be93a2f00129ea035/manifiesto/download-url \ + -H "Authorization: Bearer sk_user_API_KEY" + parameters: + - in: path + name: organization_id + schema: + type: string + required: true + description: Organization ID. You can also use `me` with an organization Secret Key. + security: + - "SecretLiveKey": [] + - "SecretTestKey": [] + - "SecretUserKey": [] + responses: + "200": + description: Object containing a temporary URL to download the Carta Manifiesto as a ZIP file, its expiration time, content type, and filename. + content: + application/json: + schema: + $ref: "#/components/schemas/SignedDownloadUrl" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthenticated" + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "429": + $ref: "#/components/responses/RateLimited" + "500": + $ref: "#/components/responses/UnexpectedError" /organizations/{organization_id}/legal: put: operationId: editOrganizationLegal diff --git a/website/openapi_v2.yaml b/website/openapi_v2.yaml index a183e5963..400c3a304 100644 --- a/website/openapi_v2.yaml +++ b/website/openapi_v2.yaml @@ -8518,6 +8518,52 @@ paths: $ref: "#/components/responses/RateLimited" "500": $ref: "#/components/responses/UnexpectedError" + /organizations/{organization_id}/manifiesto/download-url: + get: + operationId: getOrganizationManifiestoDownloadUrl + tags: + - organization + summary: Obtener enlace de descarga de Carta Manifiesto + description: | + Devuelve un enlace temporal para descargar en ZIP la Carta Manifiesto firmada que corresponde al RFC del CSD cargado en la organización. + + La organización debe tener un CSD cargado y debe existir una Carta Manifiesto firmada para el RFC extraído de ese certificado. El enlace da acceso al archivo mientras siga vigente: trátalo como una credencial y no lo almacenes. + x-codeSamples: + - lang: Bash + label: cURL + source: | + curl https://www.facturapi.io/v2/organizations/5a2a307be93a2f00129ea035/manifiesto/download-url \ + -H "Authorization: Bearer sk_user_API_KEY" + parameters: + - in: path + name: organization_id + schema: + type: string + required: true + description: ID de la organización. También puedes usar `me` con una Secret Key de la organización. + security: + - "SecretLiveKey": [] + - "SecretTestKey": [] + - "SecretUserKey": [] + responses: + "200": + description: Objeto con una URL temporal para descargar la Carta Manifiesto en ZIP, su fecha de expiración, el tipo de contenido y el nombre del archivo. + content: + application/json: + schema: + $ref: "#/components/schemas/SignedDownloadUrl" + "400": + $ref: "#/components/responses/BadRequest" + "401": + $ref: "#/components/responses/Unauthenticated" + "404": + $ref: "#/components/responses/NotFound" + "409": + $ref: "#/components/responses/Conflict" + "429": + $ref: "#/components/responses/RateLimited" + "500": + $ref: "#/components/responses/UnexpectedError" /organizations/{organization_id}/legal: put: operationId: editOrganizationLegal