Skip to main content

Purchase invoice details

Use this API to get the details of a purchase invoice, including seller and buyer information, the list of goods/services and the tax rate summary.

POST
URLhttps://open-api.tingee.vn/v1/e-invoice/input/detail

Get the details of a purchase invoice by invoiceCode.

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✕E-invoice account ID (from List accounts). Leave empty to use the default account.
invoiceCodestring✓Invoice identifier, from the List purchase invoices API.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/e-invoice/input/detail' \
--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": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": {
"invoiceCode": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
"fileHistoryId": "f9e8d7c6-b5a4-4321-9876-543210fedcba",
"invoiceName": "Hóa đơn giá trị gia tăng",
"invoicePattern": "1",
"invoiceSeries": "C26TAA",
"invoiceNo": "0000125",
"invoiceDate": "2026-10-05",
"signedDate": "2026-10-05",
"receivedDate": "2026-10-06",
"approvedDate": null,
"paymentDate": null,
"currency": "VND",
"exchangeRate": 1,
"paymentMethod": "TM/CK",
"sellerName": "CÔNG TY TNHH ABC",
"sellerTaxCode": "0101234567",
"sellerAddress": "Hà Nội",
"buyerName": "CÔNG TY CP XYZ",
"buyerTaxCode": "0109876543",
"buyerAddress": "TP. Hồ Chí Minh",
"totalBeforeTax": 1000000,
"taxAmount": 80000,
"discountAmount": 0,
"totalAfterTax": 1080000,
"amountInWords": "Một triệu không trăm tám mươi nghìn đồng",
"invoiceStatus": 1,
"approvalStatus": 1,
"invoiceType": 1,
"note": null,
"items": [
{
"id": 987654,
"lineNumber": 1,
"itemName": "Dịch vụ phần mềm",
"unitName": "Gói",
"quantity": 1,
"unitPrice": 1000000,
"totalBeforeTax": 1000000,
"taxRate": "8%",
"taxAmount": 80000,
"itemType": 1,
"isPromotion": false
}
],
"taxRateSummaries": [
{
"id": 55501,
"taxRate": "8%",
"taxAmount": 80000
}
]
}
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
data.invoiceCodestringInvoice identifier.
data.fileHistoryIdstringInvoice file history ID at the provider.
data.invoiceName, invoicePattern, invoiceSeries, invoiceNostringInvoice name, template number (mẫu số), invoice symbol (ký hiệu) and invoice number.
data.invoiceDate, signedDate, receivedDate, approvedDate, paymentDatestringIssue date, signing date, received date, approval date, payment date.
data.currency, exchangeRatestring, numberCurrency (default VND) and exchange rate (default 1).
data.paymentMethodstringPayment method.
data.sellerName, sellerTaxCode, sellerAddressstringSeller information.
data.buyerName, buyerTaxCode, buyerAddressstringBuyer information.
data.totalBeforeTax, taxAmount, discountAmount, totalAfterTaxnumberTotal before tax, tax amount, discount, total payment.
data.amountInWordsstringAmount in words.
data.invoiceStatusnumberInvoice status (as provided by the provider).
data.approvalStatusnumberApproval status: 1 Pending approval, 2 Approved, 3 Rejected, 4 Cancelled, 5 Processed.
data.invoiceTypenumberInvoice type (as provided by the provider).
data.notestringNote (if any).
data.items[]arrayList of goods/service lines: id, lineNumber (line number), itemName, unitName, quantity, unitPrice, totalBeforeTax (amount before tax), taxRate, taxAmount, itemType (1 Goods/Services, 4 Note), isPromotion (promotional item).
data.taxRateSummaries[]arrayTax amount summary per tax rate: id, taxRate, taxAmount.

Common error codes​

CodeDescriptionHow to handle
400Failed to get the purchase invoice detailsCheck invoiceCode. message contains the details.
2036The account is not registered for the purchase invoice serviceUpdate the account so that services contains input-invoice via the Create/Update account API.
2007The provider is not supportedPurchase invoices only support x-cyber provider accounts.
2032No default account is configuredPass accountId, or set an account as the default.
1057Account information not foundCheck accountId.
1095, 1096Master Merchant merchantId errorPass a merchantId 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.