API 1.0 – Set Document Status

This API is used to set a status for a document. A document id, which is required to fire this API, can be obtained by firing theGet Documents API. The status should be a valid status supported by the document. Supported statuses of a document can be obtained again from the “Get Document” API under the Possible Document Statuses field. Instead of Status, StatusCode also can be used. Either Status or StatusCode should be present in the request. The request and response format for the “Set Document Status” API are given below:

API Code

SET_DOC_STATUS

Request

<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Body>
        <SetDocumentStatus xmlns="http://ws.vg.pw.com/external/1.0">
            <DocumentId>RA000000014DMNL000017</DocumentId>
            <!-- Only use Status or StatusCode and not both. They have to match. -->
            <!-- <Status>Approved</Status> -->
            <StatusCode>20</StatusCode>
        </SetDocumentStatus>
    </SOAP:Body>
</SOAP:Envelope>

 

Response

<SOAP:Envelope  xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
    <SOAP:Header/>
    <SOAP:Body>
        <SetDocumentStatusResponse>
            <DocumentId>RA000000014DMNL000017</DocumentId>
        </SetDocumentStatusResponse>
    </SOAP:Body>
</SOAP:Envelope>

 

Request Parameters

The following table detail the request parameter used:

Parameters Description
DocumentId This parameter gives the id of the document on which the status has to be set.
Status This parameter gives the status that has to set on the document. This value has to be provided in the request if StatusCode is not provided.
Only use Status or StatusCode and not both. They have to match orherwise you get a error.
StatusCode This parameter gives the status code that has to set on the document. This value has to be provided in the request if Status is not provided.
For possible status values and code, see Configure Document Template Status. Take note of the possible values for Document Statuses.

 

Response Parameters

The following table detail the request parameter used:

Parameters Description
DocumentId This parameter gives the id of the document for which the status was set.