Get Document via UUID
This API allows you to retrieve the document object in JSON format and its corresponding metadata for a given UUID.
Request Method
GET
Request URL
Request Headers
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
x-cleartax-auth-token | String | Cannot be empty | Mandatory. User auth token. |
x-clear-tin | String | Cannot be empty | Mandatory. TIN of the entity |
x-clear-branch | String | Should be a valid branch from the user account | Optional. Branch name (store name) added in the user account which maps to a TIN of the entity. |
x-request-id | UUID | Should be unique for every request | Optional. Unique request ID. |
Request Path Params
There are no path parameters for this API.
Request Query Params
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
einvoice-type
| ENUM | SALES, PURCHASE, SALES_B2C | NA |
uuid | String | Mandatory - If document-id is not specified. | UUID of the document, as per LHDN |
document-id | String | Mandatory - If uuid is not specified. | Unique document-id generated after generation. |
Request Body
There will be no request body for this API.
Sample Request
Request Body
Response Status Codes
HTTP Status Code | Description |
---|---|
200 | For a successful retrieval |
400 | For any kind of validation issues |
401 | If the user is not authenticated for the operation |
403 | If the user is not authorized for the operation |
5XX | Unhandled exception |
Response Schema
Parameter | Data Type | Field Validations | Description |
---|---|---|---|
Success | Boolean | true/false | Identifies whether the request processing was successful or not |
DocumentId | String | NA | DocumentId generated by ClearTax uniquely identifies the document. |
Status | String | VALID/ INVALID/ SUBMITTED/ NOT_SUBMITTED/ CANCELLED | Mandatory. Status of Document Processing
VALID: E-Invoice is generated for the document and is Valid. INVALID: E-Invoice has validation errors from LHDN SUBMITTED: E-Invoice Generation is in Progress NOT_SUBMITTED: E-Invoice is not submitted for the Document |
Uuid | String | NA | Unique document ID in e-Invoice, shared by LHDN for the document |
LongId | String | NA | Unique long temporary Id that can be used to query document data anonymously |
InternalId | String | NA | Internal ID used in submission for the document to LHDN, link document number |
DateTimeValidated | DateTime | NA | The date and time when the document passed all validations and moved to the valid state. |
CancelDateTime | DateTime | NA | Refer to the document cancellation that has been initiated by the taxpayer “issuer” of the document on the system, will be in UTC format |
RejectRequestDateTime | DateTime | NA | Refer to the document rejection request that has been initiated by the taxpayer “receiver” of the document on the system, will be in UTC format |
IssuerTin | String | NA | TIN of issuer |
IssuerName | String | NA | Issuer company name |
ReceiverId | String | NA | Optional: receiver registration number (can be national ID or foreigner ID). |
ReceiverName | String | NA | Optional: receiver name (can be company name or person’s name) |
TotalExcludingTax | Amount | NA | Total sales amount of the document in MYR. |
TotalDiscount | Amount | NA | Total discount amount of the document in MYR. |
TotalNetAmount | Amount | NA | Total net amount of the document in MYR. |
TotalPayableAmount | Amount | NA | Total amount of the document in MYR. |
Document | Json | NA | Document Received from LHDN in Json Format. |
QrCode | String | NA | QrCode generated by Cleartax using unique longId and UUID. |
qrCodePreSignedUrl | String | NA | URL for QR Code image with link access expiry of 3 days. |
ErrorDetails | Array | NA | Optional. List of error objects. |
Sample Response (Success)
HTTP Status Code: 200
Response Body
Sample Response (Error)
HTTP Status Code: 200
Response Body
API Validations
Currently, there are no known validations.
API Constraints
Currently, there are no known constraints.
Last updated