SetExpirationDate API

Sets the expiration date of the specified document. When a document reaches its expiration date, infoRouter can optionally notify a designated user a configurable number of days before expiration. Expiration is informational metadata — it does not automatically archive or delete the document.

Endpoint

/srv.asmx/SetExpirationDate

Methods

Parameters

Parameter Type Required Description
authenticationTicket string Yes Authentication ticket obtained from AuthenticateUser.
documentPath string Yes Full infoRouter path to the document (e.g. /Finance/Reports/Q1-Report.pdf), or a short document ID path (~D{id}).
expirationDate DateTime Yes The expiration date to set (e.g. 2030-12-31). UTC values are automatically converted to server local time.
notificationAgentId int Yes The numeric user ID of the person to notify before expiration. Pass 0 to disable notifications. Use GetAllUsers to look up user IDs.
notifyBeforeDays int Yes Number of days before expiration to send the notification email. Pass 0 to disable notifications.

Response

Success Response

<response success="true" error="" />

Error Response

<response success="false" error="Document not found." />

Required Permissions

The calling user must have write (modify properties) permission on the document or its containing folder.


Example

GET Request

GET /srv.asmx/SetExpirationDate
  ?authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
  &documentPath=/Finance/Reports/Q1-2024-Report.pdf
  &expirationDate=2030-12-31
  &notificationAgentId=42
  &notifyBeforeDays=30
HTTP/1.1

POST Request

POST /srv.asmx/SetExpirationDate HTTP/1.1
Content-Type: application/x-www-form-urlencoded

authenticationTicket=3f2504e0-4f89-11d3-9a0c-0305e82c3301
&documentPath=/Finance/Reports/Q1-2024-Report.pdf
&expirationDate=2030-12-31
&notificationAgentId=42
&notifyBeforeDays=30

SOAP Request

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
               xmlns:tns="http://tempuri.org/">
  <soap:Body>
    <tns:SetExpirationDate>
      <tns:authenticationTicket>3f2504e0-4f89-11d3-9a0c-0305e82c3301</tns:authenticationTicket>
      <tns:documentPath>/Finance/Reports/Q1-2024-Report.pdf</tns:documentPath>
      <tns:expirationDate>2030-12-31</tns:expirationDate>
      <tns:notificationAgentId>42</tns:notificationAgentId>
      <tns:notifyBeforeDays>30</tns:notifyBeforeDays>
    </tns:SetExpirationDate>
  </soap:Body>
</soap:Envelope>

Notes



Error Codes

Error Description
[900] Authentication failed Invalid or missing authentication ticket.
[901] Session expired or Invalid ticket The ticket has expired or does not exist.
Document not found The specified path does not resolve to an existing document.
Access denied The user does not have write permission on the document.
SystemError:... An unexpected server-side error occurred.

For detailed documentation visit: https://support.inforouter.com/api-docs/SetExpirationDate