> For the complete documentation index, see [llms.txt](https://amast-einvoice.gitbook.io/amast-einvoice-sass/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://amast-einvoice.gitbook.io/amast-einvoice-sass/request-schema.md).

# Request Schema

Request schema details for Submit Document API

## Recipient (non-consolidated)

<table><thead><tr><th width="238.22216796875">Field</th><th width="270.1112060546875">Required</th><th width="310.9998779296875">Notes</th></tr></thead><tbody><tr><td><code>name</code></td><td>Yes</td><td></td></tr><tr><td><code>addressLine1</code> </td><td>Yes</td><td></td></tr><tr><td><code>addressLine2</code> </td><td>Yes</td><td>'NA' if no line 2</td></tr><tr><td><code>postcode</code></td><td>Yes</td><td></td></tr><tr><td><code>state</code></td><td>Yes</td><td>State name or slug; mapped to LHDN subentity code (see <a href="/amast-einvoice-sass/appendix/malaysia-states-slug.md">Appendix</a>)</td></tr><tr><td><code>city</code></td><td>Yes</td><td></td></tr><tr><td><code>entity_type</code> </td><td>Yes</td><td><code>company</code> or <code>individual</code></td></tr><tr><td><code>tin</code></td><td>Yes</td><td>Buyer TIN</td></tr><tr><td><code>identification_no</code> </td><td>Yes if  <code>entity_type = 'individual'</code></td><td>NRIC for UBL <code>NRIC</code> scheme</td></tr><tr><td><code>brn</code></td><td>Yes if  <code>entity_type = 'company'</code></td><td>Required in API validation for all entity types</td></tr><tr><td><code>telephone</code></td><td>Yes</td><td>With country code i.e +60123456543</td></tr></tbody></table>

{% hint style="info" %}
Entity type is used to determine which TIN combination will be used for Non-Consolidated submission.\
\- For **company**,  it uses `tin` + `brn` combination. \
\- For **individual**, it uses `tin` + `identification_no` combination
{% endhint %}

## relatedInvoice (for Credit Note submission)

| Field         | Required | Notes                                                                                                                                    |
| ------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `referenceId` | Yes      | Parent unique business invoice number as registered with LHDN                                                                            |
| `lhdnUuid`    | Optional | <p>Omit only if its parent invoice was submitted via this Platform and is Valid;<br><br>else pass MyInvois UUID or <code>"NA"</code></p> |

## Duplicate keys in one batch

Same `documentType` + `referenceId` twice in one request resulted error HTTP → `400`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://amast-einvoice.gitbook.io/amast-einvoice-sass/request-schema.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
