Skip to main content

Sync purchase invoices

Use this API to request a sync of purchase invoices from the General Department of Taxation (TCT) for a time range. After syncing, use the List purchase invoices API to get the data.

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

Sync purchase invoices from the General Department of Taxation for a time range.

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.
fromDatestring✕Start date, format dd/MM/yyyy.
toDatestring✕End date, format dd/MM/yyyy.
note
  • You must pass fromDate and toDate together. If you pass only one of them or leave both empty, the system syncs the last 10 days.
  • If you have not connected the tax account, the system connects automatically using the information saved at the provider.
  • Data may take some time to appear in the list after syncing.

Code samples​

curl --location --request POST 'https://open-api.tingee.vn/v1/e-invoice/input/sync' \
--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 '{
"fromDate": "01/10/2026",
"toDate": "10/10/2026"
}'

Sample Response​

{
"code": "00",
"message": "Success",
"data": "Đồng bộ thành công"
}
FieldTypeDescription
codestringResult code (00 = Success).
messagestringResponse message.
datastringResult message from the provider.

Common error codes​

CodeDescriptionHow to handle
2040Invalid time rangefromDate must be less than or equal to toDate.
400Invalid date format or sync failedUse the dd/MM/yyyy format. If the message is "Chưa kết nối tài khoản Thuế" (tax account not connected), call the Connect a tax account API first.
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.