GET
/plugins/woocommerce/contexto-emision
🔒 Requiere clave de API
Alias estable del contexto de emisión para el plugin WooCommerce. Devuelve emisor, actividades, sucursales y terminales de la empresa de la API key.
Ejemplo
curl -X GET "https://fenix.kalkulusapp.com/api/plugins/woocommerce/contexto-emision" \
-H "X-API-KEY: TU_API_KEY"
const respuesta = await fetch("https://fenix.kalkulusapp.com/api/plugins/woocommerce/contexto-emision", {
method: "GET",
headers: {
"X-API-KEY": "TU_API_KEY"
}
});
const datos = await respuesta.json();
import requests
respuesta = requests.request(
"GET",
"https://fenix.kalkulusapp.com/api/plugins/woocommerce/contexto-emision",
headers={
"X-API-KEY": "TU_API_KEY"
},
)
print(respuesta.json())
<?php
$ch = curl_init("https://fenix.kalkulusapp.com/api/plugins/woocommerce/contexto-emision");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => [
"X-API-KEY: TU_API_KEY",
],
]);
$respuesta = json_decode(curl_exec($ch), true);
curl_close($ch);
Respuestas
200Contexto disponible35 campos
35 campos
| Campo | Tipo |
|---|---|
| emisor7 | |
| nombre | texto |
| nombreComercial | texto |
| identificacion2 | |
| tipoIdentificacion | texto 010203040506 |
| numeroIdentificacion | texto |
| ubicacion5 | |
| provincia | texto |
| canton | texto |
| distrito | texto |
| barrio | texto |
| otrasSenas | texto |
| telefono2 | |
| codigoPais | texto |
| numeroTelefono | texto |
| correoElectronico | texto (email) |
| otrasSenasExtranjero | texto |
| actividadesEconomicas2 | |
| codigo | texto |
| descripcion | texto |
| sucursales4 | |
| id | texto |
| nombre | texto |
| detalle | texto |
| terminales5 | |
|
id Identificador de terminal (string, no autoincremental) — es el mismo valor que va en informacionAdicional.terminal. |
texto |
| sucursal_id | texto |
| nombre | texto |
| empresa_id | entero |
| detalle | texto |
| configuracion4 | objeto |
| tipoDocumentoDefecto | entero |
| monedaDefecto | texto |
| regimenSimplificado | verdadero/falso |
| devuelveIva | verdadero/falso |
Ver el ejemplo de respuesta 45 líneas
Contexto fiscal para WooCommerce
{
"emisor": {
"nombre": "texto",
"nombreComercial": "texto",
"identificacion": {
"tipoIdentificacion": "01",
"numeroIdentificacion": "texto"
},
"ubicacion": {
"provincia": "texto",
"canton": "texto",
"distrito": "texto",
"barrio": "texto",
"otrasSenas": "texto"
},
"telefono": {
"codigoPais": "506",
"numeroTelefono": "texto"
},
"correoElectronico": "correo@ejemplo.com",
"otrasSenasExtranjero": "texto"
},
"actividadesEconomicas": [
{
"codigo": "6201.0",
"descripcion": "texto"
}
],
"sucursales": [
{
"id": "texto",
"nombre": "texto",
"detalle": "texto",
"terminales": [
"texto"
]
}
],
"configuracion": {
"tipoDocumentoDefecto": 1,
"monedaDefecto": "CRC",
"regimenSimplificado": true,
"devuelveIva": true
}
}
401API key ausente o inválida
403Requiere el alcance catalogos:leer