{"openapi":"3.1.0","info":{"title":"Malaysia MyInvois Invoice Builder API","version":"0.1.0","description":"Malaysia MyInvois Invoice Builder helps an owner's agent prepare and check e-invoice documents for the LHDN MyInvois system without credentials. build_einvoice_json turns plain supplier, buyer and line-item details into an unsigned Invoice v1.1 JSON draft in the SDK wire format (UBL 2.1 style), with line and document totals computed exactly in decimals. validate_einvoice checks a document against...\n\nEvery operation is read-only or compute-only. The same tools are available over MCP (streamable HTTP) at https://my-einvoice-builder.connectorbay.com/mcp.\n\nDisclaimer: General information only, not legal, tax, accounting or payment advice. Malaysia MyInvois Invoice Builder is an independent tool: it is not affiliated with, endorsed by or operated by any government body, central bank, standards body or scheme operator. Rates, thresholds and rules change; check the cited official source and confirm with a qualified professional before you rely on a result.","contact":{"name":"Unify Dynamics LLC","email":"agent@connectorbay.com","url":"https://connectorbay.com/my-einvoice-builder/docs"},"termsOfService":"https://connectorbay.com/my-einvoice-builder/terms"},"servers":[{"url":"https://my-einvoice-builder.connectorbay.com"}],"externalDocs":{"url":"https://connectorbay.com/my-einvoice-builder/docs"},"security":[{},{"bearer":[]}],"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Optional. A Pro API key raises rate limits; no credentials are required."}},"schemas":{"Error":{"type":"object","properties":{"ok":{"const":false},"error":{"type":"object"}}}}},"paths":{"/v1/tools/build_einvoice_json":{"post":{"operationId":"build_einvoice_json","summary":"Build an unsigned MyInvois Invoice v1.1 JSON draft from supplier, buyer and line items, with exact totals. Use for \"Turn","description":"Build an unsigned MyInvois Invoice v1.1 JSON draft from supplier, buyer and line items, with exact totals. Use for \"Turn these line items into a MyInvois invoice JSON draft with 10% sales tax\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"invoice_number":{"description":"Supplier's e-invoice number (the SDK e-Invoice Code / Number, up to 50 characters)","title":"Invoice Number","type":"string"},"issue_date":{"description":"Issue date, YYYY-MM-DD","title":"Issue Date","type":"string"},"issue_time":{"description":"Issue time in UTC as HH:MM:SSZ","title":"Issue Time","type":"string"},"supplier":{"additionalProperties":true,"description":"Supplier: name, tin, registration_number, registration_type (BRN, NRIC, PASSPORT or ARMY), msic_code (5 digits), business_activity, phone (E.164), address {line0, city, state_code, country}; optional email, sst_number, tourism_tax_number (default NA); optional text fields are limited to the SDK lengths (email 320, sst_number 35, tourism_tax_number 17, address line1 and line2 150, postal_zone 50): a longer value is refused, not cut","title":"Supplier","type":"object"},"buyer":{"additionalProperties":true,"description":"Buyer: name, tin, registration_number, registration_type, phone, address {line0, city, state_code, country}; optional email, sst_number (default NA); optional text fields are limited to the SDK lengths (email 320, sst_number 35, address line1 and line2 150, postal_zone 50): a longer value is refused, not cut","title":"Buyer","type":"object"},"lines":{"description":"Line items (1 to 100): description, classification (3-digit SDK code), quantity, unit_price, unit_code (UN/ECE Rec 20, default C62), tax_type (SDK code), tax_rate_percent, optional exemption_reason, discount_amount, charge_amount; amounts as decimal strings of at most 30 characters; exemption_reason at most 300 characters, refused when longer","items":{},"title":"Lines","type":"array"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"default":"MYR","description":"Invoice currency, 3 letters (default MYR)","title":"Currency"},"exchange_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Currency exchange rate to MYR when the currency is not MYR","title":"Exchange Rate"},"payment_mode":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"SDK payment mode code, 01 to 08","title":"Payment Mode"},"supplier_bank_account":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Supplier bank account number for payment (at most 150 characters; a longer text is refused, not cut)","title":"Supplier Bank Account"},"payment_terms":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Payment terms text (at most 300 characters; a longer text is refused, not cut)","title":"Payment Terms"}},"required":["invoice_number","issue_date","issue_time","supplier","buyer","lines"],"title":"build_einvoice_jsonArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/validate_einvoice":{"post":{"operationId":"validate_einvoice","summary":"Check a MyInvois Invoice v1.1 JSON document against the SDK field list, lengths and code tables, with arithmetic consist","description":"Check a MyInvois Invoice v1.1 JSON document against the SDK field list, lengths and code tables, with arithmetic consistency findings. Use for \"Check this MyInvois JSON invoice: are required fields, codes and totals right\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document":{"additionalProperties":true,"description":"The document in MyInvois JSON wire format: an object with an Invoice array, as in the SDK 1.1-Invoice-Sample.json","title":"Document","type":"object"}},"required":["document"],"title":"validate_einvoiceArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/lookup_code":{"post":{"operationId":"lookup_code","summary":"Look up an SDK code table (document type, payment mode, tax type, classification, state) by code or by words. Use for \"W","description":"Look up an SDK code table (document type, payment mode, tax type, classification, state) by code or by words. Use for \"What is the MyInvois payment mode code for an e-wallet\", \"Which MyInvois document type is a self-billed credit note\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"table":{"description":"einvoice_type, payment_mode, tax_type, classification, state; country, currency, unit and msic are named but not bundled","title":"Table","type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Exact code, for example 06 or E","title":"Code"},"query":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"Words to find in the description, case-insensitive","title":"Query"}},"required":["table"],"title":"lookup_codeArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/list_document_types":{"post":{"operationId":"list_document_types","summary":"The eight MyInvois e-invoice document type codes with the structure pages this connector has read. Use for \"Which MyInvo","description":"The eight MyInvois e-invoice document type codes with the structure pages this connector has read. Use for \"Which MyInvois document type is a self-billed credit note\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"list_document_typesArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/tin_format_check":{"post":{"operationId":"tin_format_check","summary":"Check the shape of a TIN and a registration number against the SDK field limits, with no registry lookup. Use for \"Is th","description":"Check the shape of a TIN and a registration number against the SDK field limits, with no registry lookup. Use for \"Is this TIN string shaped correctly for MyInvois, and is the registration number within its length limit\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"tin":{"description":"The TIN as printed (letters and digits; at most 50 characters, the SDK limit is 14); it is shown back only in the shape of a TIN","title":"Tin","type":"string"},"id_type":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"BRN, NRIC, PASSPORT or ARMY, to check the registration number length","title":"Id Type"},"id_value":{"anyOf":[{"type":"string"},{"type":"null"}],"default":null,"description":"The registration number matching id_type (at most 50 characters; only its length is returned)","title":"Id Value"}},"required":["tin"],"title":"tin_format_checkArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/validation_link_and_qr":{"post":{"operationId":"validation_link_and_qr","summary":"Build the validation link pattern the SDK FAQ gives for the printed QR code, for sandbox or production. Use for \"What UR","description":"Build the validation link pattern the SDK FAQ gives for the printed QR code, for sandbox or production. Use for \"What URL goes into the QR code for a validated document with this UUID and long ID\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{"document_uuid":{"description":"The document UUID returned by the API","title":"Document Uuid","type":"string"},"long_id":{"description":"The document long ID returned by the API","title":"Long Id","type":"string"},"environment":{"default":"production","description":"production or sandbox","title":"Environment","type":"string"}},"required":["document_uuid","long_id"],"title":"validation_link_and_qrArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}},"/v1/tools/explain_submission_flow":{"post":{"operationId":"explain_submission_flow","summary":"Hosts, login endpoints, token validity, rate limits, size limits and the intermediary route as the SDK states them. Use ","description":"Hosts, login endpoints, token validity, rate limits, size limits and the intermediary route as the SDK states them. Use for \"What are the MyInvois sandbox and production hosts, and how many invoices and bytes can one submission carry\".","tags":["tools"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"properties":{},"title":"explain_submission_flowArguments","type":"object"}}}},"responses":{"200":{"description":"Tool result. `ok: true` on success; `ok: false` with a structured `error` (provider_unavailable, upstream_error, bad_input) when the tool could not answer.","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"422":{"description":"Arguments failed validation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"x-read-only":true}}}}