versions

Get a version

Returns one version - 404 for any version GET /v2/versions would not list: a story's primary version, a version of a story that is not Live (draft, archived or deleted), or one in a folder the API key's creator cannot open. Returns everything a list row carries, plus data - the version's current variable values, in the same shape POST /v2/versions takes. To change a value without changing the link, send just the fields you want to change to POST /v2/versions/{versionId}; it merges them into these. The link password, if one is set, is never returned.

get/v2/versions/{versionId}

Request

  • Base URL
    https://api.storydoc.com
  • Auth
    HTTP bearer

Path parameters

versionIdstring required
Example:61b1f40a3a86b7a96d0d8ccc

The ID of the version

Query parameters

include'optionalContent'

optionalContent adds the version's own optional content (see OptionalEntity) - the ids POST /v2/versions/{versionId} accepts in data._optionalContent. It can differ from the story's: a version keeps the content it was made from. Reads the content file, so only ask when needed.

Response

The version

idstring

Version ID

titlestring nullable

Version title

status'Live' | 'Expired' | 'Draft' | 'Accepted'

Accepted: the reader accepted it. Draft: unpublished, the link is off. Expired: past its expiry date. Live: otherwise.

storyIdstring

The story (template) the version was created from

storyTitlestring nullable

The story's title; null for a standalone version

urlstring uri nullable

Public URL for the version; null when it is a Draft

shortUrlstring uri nullable

Shortened URL for the version

editorUrlstring uri

URL to edit the version in the Storydoc editor

versionUrlstring uri

URL to the version's details in the Storydoc platform

isPublicboolean

True when the version never expires

expireAtstring date-time nullable

When the link expires

hasAcceptButtonboolean

Whether the version has an Accept button - a proposal the reader can accept. Not accepted yet: true here with a status other than Accepted.

acceptedAtstring date-time nullable

When the reader accepted it; null unless Accepted

sourcestring nullable

How the version was created, e.g. Manual or API

createdAtstring date-time
updatedAtstring date-time
dataobject

The version's current variable values - the same object POST /v2/versions takes as data. _optionalContent holds its show/hide choices (false = hidden).

Example response

{
  "id": "61b1f40a3a86b7a96d0d8ccc",
  "title": "ACME - Proposal",
  "storyId": "61b1e50223b713000a41ca74",
  "storyTitle": "Proposal template",
  "folder": {
    "name": "Enterprise",
    "path": [
      "Sales",
      "Enterprise"
    ],
    "members": [
      {
        "name": "Dana Lee",
        "email": "dana@company.com"
      }
    ]
  },
  "sender": {
    "name": "Dana Lee",
    "email": "dana@company.com"
  },
  "shortUrl": "https://view.storydoc.com/4GdDGt",
  "data": {
    "title": "ACME - Proposal",
    "company": "ACME Corporation",
    "price": "15,000"
  },
  "optionalContent": [
    {
      "id": "Xk2pQ9rLm4Tz7aBcD1eF",
      "name": "Pricing",
      "type": "slide",
      "slideIndex": 4,
      "slideTitle": "Pricing",
      "rule": {
        "variable": "industry",
        "value": "Retail"
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.