externalSendDocument
The externalSendDocument
method sends the signed e-document to the message queue for transmission to the tax authority. It uses categoryExternalId
and subsidiaryId
to identify the appropriate plug-in for submission.
Input Parameters
Use these parameters to provide the signed XML content and the record context associated with the certification request.
Parameter |
Type |
Description |
---|---|---|
categoryExternalId |
String |
External ID of the e-document category. Accepted values:
|
eiContent |
String |
Signed XML content to be sent to the tax authority. |
recordId |
String |
Internal ID of the record that originated the e-document. |
recordType |
String |
Type of the record that originated the e-document. |
subsidiaryId |
String |
Internal ID of the subsidiary. |
eiTemplateId |
String |
Internal ID of the e-document template. |
eiTemplateName |
String |
Name of the e-document template. |
Return Value
The method returns an object indicating whether the request was sent successfully.
Property |
Type |
Description |
---|---|---|
success |
Boolean |
If the request succeeds, returns true. If it fails, returns false. |
message |
String |
Success or error message. |
Example
/**
* This is the exposed API method for send E-document.
*
* @param {Object} context
* @returns {Object} result
*/
var externalSendDocument = function (context) {
var ecsApi = loadEcsApi();
return ecsApi.externalSendDocument(context, "");
};