Fac-360
Complaint book

File a complaint with your own credential

The door for a client that has its own server: your form posts to you, you post here. Preferred over the credential-less public route whenever you can do it, because the tenant then comes from the credential like everything else in this API. It writes through the SAME implementation the public door uses, so the correlativo, the checks and the record are identical and only source differs — PUBLIC there, API here. NO Idempotency-Key, and this is the one route in v2 where a repeat can duplicate. It is accepted deliberately: a duplicate complaint burns no correlativo, reaches no SUNAT and creates no fiscal fact, and the public twin of this act is a browser that has no key to offer — two doors onto one book that de-duplicated differently would be worse than neither doing it. Refuses with 409 if the company has not minted its book yet.

POST
/api/v2/complaints

The door for a client that has its own server: your form posts to you, you post here. Preferred over the credential-less public route whenever you can do it, because the tenant then comes from the credential like everything else in this API. It writes through the SAME implementation the public door uses, so the correlativo, the checks and the record are identical and only source differs — PUBLIC there, API here. NO Idempotency-Key, and this is the one route in v2 where a repeat can duplicate. It is accepted deliberately: a duplicate complaint burns no correlativo, reaches no SUNAT and creates no fiscal fact, and the public twin of this act is a browser that has no key to offer — two doors onto one book that de-duplicated differently would be worse than neither doing it. Refuses with 409 if the company has not minted its book yet.

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

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/complaints" \  -H "Authorization: Bearer apf_v2_tu_credencial" \  -H "Content-Type: application/json" \  -d '{    "kind": "RECLAMO",    "consumer": {      "name": "Ana Torres Mendoza",      "documentType": "DNI",      "documentNumber": "40404040",      "email": "ana.torres@example.com",      "phone": "+51 987 654 321"    },    "item": {      "kind": "SERVICIO",      "description": "Plan mensual de consultoria contratado el 12 de agosto",      "amount": 1180    },    "detail": "Contrate el plan mensual y se cobro el importe completo, pero el servicio no se presto en la fecha acordada ni se me comunico ninguna reprogramacion.",    "requested": "Que se preste el servicio esta semana o se devuelva el importe cobrado."  }'
{  "schemaVersion": "2.0",  "requestId": "d385ab22-0f51-4b97-9ecd-b8ff3fd4fcb6",  "trackingCode": "string",  "kind": "RECLAMO",  "submittedAt": "2019-08-24T14:15:22Z"}