Factura Electrónica de Exportación


Solicitud
// Creamos una instancia del web service
const ws = afip.WebService("wsfex");

// Aqui deben cambiar los datos por los que correspondan. 
// Esta request de ejemplo incluye todos posibles 
// valores para llamar al metodo FEXAuthorize, puede que algun
// valor sea opcional.
const data = {
    "Auth": {
        "Token": "string",
        "Sign": "string",
        "Cuit": 1
    },
    "Cmp": {
        "Id": 1,
        "Fecha_cbte": "string",
        "Cbte_Tipo": 1,
        "Punto_vta": 1,
        "Cbte_nro": 1,
        "Tipo_expo": 1,
        "Permiso_existente": "string",
        "Permisos": {
            "Permiso": [
                {
                    "Id_permiso": "string",
                    "Dst_merc": 1
                }
            ]
        },
        "Dst_cmp": 1,
        "Cliente": "string",
        "Cuit_pais_cliente": 1,
        "Domicilio_cliente": "string",
        "Id_impositivo": "string",
        "Moneda_Id": "string",
        "Moneda_ctz": 1.5,
        "CanMisMonExt": "string",
        "Obs_comerciales": "string",
        "Imp_total": 1.5,
        "Obs": "string",
        "Cmps_asoc": {
            "Cmp_asoc": [
                {
                    "Cbte_tipo": 1,
                    "Cbte_punto_vta": 1,
                    "Cbte_nro": 1,
                    "Cbte_cuit": 1
                }
            ]
        },
        "Forma_pago": "string",
        "Incoterms": "string",
        "Incoterms_Ds": "string",
        "Idioma_cbte": 1,
        "Items": {
            "Item": [
                {
                    "Pro_codigo": "string",
                    "Pro_ds": "string",
                    "Pro_qty": 1.5,
                    "Pro_umed": 1,
                    "Pro_precio_uni": 1.5,
                    "Pro_bonificacion": 1.5,
                    "Pro_total_item": 1.5
                }
            ]
        },
        "Opcionales": {
            "Opcional": [
                {
                    "Id": "string",
                    "Valor": "string"
                }
            ]
        },
        "Fecha_pago": "string",
        "Actividades": {
            "Actividad": [
                {
                    "Id": 1
                }
            ]
        }
    }
};

try {
    // Realizamos la llamada al metodo del web service
    const response = await ws.executeRequest("FEXAuthorize", data);

    // Mostramos la respuesta por consola
    console.log(response);
catch(error){
    // En caso de error lo mostramos por consola
	console.error(error);
}
Respuesta
{
    "FEXAuthorizeResult": {
        "FEXResultAuth": {
            "Id": "long",
            "Cuit": "long",
            "Cbte_tipo": "short",
            "Punto_vta": "integer",
            "Cbte_nro": "long",
            "Cae": "string",
            "Fch_venc_Cae": "string",
            "Fch_cbte": "string",
            "Resultado": "string",
            "Reproceso": "string",
            "Motivos_Obs": "string"
        },
        "FEXErr": {
            "ErrCode": "integer",
            "ErrMsg": "string"
        },
        "FEXEvents": {
            "EventCode": "integer",
            "EventMsg": "string"
        }
    }
}