listSeriesFromTaxAuthority
The listSeriesFromTaxAuthority method retrieves all e-document series currently available from a tax authority. It uses the subsidiary and e-document category to identify the correct tax authority and returns the associated series.
Input Parameters
Use these parameters to define the context in which to search for active series.
|
Parameter |
Type |
Description |
|---|---|---|
|
subsidiaryId |
String, Number |
Subsidiary internal ID. |
|
category |
String |
External ID of the e-document category. Accepted values:
|
Return Value
The method returns a list of matching e-document series.
|
Property |
Type |
Description |
|---|---|---|
|
success |
Boolean |
Indicates whether the request succeeded. |
|
message |
String |
Success or error message. |
|
seriesList |
Array |
List of series objects. |
Each object in seriesList contains:
|
Field |
Type |
Description |
|---|---|---|
|
id |
String, Number |
Internal ID of the series. |
|
series |
String |
Series number. |
|
currentEDocumentNumber |
Number |
Current e-document number in the series. |
|
isDefault |
Boolean |
Indicates whether this is the default series for the tax authority. |
Example
/**
* Lists the E-Document Series from a Tax Authority.
*
* @param {Object} context
* @returns {Object} result
*/
var listSeriesFromTaxAuthority = function (context) {
var ecsApi = loadEcsApi();
return ecsApi.listSeriesFromTaxAuthority(context, "");
};