> 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 Copy from Tax Authority

POST https://api.staple.io/v2/einvoice/malaysia/taxcopy
Content-Type: application/json

# Get Malaysia E-Invoice Tax Copy

Retrieve the tax authority copy for a Malaysia e-invoice document.

This endpoint returns the tax authority representation of the document, including:

-   document `uuid`
    
-   current `status`
    
-   raw tax authority payload
    
-   metadata
    
-   normalized summary
    

You can request the tax copy by sending:

-   `uuid` only, or
    
-   `uuid` together with `longId` (optional)
    

* * *

## Endpoint

**POST** `/v2/einvoice/malaysia/taxcopy`

* * *

## Request Headers

| Attribute | Type | Option | Description |
| --- | --- | --- | --- |
| x-api-key | String | Required | A unique string |
| Authorization | String | Required | Bearer token |

**Content-Type:** `application/json`  
**Accept:** `application/json`

* * *

## Request Payload

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| uuid | String | ✅ | MyInvois document UUID |
| longId | String | Optional | MyInvois long ID. Can be provided to help identify the validation/share record |

### Sample Payload

```json
{
  "uuid": "HRHMBPSMFWB43SRAH7DEWHMK10",
  "longId": "4GKW9K2K78WE1WZ1H7DEWHMK10svDqEC1774421751"
}

```

### Minimal Payload

```json
{
  "uuid": "HRHMBPSMFWB43SRAH7DEWHMK10"
}

```

* * *

## Response (Success)

```json
{
  "uuid": "KAQ2848KJ35CCAH3PY86FMMK10",
  "status": "valid",
  "taxAuthority": {
    "sourceFormat": "json",
    "raw": {
      "...": "raw tax authority payload"
    },
    "metadata": {
      "submissionId": "KBYDN7AFC3BFQFG4PY86FMMK10",
      "longId": "R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516",
      "validationLink": "https://preprod.myinvois.hasil.gov.my/KAQ2848KJ35CCAH3PY86FMMK10/share/R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516",
      "validatedAt": "2026-03-26T07:01:56Z",
      "documentType": "invoice",
      "currency": "MYR",
      "statusReason": null,
      "cancelDateTime": null,
      "rejectRequestDateTime": null
    },
    "summary": {
      "docNumber": "INV-2026-0001",
      "issueDate": "2026-03-24",
      "issueTime": "09:44:25Z",
      "currency": "MYR",
      "supplier": {
        "name": "Seller Sdn Bhd",
        "tin": "IG59605712010"
      },
      "buyer": {
        "name": "Buyer Sdn Bhd",
        "tin": "C59584904000"
      },
      "amounts": {
        "totalExclTax": 150,
        "taxTotal": 18,
        "totalInclTax": 168,
        "payableAmount": 168
      }
    }
  }
}

```

* * *

## Response Fields

### Top-level Fields

| Field | Type | Description |
| --- | --- | --- |
| uuid | String | MyInvois document UUID |
| status | String | Current status of the document |
| taxAuthority | Object | Tax authority copy, metadata, and normalized summary |

### `taxAuthority` Fields

| Field | Type | Description |
| --- | --- | --- |
| sourceFormat | String | Format of the tax authority source payload, e.g. `json` |
| raw | Object | Full raw payload returned/stored from tax authority |
| metadata | Object | Tax authority metadata and tracking information |
| summary | Object | Simplified normalized document summary |

### `taxAuthority.metadata` Fields

| Field | Type | Description |
| --- | --- | --- |
| submissionId | String | null |
| longId | String | null |
| validationLink | String | null |
| validatedAt | String | null |
| documentType | String | null |
| currency | String | null |
| statusReason | String | null |
| cancelDateTime | String | null |
| rejectRequestDateTime | String | null |

### `taxAuthority.summary` Fields

| Field | Type | Description |
| --- | --- | --- |
| docNumber | String | Document number |
| issueDate | String | Issue date |
| issueTime | String | Issue time |
| currency | String | Currency code |
| supplier | Object | Simplified supplier info |
| buyer | Object | Simplified buyer info |
| amounts | Object | Simplified total amounts |

* * *

## Notes

-   `uuid` is the main identifier for this endpoint.
    
-   `longId` is optional.
    
-   `taxAuthority.raw` contains the full authority-side payload and may be large.
    
-   `taxAuthority.summary` is the simplified view for easier API consumption.
    
-   `validationLink` may be present when the document has been validated.
    

* * *

## Errors

### 502 / 503 Upstream Unavailable

Returned when MyInvois or upstream dependency is temporarily unavailable.

Reference: https://docs.staple.ai/api-reference/v2/e-invoice/get-malaysia-e-invoice-copy-from-tax-authority

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: v2
  version: 1.0.0
