Contribuyentes
Asociación CIEC / FIEL
Permite que un taxpayer tenga ambos métodos de autenticación (CIEC y FIEL).
La asociación bidireccional permite que un contribuyente registrado solo con CIEC o solo con FIEL pueda agregar el otro método. El campo registrationType en el detalle indica: CIEC, FIEL o BOTH.
Para agregar FIEL a un taxpayer con CIEC, primero debes subir los certificados.
Agregar CIEC a taxpayer con FIEL
PATCH /taxpayers/:identification/add-ciec
Agrega credenciales CIEC a un taxpayer registrado solo por FIEL. El RFC en el credential debe coincidir con :identification.
| Parámetro | Tipo | Descripción (RFC en la URL) |
|---|---|---|
identification | string | RFC del contribuyente |
Content-Type: application/json
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
credential | string | sí | Base64 de RFC:password |
byPassCheckCredential | boolean | no | Si true, no valida contra SAT |
Ejemplo curl:
curl --location --request PATCH 'https://api.taxo.ws/taxpayers/CUBA8809282R2/add-ciec' \
--header 'Content-Type: application/json' \
--header 'x-api-key: TU_API_KEY' \
--data '{
"credential": "Q1VCQTg4MDkyODJSMjpQZXF1ZW5hMTAw",
"byPassCheckCredential": true
}'
Agregar FIEL a taxpayer con CIEC
PATCH /taxpayers/:identification/add-fiel
Agrega credenciales FIEL a un taxpayer registrado con CIEC. Requiere haber subido certificados via Subir Certificados FIEL.
Content-Type: application/json
| Campo | Tipo | Requerido | Descripción |
|---|---|---|---|
rfc | string | sí | Debe coincidir con |
cert_password | string | sí | Contraseña del certificado FIEL |
cer_s3_key | string | sí | S3 key del .cer (del upload) |
key_s3_key | string | sí | S3 key del .key (del upload) |
fullName | string | no | Nombre del contribuyente |
Ejemplo curl:
curl --location --request PATCH 'https://api.taxo.ws/taxpayers/GOCI960430R65/add-fiel' \
--header 'Content-Type: application/json' \
--header 'x-api-key: TU_API_KEY' \
--data '{
"rfc": "GOCI960430R65",
"cert_password": "23287c91",
"cer_s3_key": "certificates/GOCI960430R65/GOCI960430R65.cer",
"key_s3_key": "certificates/GOCI960430R65/GOCI960430R65.key"
}'
Cuándo usar cada endpoint
registrationType: "CIEC"→ usaradd-fielpara agregar FIELregistrationType: "FIEL"→ usaradd-ciecpara agregar CIECregistrationType: "BOTH"→ ya tiene ambos métodos