Reenviar correo POST

Reenvia el comprobante autorizado al correo indicado. Se adjuntan el PDF y el XML.

POST /v1/contribuyentes/{identificacion}/comprobantes/{claveAcceso}/correo

Se admiten varios destinatarios separados por comas; no se envia asunto ni cuerpo HTML.

Solo si el comprobante ya esta autorizado. Si no, 400 y codigo 302.

{ "destinatario": "cliente@ejemplo.com, copia@ejemplo.com" }
curl -s -X POST "https://staging-api.mynexusapi.com/v1/contribuyentes/0123456789001/comprobantes/0101202601170123456789012201234567890123456789012/correo" \
  -H "X-Api-Key: $ECUAFACT_API_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"destinatario\":\"cliente@ejemplo.com\"}"
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", apiKey);
await http.PostAsJsonAsync(
    "https://staging-api.mynexusapi.com/v1/contribuyentes/0123456789001/comprobantes/0101202601170123456789012201234567890123456789012/correo",
    new { destinatario = "cliente@ejemplo.com" });
import os, requests

requests.post(
    "https://staging-api.mynexusapi.com/v1/contribuyentes/0123456789001/comprobantes/0101202601170123456789012201234567890123456789012/correo",
    headers={"X-Api-Key": os.environ["ECUAFACT_API_KEY"]},
    json={"destinatario": "cliente@ejemplo.com"},
    timeout=60)
await fetch(
  "https://staging-api.mynexusapi.com/v1/contribuyentes/0123456789001/comprobantes/0101202601170123456789012201234567890123456789012/correo",
  {
    method: "POST",
    headers: {
      "X-Api-Key": process.env.ECUAFACT_API_KEY,
      "Content-Type": "application/json"
    },
    body: JSON.stringify({ destinatario: "cliente@ejemplo.com" })
  });
<?php
$ch = curl_init("https://staging-api.mynexusapi.com/v1/contribuyentes/0123456789001/comprobantes/0101202601170123456789012201234567890123456789012/correo");
curl_setopt_array($ch, [
    CURLOPT_POST => true,
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        "X-Api-Key: " . getenv("ECUAFACT_API_KEY"),
        "Content-Type: application/json"
    ],
    CURLOPT_POSTFIELDS => json_encode(["destinatario" => "cliente@ejemplo.com"]),
]);
curl_exec($ch);
HttpRequest peticion = HttpRequest.newBuilder()
    .uri(URI.create("https://staging-api.mynexusapi.com/v1/contribuyentes/0123456789001/comprobantes/0101202601170123456789012201234567890123456789012/correo"))
    .header("X-Api-Key", apiKey)
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString("{\"destinatario\":\"cliente@ejemplo.com\"}"))
    .build();
HttpClient.newHttpClient().send(peticion, HttpResponse.BodyHandlers.ofString());
await client.EnviarCorreoAsync(identificacion, claveAcceso, "cliente@ejemplo.com");
client.enviar_correo(identificacion, clave_acceso, "cliente@ejemplo.com")
await client.enviarCorreo(identificacion, claveAcceso, "cliente@ejemplo.com");
<?php
$client->enviarCorreo($identificacion, $claveAcceso, "cliente@ejemplo.com");
client.enviarCorreo(identificacion, claveAcceso, "cliente@ejemplo.com");

Respuesta 200:

{ "datos": { "claveAcceso": "0101202601170123456789012201234567890123456789012", "destinatario": "cliente@ejemplo.com,copia@ejemplo.com" } }

Siguientes pasos#

No se pudo completar la operacion. Recargar ✕