externalSignDocument
The externalSignDocument method applies a digital signature to an e-document based on subsidiary, category, operation, and tax authority configuration. It signs the XML content that represents the e-document.
Input Parameters
Use these parameters to provide the XML content and the context for signing.
|
Parameter |
Type |
Description |
|---|---|---|
|
unsignedString |
String |
The XML content string generated from the e-document template. |
|
subsidiaryId |
String, Number |
Subsidiary ID of the transaction associated with the e-document. |
|
algorithm |
|
Optional. Algorithm for signing the e-document. By default, the system uses |
Return Value
The method returns the signed version of the XML content.
|
Property |
Type |
Description |
|---|---|---|
|
success |
Boolean |
If the request succeeds, returns true. If it fails, returns false. |
|
message |
String |
Success or error message. |
|
signedString |
String |
Digitally signed XML content. |
Example
/**
* This is the exposed API method for E-Document signing.
*
* @param {Object} context
* @returns {Object} signResult
*/
var externalSignDocument = function (context) {
var ecsApi = loadEcsApi();
return ecsApi.externalSignDocument(context, "");
};