Invoice Email Logs API

Query the invoice email send history via SePay eInvoice API with pagination. Shows which email an invoice was sent to, the delivery status, and timestamp.

||

API Endpoint

GET
https://einvoice-api.sepay.vn/v1/email-logs

API Request

pageinteger

Current page (default 1)

Default: 1
per_pageinteger

Records per page (default 20, maximum 100)

Default: 20
invoice_numberstring

Filter by invoice number (partial match)

statusenum

Filter by email delivery status. Returns all if omitted.

  • pending: Waiting to be sent
  • sending: Sending in progress
  • sent: Sent successfully
  • failed: Send failed (still retriable)
  • retrying: Retrying
  • permanent_failed: Permanently failed (retries exhausted)
to_emailstring

Filter by recipient email address (partial match)

reference_codestring

Filter by invoice reference code (partial match)

Pagination
  • Use page to specify the page number (default is 1).
  • Use per_page to limit records per page (default is 20, maximum 100).
  • Response returns has_more: true if there is more data on the next page.

API Response

Success Response (200)
{
  "data": {
    "paging": {
      "per_page": 20,
      "total": 3,
      "has_more": false,
      "current_page": 1,
      "page_count": 1
    },
    "items": [
      {
        "invoice_series": "C26TSE",
        "invoice_number": "3872",
        "full_invoice_number": "C26TSE3872",
        "reference_code": "3a012136-6577-11f1-9f9b-52c7e9b4f41b",
        "to_email": "buyer@example.com",
        "status": "sent",
        "sent_at": "2026-06-11 14:26:40",
        "created_at": "2026-06-11 14:26:35"
      }
    ]
  }
}
dataobject
About the status field

status indicates the email delivery status: pending (waiting to be sent), sending (sending in progress), sent (sent successfully), failed (failed, still retriable), retrying (retrying), permanent_failed (permanently failed, retries exhausted). When the email has not been sent successfully, sent_at is null.

Error Handling

401Unauthorized

Missing or invalid Bearer token. Please verify your token in the Authorization header.

Code Examples

>
>
>
curl --request GET \
--url 'https://einvoice-api.sepay.vn/v1/email-logs?page=1&per_page=20&invoice_number=3872&status=sent&to_email=buyer%40example.com&reference_code=3a012136-6577-11f1-9f9b-52c7e9b4f41b' \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Next Steps

From the reference_code in the results, you can:

  1. Invoice Details - View detailed information of the corresponding invoice
  2. Download Invoice - Download the PDF or XML file of an issued invoice