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ámetroTipoDescripción (RFC en la URL)
identificationstringRFC del contribuyente

Content-Type: application/json

CampoTipoRequeridoDescripción
credentialstringsíBase64 de RFC:password
byPassCheckCredentialbooleannoSi 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

CampoTipoRequeridoDescripción
rfcstringsíDebe coincidir con
cert_passwordstringsíContraseña del certificado FIEL
cer_s3_keystringsíS3 key del .cer (del upload)
key_s3_keystringsíS3 key del .key (del upload)
fullNamestringnoNombre 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" → usar add-fiel para agregar FIEL
  • registrationType: "FIEL" → usar add-ciec para agregar CIEC
  • registrationType: "BOTH" → ya tiene ambos métodos