Get Malaysia E-Invoice Status

View as Markdown
# Get Malaysia E-Invoice Status (by docId) Retrieve the latest processing status of a Malaysia e-invoice document using **Staple docId**. Staple uses the provided `docId` to return the latest document status and MyInvois information (if available). > **Note:** > The initial import/queue response only confirms that the document was accepted for processing. > Clients should call the status endpoint to get the final processing result. * * * ## Endpoint **GET** `/v2/einvoice/malaysia/status/{docId}` * * * ## Request Headers | Attribute | Type | Option | Description | | --- | --- | --- | --- | | x-api-key | String | Required | A unique string | | Authorization | String | Required | Bearer token | **Accept:** `application/json` * * * ## Path Parameter | Attribute | Type | Option | Description | | --- | --- | --- | --- | | docId | Number | Required | Staple document ID returned by the import endpoint | * * * ## Response Fields | Field | Type | Description | | --- | --- | --- | | docId | Number | Staple document ID | | docType | String | Document type, for example `invoice` | | docNumber | String | Invoice or document number | | status | String | Current document status | | validatedAt | String | null | | cancelDateTime | String | null | | documentStatusReason | String | null | | myInvois | Object | MyInvois identifiers and validation link | | errors | Array | null | * * * ## Status Values | status | Meaning | | --- | --- | | `Valid` | Successfully validated by MyInvois | | `Invalid` | Rejected or failed validation | | `Cancelled` | Cancelled on MyInvois | * * * ## `myInvois` Object | Field | Type | Description | | --- | --- | --- | | submissionId | String | null | | uuid | String | null | | longId | String | null | | validationLink | String | null | > **Important:** > When the document is invalid, the `myInvois` fields may be `null`. * * * ## `errors[]` Returned when the document is invalid. | Field | Type | Description | | --- | --- | --- | | code | String | Validation error code | | message | String | Human-readable error message | | field | String | Field associated with the validation error | * * * ## Response Examples ### Valid ```json { "docId": 242020, "docType": "invoice", "docNumber": "INV-2026-0001", "status": "Valid", "validatedAt": "2026-03-26T07:01:56Z", "cancelDateTime": null, "documentStatusReason": null, "myInvois": { "submissionId": "KBYDN7AFC3BFQFG4PY86FMMK10", "uuid": "KAQ2848KJ35CCAH3PY86FMMK10", "longId": "R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516", "validationLink": "https://preprod.myinvois.hasil.gov.my/KAQ2848KJ35CCAH3PY86FMMK10/share/R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516" }, "errors": null } ``` ### Invalid ```json { "docId": 242071, "docType": "invoice", "docNumber": "INV-2026-0001", "status": "Invalid", "validatedAt": null, "cancelDateTime": null, "documentStatusReason": "[einvoice-my] Submission rejected. INV-2026-000-test11 | 2 | Validation Error | CF321: DatetimeIssued: Issuance date time value of the document is too old that cannot be submitted.", "myInvois": { "submissionId": null, "uuid": null, "longId": null, "validationLink": null }, "errors": [ { "code": "CF321", "message": "Issuance date time value of the document is too old that cannot be submitted.", "field": "DatetimeIssued" } ] } ``` ### Cancelled ```json { "docId": 242020, "docType": "invoice", "docNumber": "INV-2026-0001", "status": "Cancelled", "validatedAt": "2026-03-26T07:01:56Z", "cancelDateTime": "2026-03-26T08:15:00Z", "documentStatusReason": null, "myInvois": { "submissionId": "KBYDN7AFC3BFQFG4PY86FMMK10", "uuid": "KAQ2848KJ35CCAH3PY86FMMK10", "longId": "R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516", "validationLink": "https://preprod.myinvois.hasil.gov.my/KAQ2848KJ35CCAH3PY86FMMK10/share/R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516" }, "errors": null } ``` * * * ## Notes - Use this endpoint to get the final processing result after import/queue. - `status` values are returned in the current API format, such as `Valid`, `Invalid`, and `Cancelled`. - For invalid documents, check both `documentStatusReason` and `errors[]` for troubleshooting.

Authentication

x-api-keystring
API key issued by Staple.
AuthorizationBearer
JWT obtained from the login endpoint.

Response

OK