paths:
  /v2/einvoice/malaysia/taxcopy:
    post:
      operationId: getMalaysiaEInvoiceCopyFromTaxAuthority
      summary: Get Malaysia E-Invoice Copy from Tax Authority
      description: >-
        # Get Malaysia E-Invoice Tax Copy


        Retrieve the tax authority copy for a Malaysia e-invoice document.


        This endpoint returns the tax authority representation of the document,
        including:


        -   document `uuid`
            
        -   current `status`
            
        -   raw tax authority payload
            
        -   metadata
            
        -   normalized summary
            

        You can request the tax copy by sending:


        -   `uuid` only, or
            
        -   `uuid` together with `longId` (optional)
            

        * * *


        ## Endpoint


        **POST** `/v2/einvoice/malaysia/taxcopy`


        * * *


        ## Request Headers


        | Attribute | Type | Option | Description |

        | --- | --- | --- | --- |

        | x-api-key | String | Required | A unique string |

        | Authorization | String | Required | Bearer token |


        **Content-Type:** `application/json`  

        **Accept:** `application/json`


        * * *


        ## Request Payload


        | Field | Type | Required | Description |

        | --- | --- | --- | --- |

        | uuid | String | ✅ | MyInvois document UUID |

        | longId | String | Optional | MyInvois long ID. Can be provided to help
        identify the validation/share record |


        ### Sample Payload


        ```json

        {
          "uuid": "HRHMBPSMFWB43SRAH7DEWHMK10",
          "longId": "4GKW9K2K78WE1WZ1H7DEWHMK10svDqEC1774421751"
        }


        ```


        ### Minimal Payload


        ```json

        {
          "uuid": "HRHMBPSMFWB43SRAH7DEWHMK10"
        }


        ```


        * * *


        ## Response (Success)


        ```json

        {
          "uuid": "KAQ2848KJ35CCAH3PY86FMMK10",
          "status": "valid",
          "taxAuthority": {
            "sourceFormat": "json",
            "raw": {
              "...": "raw tax authority payload"
            },
            "metadata": {
              "submissionId": "KBYDN7AFC3BFQFG4PY86FMMK10",
              "longId": "R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516",
              "validationLink": "https://preprod.myinvois.hasil.gov.my/KAQ2848KJ35CCAH3PY86FMMK10/share/R0KWNJ08TAD6Z6NPPY86FMMK10em8pIp1774508516",
              "validatedAt": "2026-03-26T07:01:56Z",
              "documentType": "invoice",
              "currency": "MYR",
              "statusReason": null,
              "cancelDateTime": null,
              "rejectRequestDateTime": null
            },
            "summary": {
              "docNumber": "INV-2026-0001",
              "issueDate": "2026-03-24",
              "issueTime": "09:44:25Z",
              "currency": "MYR",
              "supplier": {
                "name": "Seller Sdn Bhd",
                "tin": "IG59605712010"
              },
              "buyer": {
                "name": "Buyer Sdn Bhd",
                "tin": "C59584904000"
              },
              "amounts": {
                "totalExclTax": 150,
                "taxTotal": 18,
                "totalInclTax": 168,
                "payableAmount": 168
              }
            }
          }
        }


        ```


        * * *


        ## Response Fields


        ### Top-level Fields


        | Field | Type | Description |

        | --- | --- | --- |

        | uuid | String | MyInvois document UUID |

        | status | String | Current status of the document |

        | taxAuthority | Object | Tax authority copy, metadata, and normalized
        summary |


        ### `taxAuthority` Fields


        | Field | Type | Description |

        | --- | --- | --- |

        | sourceFormat | String | Format of the tax authority source payload,
        e.g. `json` |

        | raw | Object | Full raw payload returned/stored from tax authority |

        | metadata | Object | Tax authority metadata and tracking information |

        | summary | Object | Simplified normalized document summary |


        ### `taxAuthority.metadata` Fields


        | Field | Type | Description |

        | --- | --- | --- |

        | submissionId | String | null |

        | longId | String | null |

        | validationLink | String | null |

        | validatedAt | String | null |

        | documentType | String | null |

        | currency | String | null |

        | statusReason | String | null |

        | cancelDateTime | String | null |

        | rejectRequestDateTime | String | null |


        ### `taxAuthority.summary` Fields


        | Field | Type | Description |

        | --- | --- | --- |

        | docNumber | String | Document number |

        | issueDate | String | Issue date |

        | issueTime | String | Issue time |

        | currency | String | Currency code |

        | supplier | Object | Simplified supplier info |

        | buyer | Object | Simplified buyer info |

        | amounts | Object | Simplified total amounts |


        * * *


        ## Notes


        -   `uuid` is the main identifier for this endpoint.
            
        -   `longId` is optional.
            
        -   `taxAuthority.raw` contains the full authority-side payload and may
        be large.
            
        -   `taxAuthority.summary` is the simplified view for easier API
        consumption.
            
        -   `validationLink` may be present when the document has been
        validated.
            

        * * *


        ## Errors


        ### 502 / 503 Upstream Unavailable


        Returned when MyInvois or upstream dependency is temporarily
        unavailable.
      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_getMalaysiaEInvoiceCopyFromTaxAuthority_Response_200
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                uuid:
                  type: string
servers:
  - url: https://api.staple.io
    description: https://api.staple.io
components:
  schemas:
    E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_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
{
  "uuid": "KS16MRDNC602CN4APRDJ4ZRK10"
}
```

**Response**

```json
{}
```

**SDK Code**

```python E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_example
import requests

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

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

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

print(response.json())
```

```javascript E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_example
const url = 'https://api.staple.io/v2/einvoice/malaysia/taxcopy';
const options = {
  method: 'POST',
  headers: {'x-api-key': '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"uuid":"KS16MRDNC602CN4APRDJ4ZRK10"}'
};

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

```go E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_example
package main

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

func main() {

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

	payload := strings.NewReader("{\n  \"uuid\": \"KS16MRDNC602CN4APRDJ4ZRK10\"\n}")

	req, _ := http.NewRequest("POST", 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 E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_example
require 'uri'
require 'net/http'

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

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

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

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

```java E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

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

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

$client = new \GuzzleHttp\Client();

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

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

```csharp E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_example
using RestSharp;

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

```swift E-Invoice_getMalaysiaEInvoiceCopyFromTaxAuthority_example
import Foundation

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

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.staple.io/v2/einvoice/malaysia/taxcopy")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
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()
```