> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.staple.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.staple.ai/_mcp/server.

# Get Malaysia E-Invoice Status

GET https://api.staple.io/v2/einvoice/malaysia/status/243553

# 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.

Reference: https://docs.staple.ai/api-reference/v2/e-invoice/get-malaysia-e-invoice-status

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v2
  version: 1.0.0
paths:
  /v2/einvoice/malaysia/status/243553:
    get:
      operationId: getMalaysiaEInvoiceStatus
      summary: Get Malaysia E-Invoice Status
      description: >-
        # 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.
      tags:
        - eInvoice
      parameters:
        - name: x-api-key
          in: header
          description: API key issued by Staple.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/E-Invoice_getMalaysiaEInvoiceStatus_Response_200
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    E-Invoice_getMalaysiaEInvoiceStatus_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: E-Invoice_getMalaysiaEInvoiceStatus_Response_200
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key issued by Staple.
    bearerAuth:
      type: http
      scheme: bearer
      description: JWT obtained from the login endpoint.

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "cancelDateTime": null,
  "docId": 243553,
  "docNumber": "INV-2024-0457",
  "docType": "invoice",
  "documentStatusReason": null,
  "errors": null,
  "myInvois": {
    "longId": "MYLONGID20240615INV0457XYZ123",
    "submissionId": "MYSUB1234567890",
    "uuid": "MYUUID9876543210",
    "validationLink": "https://preprod.myinvois.hasil.gov.my/MYUUID9876543210/share/MYLONGID20240615INV0457XYZ123"
  },
  "status": "Valid",
  "validatedAt": "2024-06-15T09:30:00Z"
}
```

**SDK Code**

```python
import requests

url = "https://api.staple.io/v2/einvoice/malaysia/status/243553"

payload = {}
headers = {
    "x-api-key": "<apiKey>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.staple.io/v2/einvoice/malaysia/status/243553';
const options = {
  method: 'GET',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.staple.io/v2/einvoice/malaysia/status/243553"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("x-api-key", "<apiKey>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.staple.io/v2/einvoice/malaysia/status/243553")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.staple.io/v2/einvoice/malaysia/status/243553")
  .header("x-api-key", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.staple.io/v2/einvoice/malaysia/status/243553', [
  'body' => '{}',
  'headers' => [
    'Content-Type' => 'application/json',
    'x-api-key' => '<apiKey>',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.staple.io/v2/einvoice/malaysia/status/243553");
var request = new RestRequest(Method.GET);
request.AddHeader("x-api-key", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "x-api-key": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v2/einvoice/malaysia/status/243553")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```