Fac-360
Payment regimes

Get a tenant-owned comprobante de retención (CRE, 20) and its references

Returns the stored header and every reference in the order the signed XML declares them, with the PEN base, the amount withheld and the net for each. netAmount = baseAmount - regimeAmount.

GET
/api/v2/retentions/{id}

Returns the stored header and every reference in the order the signed XML declares them, with the PEN base, the amount withheld and the net for each. netAmount = baseAmount - regimeAmount.

Authorization

bearerAuth
AuthorizationBearer <token>

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

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/api/v2/retentions/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Authorization: Bearer apf_v2_tu_credencial"
{  "schemaVersion": "2.0",  "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",  "paymentRegimeId": "aec72d33-cb63-4eea-9e74-0de13136fa96",  "operationId": "3051932a-fdd2-48fa-b330-7e7d41535969",  "documentType": "20",  "environment": "BETA",  "series": "string",  "number": "string",  "issueDate": "2019-08-24",  "documentName": "string",  "regimeCode": "string",  "regimePercent": "string",  "agentRuc": "string",  "receiverRuc": "string",  "totalRegimeAmount": "string",  "totalNetAmount": "string",  "submissionProfileVersion": "sunat-retention-cre-v1",  "state": "VALIDATED",  "stateVersion": 1,  "responseCode": "string",  "responseMessage": "string",  "errorCode": "string",  "references": [    {      "referenceIndex": 1,      "referenceDocumentType": "01",      "referenceSeries": "string",      "referenceNumber": "string",      "referenceIssueDate": "2019-08-24",      "referenceCurrency": "string",      "referenceTotalAmount": "string",      "paymentId": "string",      "paidAmount": "string",      "paymentDate": "2019-08-24",      "regimeDate": "2019-08-24",      "exchangeRate": "string",      "exchangeDate": "2019-08-24",      "baseAmount": "string",      "regimeAmount": "string",      "netAmount": "string"    }  ],  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}