{
"status": "ok"
}
curl --location --request GET 'https://zylalabs.com/api/13423/malaysia+myinvois+e-invoice+validator+api/29078/health+check' --header 'Authorization: Bearer YOUR_API_KEY'
{
"valid": true,
"wellFormed": true,
"inputFormat": "xml",
"documentType": "01",
"version": "1.1",
"errorCount": 0,
"warningCount": 4,
"findings": [
{
"level": "info",
"ruleId": "MY-STRUCT-XSD",
"text": "Document is valid against the official UBL 2.1 Invoice XSD.",
"location": null,
"occurrences": 1
},
{
"level": "warning",
"ruleId": "MY-MATH-TAX-INCLUSIVE",
"text": "TaxInclusiveAmount (1436.50) != TaxExclusiveAmount + total TaxAmount (1524.13).",
"location": "cac:LegalMonetaryTotal/cbc:TaxInclusiveAmount",
"occurrences": 1
},
{
"level": "info",
"ruleId": "MY-SIG-CERT",
"text": "Embedded signing certificate: subject '1.2.840.113549.1.9.1=#1616616e61732e6140666776686f6c64696e67732e636f6d,2.5.4.5=#1309443132333435363738,CN=Dummy,OU=Test Unit eInvoice,2.5.4.97=#130c433239373032363335303630,O=Dummy,C=MY', issuer 'CN=Trial LHDNM Sub CA V1,OU=Terms of use at http://www.posdigicert.com.my,O=LHDNM,C=MY'.",
"location": "ds:X509Certificate",
"occurrences": 1
},
{
"level": "info",
"ruleId": "MY-SIG-EKU",
"text": "Certificate carries the Document Signing EKU (1.3.6.1.4.1.311.10.3.12).",
"location": "ds:X509Certificate",
"occurrences": 1
},
{
"level": "warning",
"ruleId": "MY-SIG-CERT-VALIDITY",
"text": "Signing certificate is outside its validity window (Thu Jun 06 02:52:36 UTC 2024 .. Fri Sep 06 02:52:36 UTC 2024): CertificateExpiredException.",
"location": "ds:X509Certificate",
"occurrences": 1
},
{
"level": "info",
"ruleId": "MY-SIG-CERTDIGEST",
"text": "XAdES SigningCertificate/CertDigest matches SHA-256 of the embedded certificate.",
"location": "xades:SigningCertificate",
"occurrences": 1
},
{
"level": "info",
"ruleId": "MY-SIG-ISSUERSERIAL",
"text": "XAdES IssuerSerial serial number matches the embedded certificate.",
"location": "xades:IssuerSerial",
"occurrences": 1
},
{
"level": "info",
"ruleId": "MY-SIG-DOC-DIGEST",
"text": "Document digest VERIFIES: recomputed SHA-256 over the minified document (UBLExtensions and cac:Signature removed, inclusive Canonical XML) matches the signed DigestValue.",
"location": "ds:Reference[@URI='']",
"occurrences": 1
},
{
"level": "warning",
"ruleId": "MY-SIG-PROPS-DIGEST",
"text": "SignedProperties digest MISMATCH: signed DigestValue Tc9oNX8EuNQohWVDZeaPOHmeBU5tuwVdwIRyfltnTPw= does not match the recomputed SHA-256 (exclusive b0VXjdpRrf5OQt96gzaFM1e8I9/+1qC5uFfI8eK8zjY= / inclusive vjjXqMNokPtL5qvfFj4irmcxCjxyVuirMVVe3KCKXBw=).",
"location": "ds:Reference[@URI='#id-xades-signed-props']",
"occurrences": 1
},
{
"level": "warning",
"ruleId": "MY-SIG-VALUE",
"text": "SignatureValue does NOT verify: RSA-SHA256 over the canonicalized SignedInfo does not match the embedded certificate's public key.",
"location": "ds:SignatureValue",
"occurrences": 1
},
{
"level": "info",
"ruleId": "MY-SIG-TRUST",
"text": "Trust chain to a Malaysian (LHDN/Pos Digicert) CA is NOT verified here; this requires the LHDNM CA/root list and, for full assurance, an online LHDN check. Structure and the embedded-certificate crypto are checked offline.",
"location": null,
"occurrences": 1
}
]
}
curl --location --request POST 'https://zylalabs.com/api/13423/malaysia+myinvois+e-invoice+validator+api/29079/validate+e-invoice' --header 'Authorization: Bearer YOUR_API_KEY'
--data-raw '
urn:oasis:names:specification:ubl:dsig:enveloped:xades
urn:oasis:names:specification:ubl:signature:1
urn:oasis:names:specification:ubl:signature:Invoice
not(//ancestor-or-self::ext:UBLExtensions)
not(//ancestor-or-self::cac:Signature)
fRaWJINS9sB9aSl/MhCjMsdVMFpLwnxstpPhJkJwkU4=
Tc9oNX8EuNQohWVDZeaPOHmeBU5tuwVdwIRyfltnTPw=
kZhLB843E/sJEd66jI1lcfRheCZXaaHs9EjYOktMy9f/QmK7f4rFKcK24lqdcr+upqN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7lNEH/eSBMGAQteH+Twtiu0Y2xSwmmsxnfJyw==
2024-07-23T16:31:06Z
KKBSTyiPKGkGl1AFqcPziKCEIDYGtnYUTQN4ukO7G40=
CN=Trial LHDNM Sub CA V1, OU=Terms of use at http://www.posdigicert.com.my, O=LHDNM, C=MY
162880276254639189035871514749820882117
XML-INV12345
2024-07-23
00:40:00Z
01
MYR
MYR
2024-07-01
2024-07-31
Monthly
151891-1981
L1
CustomsImportForm
FTA
FreeTradeAgreement
Sample Description
L1
K2
L1
urn:oasis:names:specification:ubl:signature:Invoice
urn:oasis:names:specification:ubl:dsig:enveloped:xades
CPT-CCN-W-211111-KL-000002
46510
Supplier's TIN
Supplier's BRN
NA
NA
Kuala Lumpur
50480
14
Lot 66
Bangunan Merdeka
Persiaran Jaya
MYS
Supplier's Name
+60123456789
[email protected]
Buyer's TIN
Buyer's BRN
NA
NA
Kuala Lumpur
50480
14
Lot 66
Bangunan Merdeka
Persiaran Jaya
MYS
Buyer's Name
+60123456780
[email protected]
Recipient's TIN
Recipient's BRN
Kuala Lumpur
50480
14
Lot 66
Bangunan Merdeka
Persiaran Jaya
MYS
Recipient's Name
1234
true
Service charge
100
01
1234567890
Payment method is cash
E12345678912
1.00
2024-07-23
00:30:00Z
false
Sample Description
100
true
Service charge
100
87.63
87.63
87.63
01
OTH
1436.50
1436.50
1436.50
1436.50
1436.50
0.30
1436.50
1234
1
1436.50
false
Sample Description
0.15
100
true
Sample Description
0.10
100
0
1460.50
0
6.00
E
Exempt New Means of Transport
OTH
Laptop Peripherals
MYS
9800.00.0010
003
17
100
'
After signing up, every developer is assigned a personal API access key, a unique combination of letters and digits provided to access to our API endpoint. To authenticate with the Malaysia MyInvois E-Invoice Validator API simply include your bearer token in the Authorization header.
| Header | Description |
|---|---|
Authorization
|
Required
Should be Bearer access_key. See "Your API Access Key" above when you are subscribed.
|
No long-term commitment. Upgrade, downgrade, or cancel anytime. Free Trial includes up to 50 requests.
(Save 2 months with annual billing 🎉)
Keyless Malaysia MyInvois (LHDN) e-invoice validator: official UBL 2.1 XSD, code lists, totals math, XAdES signature check. POST XML or JSON, get a rule-coded JSON report. No LHDN account.
The GET Health check endpoint returns a simple JSON object indicating the service status, while the POST Validate e-invoice endpoint returns a detailed JSON validation report that includes fields like "valid," "wellFormed," "documentType," "errorCount," and "findings" with specific rule-coded messages.
Key fields in the POST Validate e-invoice response include "valid" (boolean), "wellFormed" (boolean), "documentType" (string), "errorCount" (integer), "warningCount" (integer), and "findings" (array of detailed validation results).
The returned data is in JSON format. The structure includes a top-level object with fields for validation status, counts of errors and warnings, and an array of findings, each containing details like "level," "ruleId," "text," and "location."
The GET Health check provides service status, while the POST Validate e-invoice offers comprehensive validation results, including compliance with UBL 2.1 XSD, mandatory fields, LHDN code lists, and XAdES signature checks.
The API supports both XML (application/xml) and JSON (application/json) formats for the POST Validate e-invoice endpoint. The format is auto-detected based on the request body.
The response data is organized into a JSON object with key-value pairs. The "findings" field contains an array of objects, each detailing specific validation issues, categorized by severity (info, warning, error) and associated rule IDs.
Typical use cases include validating e-invoices for compliance with Malaysian regulations, ensuring proper formatting and structure, and checking for mathematical accuracy in totals and tax calculations.
Users can analyze the "valid" and "wellFormed" fields to determine invoice compliance. The "findings" array provides actionable insights for correcting issues, while "errorCount" and "warningCount" help prioritize necessary adjustments.
No. The validator is keyless: no LHDN account, no digital certificate, no token. You POST the invoice, you get a JSON report. Nothing is submitted to LHDN.
UBL 2.1 XML (Content-Type: application/xml) and MyInvois JSON (application/json). The format is auto-detected and the same LHDN rules are applied to both.
To obtain your API key, first sign in to your account and navigate to the API you want to use. From the API's Pricing section, choose a plan and complete the subscription process. Once subscribed, return to the API page and you will see your API Access Key displayed at the top of the documentation page. You can use this key to authenticate your requests.
You can’t switch APIs during the free trial. If you subscribe to a different API, your trial will end and the new subscription will start as a paid plan.
The free trial lasts for 7 days and allows you to make up to 50 API requests.
No, the free trial is available only once, so we recommend using it on the API that interests you the most. Most of our APIs offer a free trial, but some may not include this option.
Yes. If the API offers a free trial, you will see a "Free 7-Day Trial" option in its Pricing section. The trial lasts for 7 days and allows up to 50 API requests, enabling you to evaluate the API before subscribing to a paid plan.
Zyla API Hub is like a big store for APIs, where you can find thousands of them all in one place. We also offer dedicated support and real-time monitoring of all APIs. Once you sign up, you can pick and choose which APIs you want to use. Just remember, each API needs its own subscription. But if you subscribe to multiple ones, you'll use the same key for all of them, making things easier for you.
You can monitor your API usage through the response headers included with every request:
x-zyla-api-calls-monthly-used: Shows the total number of API requests you have used during the current billing period.
x-zyla-api-calls-monthly-remaining: Shows the number of API requests you have remaining for the current billing period.
Yes, you can cancel your subscription at any time. Simply go to the Pricing section of the API you're subscribed to and click the "Unsubscribe" button.
Please note that upgrades, downgrades, and cancellations take effect immediately. Once your subscription is canceled, access to the service will end immediately, regardless of any remaining API calls in your quota.
Please have a look at our Refund Policy: https://zylalabs.com/terms#refund