checkItemStatus

The checkItemStatus method returns the latest status of a certification request. You use it to check whether the request remains pending, is currently processing, failed, completed, or is retrying.

Input Parameters

Use these parameters to identify the record whose certification status you want to retrieve.

Parameter

Type

Description

recordId

String, Number

Internal ID of the record.

recordType

String

Type of the record.

Return Value

The method returns the certification status and related metadata.

Property

Type

Description

success

Boolean

Indicates whether the request was successful.

message

String

Success or error message.

eDocumentCertificationRequest

Object

Contains certification metadata.

Subfields of eDocumentCertificationRequest:

Subfield

Type

Description

status

String

Shows the current status of the e-document certification request:

  • 1 – Pending

  • 2 – Processing

  • 3 – Completed

  • 4 – Failed

  • 5 – Retrying

errorMessage

String

If the status is Failed, this subfield is returned.

documentSeries

String

Series used for the e-document.

transitoryDocumentNumber

String

Temporary number used before certification.

protocol

String

Protocol number returned by the tax authority.

certifiedDocumentNumber

String

Number assigned by the tax authority to the certified e-document.

documentAccessKey

String

Access key of the certified e-document.

certificationDate

String

Timestamp of when the certification was completed.

certificationReturnFileId

Number

ID of the file returned during certification.

additionalInformation

Object

Additional data returned by the tax authority or plug-in.

Example

            /**
 * This is the exposed API method for checking the message queue status.
 *
 * @param {Object} context
 * @returns {Object} result
 */
var checkItemStatus = function (context) {
    var ecsApi = loadEcsApi();
    return ecsApi.checkItemStatus(context, "");
}; 

          

General Notices