Provider account details

API to get details of an eInvoicing provider account including status and list of permitted invoice templates/series


API Endpoint

GET
https://einvoice-api-sandbox.sepay.vn/v1/provider-accounts/{id}

API Request

idstringrequired

Provider account ID (UUID)

API Response

Success Response (200)
{
  "success": true,
  "data": {
    "id": "0aea3134-da40-11f0-aef4-52c7e9b4f41b",
    "provider": "matbao",
    "active": true,
    "templates": [
      {
        "template_code": "1",
        "invoice_series": "C25TAT",
        "invoice_label": "1 - C25TAT - Hóa đơn giá trị gia tăng"
      },
      {
        "template_code": "2",
        "invoice_series": "C25TMB",
        "invoice_label": "2 - C25TMB - Hóa đơn bán hàng"
      }
    ]
  }
}
successboolean
dataobject

Error Handling

401Unauthorized

Missing or invalid Bearer token.

404Not Found

Provider account with the given ID does not exist.

Notes

Note
  • Get the id from the Provider accounts list API to query details.
  • Use template_code and invoice_series from the templates list when creating an eInvoice.
  • Common invoice templates:
    • VAT invoice (Hóa đơn giá trị gia tăng)
    • Sales invoice (Hóa đơn bán hàng)
    • Internal delivery note (Phiếu xuất kho kiêm vận chuyển nội bộ)
    • E-receipt (Biên lai điện tử)

Code Examples

>
>
>
curl --request GET \
--url https://einvoice-api-sandbox.sepay.vn/v1/provider-accounts/0aea3134-da40-11f0-aef4-52c7e9b4f41b \
--header 'Authorization: Bearer REPLACE_BEARER_TOKEN'

Next Steps

After getting the account details (including template_code and invoice_series), you can:

  1. Create eInvoice - Use the invoice template and series from this account to create an invoice