Adding document's expiration date

PandaDoc API and Webhooks now return information about document's expiration date.

Please, take a note that the expiration date may be null as this property only makes sense for documents in Sent, Viewed, Waiting for Payment, and Paid statuses.

List of endpoints that return expiration date:

  1. Create document. The expiration date will always be null here as there is no expiration date for documents in Uploaded and Draft.
  2. Document status.
  3. Document details.
  4. Send document.

API example:

{
    "id": "dvEnR6iJ8pVSEssbQoEshT",
    "name": "API Sample Document from PandaDoc Template",
    "status": "document.waiting_approval",
    "date_created": "2018-06-18T12:07:17.721482Z",
    "date_modified": "2018-06-18T12:07:46.108405Z",
    "expiration_date": null,
    "uuid": "dvEnR6iJ8pVSEssbQoEshT"
}

Webhook example:

{
    "data": {
        ...
        "date_created": "2018-06-18T12:06:54.389089Z",
        "date_modified": "2018-06-18T12:31:24.920614Z",
        "expiration_date": "2018-08-17T12:31:24.833779Z",
        ...
    },
    "event": "document_state_changed"
}