{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/api/catalog/activities/duration-and-validity/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#duration-and-validity\" aria-label=\"duration and validity permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"duration-and-validity\"></div>Duration and validity</h1>\n<p>Both the <code class=\"language-text\">/activities</code> endpoint and <code class=\"language-text\">/activities/{activityUuid}</code> endpoints include the length of an activity. There are multiple properties which can describe how long an activity <em>lasts</em>. Depending on the activity you will choose between its <em>duration</em> or <em>validity</em>.</p>\n<h2 style=\"position:relative;\"><a href=\"#format\" aria-label=\"format permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"format\"></div>Format</h2>\n<p>Values for both duration and validity are presented in the <a href=\"https://en.wikipedia.org/wiki/ISO_8601\">ISO 8601</a> standard. The example below represents a length of \"1 day and 12 hours\":</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"71295291905228610000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`P1DT12H`, `71295291905228610000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-71295291905228610000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">P1DT12H</code></pre></div>\n      </div>\n<p>Some activity providers are very precise about the units used for describing an activity's length. Please avoid converting time periods to a different unit. For example, a value of <code class=\"language-text\">PT24H</code> should be displayed as \"24 hours\" and not \"1 day\".</p>\n<h2 style=\"position:relative;\"><a href=\"#duration\" aria-label=\"duration permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"duration\"></div>Duration</h2>\n<p>Duration is more appropriate for tours and other activities that follow a schedule, usually with a specific start and end. When duration is set for an activity, you will see the <code class=\"language-text\">duration_range</code> property.</p>\n<p>Duration may be a single period of time. In the example response below we can say the activity <em>lasts 2 hours</em>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"23684919474052490000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n\t[...]\n\t&quot;duration_range&quot;: {\n\t\t&quot;min&quot;: &quot;PT2H&quot;,\n\t\t&quot;max&quot;: &quot;PT2H&quot;\n\t},\n\t[...]\n}`, `23684919474052490000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-23684919474052490000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n\t<span class=\"token property\">\"duration_range\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n\t\t<span class=\"token property\">\"min\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"PT2H\"</span><span class=\"token punctuation\">,</span>\n\t\t<span class=\"token property\">\"max\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"PT2H\"</span>\n\t<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>Duration can also be a time range. In the example response below, the activity lasts <em>1-2 hours</em>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"18903478712834530000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n\t[...]\n\t&quot;duration_range&quot;: {\n\t\t&quot;min&quot;: &quot;PT1H&quot;,\n\t\t&quot;max&quot;: &quot;PT2H&quot;\n\t},\n\t[...]\n}`, `18903478712834530000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-18903478712834530000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n\t<span class=\"token property\">\"duration_range\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n\t\t<span class=\"token property\">\"min\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"PT1H\"</span><span class=\"token punctuation\">,</span>\n\t\t<span class=\"token property\">\"max\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"PT2H\"</span>\n\t<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>The <code class=\"language-text\">min</code> and <code class=\"language-text\">max</code> properties for <code class=\"language-text\">duration_range</code> correspond to the duration's lower and upper bounds respectively. Both properties are optional and it's possible to find activities with only one of these properties.</p>\n<p>In the example response below, the activity does not have a minimum duration. We can say that it lasts <em>up to 8 hours</em>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"50218672132537340000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n\t[...]\n\t&quot;duration_range&quot;: {\n\t\t&quot;max&quot;: &quot;PT8H&quot;\n\t},\n\t[...]\n}`, `50218672132537340000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-50218672132537340000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n\t<span class=\"token property\">\"duration_range\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n\t\t<span class=\"token property\">\"max\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"PT8H\"</span>\n\t<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>Alternatively, in the example response below, the activity does not have a maximum duration. We can say that it lasts <em>at least 2 hours</em>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"84991436147628650000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n\t[...]\n\t&quot;duration_range&quot;: {\n\t\t&quot;min&quot;: &quot;PT2H&quot;\n\t},\n\t[...]\n}`, `84991436147628650000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-84991436147628650000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n\t<span class=\"token property\">\"duration_range\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n\t\t<span class=\"token property\">\"min\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"PT2H\"</span>\n\t<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>Sometimes an activity's duration is dependant on other factors, such as weather or the option booked at checkout, and cannot be well-defined. When either <code class=\"language-text\">max</code> or <code class=\"language-text\">min</code> has a value of <code class=\"language-text\">P0D</code>, we say the duration is <em>flexible</em>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"11148026845586379000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n\t[...]\n\t&quot;duration_range&quot;: {\n\t\t&quot;max&quot;: &quot;P0D&quot;\n\t},\n\t[...]\n}`, `11148026845586379000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-11148026845586379000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n\t<span class=\"token property\">\"duration_range\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n\t\t<span class=\"token property\">\"max\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"P0D\"</span>\n\t<span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>When the <code class=\"language-text\">duration_range</code> property is absent, use the <code class=\"language-text\">validity</code> property to describe an activity's length instead.</p>\n<h2 style=\"position:relative;\"><a href=\"#validity\" aria-label=\"validity permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a><div class=\"hidden-anchor\" id=\"validity\"></div>Validity</h2>\n<p>Validity is more appropriate for activities without a planned schedule, such as a city pass or museum entrance.</p>\n<p>The <code class=\"language-text\">validity</code> property represents the maximum period of time the activity is valid for a customer once they start.</p>\n<p>In the example response below, the activity is valid for 24 hours:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"82853246526942530000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n\t[...]\n\t&quot;validity&quot;: &quot;PT24H&quot;,\n\t[...]\n}`, `82853246526942530000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-82853246526942530000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"json\"><pre class=\"language-json\"><code class=\"language-json\"><span class=\"token punctuation\">{</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n\t<span class=\"token property\">\"validity\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"PT24H\"</span><span class=\"token punctuation\">,</span>\n\t<span class=\"token punctuation\">[</span>...<span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>When the <code class=\"language-text\">validity</code> property contains a value of <code class=\"language-text\">P0D</code>, the activity does not have a well-defined length of time. On <a href=\"https://www.musement.com\">musement.com</a>, we define the length for these activities as \"flexible\".</p>","headings":[{"value":"Duration and validity","depth":1},{"value":"Format","depth":2},{"value":"Duration","depth":2},{"value":"Validity","depth":2}]},"contentItem":{"data":{"lastModified":"2025-12-18T16:31:42.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":false,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"3fb01d31-3c1d-55b0-b586-db92fc661a15__redocly content/api/catalog/activities/duration-and-validity/","seo":{"title":"Duration and validity","description":"The length of a customer's experience depends on an activity's duration or validity in the Musement API.","image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"api/catalog/activities/duration-and-validity.md","pageBaseUrl":"/api/catalog/activities/duration-and-validity","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Duration and validity","id":"duration-and-validity"},{"depth":2,"value":"Format","id":"format"},{"depth":2,"value":"Duration","id":"duration"},{"depth":2,"value":"Validity","id":"validity"}]},"data":{"title":"","redirectFrom":["/guide/activities/duration-and-validity/","/api/partner/catalog/activities/duration-and-validity/"],"seo":{"description":"The length of a customer's experience depends on an activity's duration or validity in the Musement API."}},"catalogInfo":null,"link":"/api/catalog/activities/duration-and-validity/","sidebarName":"__alternative-sidebar__-data-24763-api-sidebars.yaml","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}