Skip to main content

Send an invoice by email

This API lets you send an invoice to the buyer by email.

Note

This API currently only supports the XCyber and MISA providers.

POST
URLhttps://open-api.tingee.vn/v1/e-invoice/send-email

Send an invoice to the buyer by email.

Header Request​

HeaderRequiredDescription
Content-Type✓application/json
x-client-id✓Partner identifier issued by TINGEE.
x-signature✓HMAC SHA512 authentication signature. See How to generate the signature.
x-request-timestamp✓Time the request is sent (format: yyyyMMddHHmmssSSS, UTC+7)

Body Parameter​

FieldTypeRequiredDescription
merchantIdnumber✕Merchant ID.
(Required if you connect with a Master Merchant account).
accountIdnumber✕Account configuration ID.
The system prefers the account that issued this invoice; only if that cannot be determined does it use accountId (or the default account if empty).
invoiceCodestring✓Invoice code (invoiceCode) you passed when calling Create and issue an invoice.
recipientEmailstring✓Recipient email.
buyerNamestring✕Recipient name displayed in the email.
Only applies to MISA (Default: Khách hàng).

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/e-invoice/send-email' \
--header 'accept: application/json' \
--header 'x-client-id: YOUR_CLIENT_ID' \
--header 'x-request-timestamp: 20240509154004003' \
--header 'x-signature: YOUR_SIGNATURE' \
--header 'Content-Type: application/json' \
--data '{
"invoiceCode": "INV-20251209-001",
"recipientEmail": "buyer@example.com"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": null
}
FieldTypeDescription
codestringStatus code.
messagestringResult message.
datanullNo data returned.

Common error codes​

CodeDescriptionHow to handle
2035The invoice has not been issued successfullyYou can only send email for invoices issued via Create and issue an invoice.
2007The provider does not support sending invoice emailsHiLo, S-Invoice and BKAV are not supported; use Download invoice to get the PDF and send it yourself.
2032No default provider account is configuredConfigure a default account or pass accountId.
1057No account found for accountIdCheck accountId with List accounts.
1095, 1096Master Merchant merchantId errorPass the merchantId of a sub-Merchant belonging to the Master Merchant calling the API.
90, 91, 92, 97Request authentication error (timestamp, client-id, signature)See System error codes.
OthersOther errorsSee Error codes.