curl --request POST \
--url https://api.fegora.com/cuenta \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.fegora.com/cuenta', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fegora.com/cuenta"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "12345678",
"idCanal": 1,
"canal": {
"id": 1,
"nombre": "API",
"nombreCorto": "api"
},
"idCertificador": "12345678",
"certificador": {
"id": "12345678"
},
"tieneCertificado": true,
"direccionCorreoElectronico": "ventas@ejemplo.com.gt",
"direccionWeb": "ejemplo.com.gt",
"telefonos": "2222-1155, 5555-6654",
"logoUri": "https://cdn.fegora.com/imagenes/12345678_logo.png",
"slogan": "De todo para todos",
"emiteFacturas": true,
"recibeFacturas": false,
"estaEnAmbienteDePruebas": false,
"monedaPorDefecto": "GTQ",
"tipoDocumentoPorDefecto": "factura",
"tipoProductoPorDefecto": "bien",
"unidadMedidaPorDefecto": "uni",
"informacionFiscal": {
"id": "12345678",
"nombre": "DISTRIBUIDORA DETODO, SOCIEDAD ANONIMA",
"nombreComercial": "DETODO",
"afiliacionIva": "GENERAL",
"afiliacionIsr": "ISR_OPCIONAL_SIMPLIFICADO_SOBRE_INGRESOS_ACTIVIDADES_LUCRATIVAS",
"codigoEstablecimiento": "1",
"esExentoIva": false,
"esRetenedorIva": true,
"direccion": {
"direccion": "Ruta 8 3-65 Zona 4 Guatemala",
"municipio": "Guatemala",
"departamento": "Guatemala",
"codigoPostal": "01004",
"pais": "GT"
}
},
"establecimientos": [],
"datosAdicionales": [],
"plantillasPdf": [],
"plantillasMensajeCorreoElectronico": [],
"usuarios": []
}{
"severidad": 0,
"codigo": "FEG_CUE_CREA_002",
"mensaje": "La cuenta que está enviando ya existe.",
"masInformacion": "https://developer.fegora.com"
}{
"codigo": "FEG_UNAUTHORIZED",
"mensaje": "No está autorizado para acceder a este recurso",
"masInformacion": "https://developer.fegora.com",
"severidad": 2
}Crear una cuenta
curl --request POST \
--url https://api.fegora.com/cuenta \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.fegora.com/cuenta', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.fegora.com/cuenta"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"id": "12345678",
"idCanal": 1,
"canal": {
"id": 1,
"nombre": "API",
"nombreCorto": "api"
},
"idCertificador": "12345678",
"certificador": {
"id": "12345678"
},
"tieneCertificado": true,
"direccionCorreoElectronico": "ventas@ejemplo.com.gt",
"direccionWeb": "ejemplo.com.gt",
"telefonos": "2222-1155, 5555-6654",
"logoUri": "https://cdn.fegora.com/imagenes/12345678_logo.png",
"slogan": "De todo para todos",
"emiteFacturas": true,
"recibeFacturas": false,
"estaEnAmbienteDePruebas": false,
"monedaPorDefecto": "GTQ",
"tipoDocumentoPorDefecto": "factura",
"tipoProductoPorDefecto": "bien",
"unidadMedidaPorDefecto": "uni",
"informacionFiscal": {
"id": "12345678",
"nombre": "DISTRIBUIDORA DETODO, SOCIEDAD ANONIMA",
"nombreComercial": "DETODO",
"afiliacionIva": "GENERAL",
"afiliacionIsr": "ISR_OPCIONAL_SIMPLIFICADO_SOBRE_INGRESOS_ACTIVIDADES_LUCRATIVAS",
"codigoEstablecimiento": "1",
"esExentoIva": false,
"esRetenedorIva": true,
"direccion": {
"direccion": "Ruta 8 3-65 Zona 4 Guatemala",
"municipio": "Guatemala",
"departamento": "Guatemala",
"codigoPostal": "01004",
"pais": "GT"
}
},
"establecimientos": [],
"datosAdicionales": [],
"plantillasPdf": [],
"plantillasMensajeCorreoElectronico": [],
"usuarios": []
}{
"severidad": 0,
"codigo": "FEG_CUE_CREA_002",
"mensaje": "La cuenta que está enviando ya existe.",
"masInformacion": "https://developer.fegora.com"
}{
"codigo": "FEG_UNAUTHORIZED",
"mensaje": "No está autorizado para acceder a este recurso",
"masInformacion": "https://developer.fegora.com",
"severidad": 2
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Cuerpo para crear/actualizar una cuenta (formato anidado legacy: identidad fiscal bajo informacionFiscal, configuración operativa a nivel raíz). id e idCertificador son obligatorios al crear.
NIT de la cuenta. Requerido al crear.
Identificador del certificador autorizado. Requerido al crear.
Certificado de firma en base64, o data-URI (application/x-pkcs12;base64,<datos>).
Show child attributes
Show child attributes
Logo en base64 o data-URI.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Cuenta creada.
Cuenta emisora/receptora. El país de operación de la cuenta (Guatemala, El Salvador o República Dominicana) se define en informacionFiscal.direccion.pais y en la configuración del certificador — no hay un campo único de "país de la cuenta".
NIT (o RNC en República Dominicana) de la cuenta.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Si la cuenta tiene un certificado de firma (.pfx) configurado. El certificado y su clave nunca se devuelven.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes