{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/docs/ai/document-ai/runs-and-reprocessing/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#runs-and-reprocessing\" aria-label=\"runs and reprocessing 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=\"runs-and-reprocessing\"></div>Runs and Reprocessing</h1>\n<p>Create a processing run during upload or apply a new configuration to a document that is already stored.</p>\n<h2 style=\"position:relative;\"><a href=\"#start-processing-during-upload\" aria-label=\"start processing during upload 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=\"start-processing-during-upload\"></div>Start processing during upload</h2>\n<p>Provide either:</p>\n<ul>\n<li>\n<code class=\"language-text\">processing_config_id</code>\n for a saved configuration\n</li>\n<li>\n<code class=\"language-text\">pipeline_config</code>\n for one-time custom settings\n</li>\n</ul>\n<p>The accepted document includes <code class=\"language-text\">latest_run</code> with the new run identifier and initial <code class=\"language-text\">pending</code> status.</p>\n<p>Omit both fields when the file should be stored without processing. See <a href=\"/docs/ai/document-ai/uploading-documents/\">Uploading Documents</a> for multipart, base64, and direct upload examples.</p>\n<h2 style=\"position:relative;\"><a href=\"#process-existing-documents-in-shipwell\" aria-label=\"process existing documents in shipwell 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=\"process-existing-documents-in-shipwell\"></div>Process existing documents in Shipwell</h2>\n<ol>\n<li>\nOpen \n<strong>Document AI</strong>\n.\n</li>\n<li>\nSelect one or more stored documents.\n</li>\n<li>\nChoose the processing action.\n</li>\n<li>\nSelect an enabled named configuration or custom processing settings.\n</li>\n<li>\nConfirm the request.\n</li>\n</ol>\n<!-- SCREENSHOT PLACEHOLDER\nFile: images/reprocess-document-selection.png\nCapture: Document list with synthetic documents selected and the processing action visible.\nAlt: Selecting existing documents for processing\n-->\n<!-- SCREENSHOT PLACEHOLDER\nFile: images/reprocess-settings.png\nCapture: Processing settings for existing documents with a platform-managed configuration selected.\nAlt: Selecting settings for a new processing run\n-->\n<h2 style=\"position:relative;\"><a href=\"#process-existing-documents-through-the-api\" aria-label=\"process existing documents through the api 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=\"process-existing-documents-through-the-api\"></div>Process existing documents through the API</h2>\n<p>Create one new run for each accepted document:</p>\n\n      <div class=\"code-snippets-tabs\" >\n    <div class=\"snippets-tabs-headers\">\n      <span class=\"tab-header active\" data-lang=\"curl\" data-snippet-id=\"curl\">curl</span><span class=\"tab-header \" data-lang=\"python\" data-snippet-id=\"python\">python</span>\n    </div>\n    <div class=\"snippets-tabs-contents\">\n      <div class=\"tab-content active\" data-lang=\"curl\" data-snippet-id=\"curl\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"45136483792004700000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`curl -X POST &quot;https://sandbox-api.shipwell.com/document-store/runs&quot; \\\\\n  -H &quot;Authorization: Token <user-token>&quot; \\\\\n  -H &quot;Content-Type: application/json&quot; \\\\\n  -d '{\n    &quot;document_ids&quot;: [\n      &quot;<document-id-1>&quot;,\n      &quot;<document-id-2>&quot;\n    ],\n    &quot;processing_config_id&quot;: &quot;<processing-config-id>&quot;\n  }'`, `45136483792004700000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-45136483792004700000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"curl\"><pre class=\"language-curl\"><code class=\"language-curl\">curl -X POST &quot;https://sandbox-api.shipwell.com/document-store/runs&quot; \\\n  -H &quot;Authorization: Token &lt;user-token&gt;&quot; \\\n  -H &quot;Content-Type: application/json&quot; \\\n  -d &#39;{\n    &quot;document_ids&quot;: [\n      &quot;&lt;document-id-1&gt;&quot;,\n      &quot;&lt;document-id-2&gt;&quot;\n    ],\n    &quot;processing_config_id&quot;: &quot;&lt;processing-config-id&gt;&quot;\n  }&#39;</code></pre></div>\n      </div></div><div class=\"tab-content \" data-lang=\"python\" data-snippet-id=\"python\"><div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"60724230777578955000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`import requests\n\nresponse = requests.post(\n    &quot;https://sandbox-api.shipwell.com/document-store/runs&quot;,\n    headers={&quot;Authorization&quot;: &quot;Token <user-token>&quot;},\n    json={\n        &quot;document_ids&quot;: [&quot;<document-id-1>&quot;, &quot;<document-id-2>&quot;],\n        &quot;processing_config_id&quot;: &quot;<processing-config-id>&quot;,\n    },\n    timeout=30,\n)\nresponse.raise_for_status()\nresult = response.json()`, `60724230777578955000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-60724230777578955000\">Copied</div>\n        </div>\n        <div class=\"gatsby-highlight\" data-language=\"python\"><pre class=\"language-python\"><code class=\"language-python\"><span class=\"token keyword\">import</span> requests\n\nresponse <span class=\"token operator\">=</span> requests<span class=\"token punctuation\">.</span>post<span class=\"token punctuation\">(</span>\n    <span class=\"token string\">\"https://sandbox-api.shipwell.com/document-store/runs\"</span><span class=\"token punctuation\">,</span>\n    headers<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span><span class=\"token string\">\"Authorization\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"Token &lt;user-token>\"</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    json<span class=\"token operator\">=</span><span class=\"token punctuation\">{</span>\n        <span class=\"token string\">\"document_ids\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"&lt;document-id-1>\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"&lt;document-id-2>\"</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n        <span class=\"token string\">\"processing_config_id\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"&lt;processing-config-id>\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    timeout<span class=\"token operator\">=</span><span class=\"token number\">30</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">)</span>\nresponse<span class=\"token punctuation\">.</span>raise_for_status<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span>\nresult <span class=\"token operator\">=</span> response<span class=\"token punctuation\">.</span>json<span class=\"token punctuation\">(</span><span class=\"token punctuation\">)</span></code></pre></div>\n      </div></div>\n    </div></div>\n    \n<p>Exactly one of <code class=\"language-text\">processing_config_id</code> or <code class=\"language-text\">pipeline_config</code> is required. Document identifiers must be unique within the request.</p>\n<p>The endpoint returns <code class=\"language-text\">202 Accepted</code>:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"78711487421371470000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n  &quot;runs&quot;: [\n    {\n      &quot;document_id&quot;: &quot;<document-id-1>&quot;,\n      &quot;id&quot;: &quot;<run-id>&quot;\n    }\n  ],\n  &quot;skipped&quot;: [\n    {\n      &quot;document_id&quot;: &quot;<document-id-2>&quot;,\n      &quot;decision&quot;: &quot;skipped&quot;,\n      &quot;reason&quot;: &quot;<eligibility-reason>&quot;\n    }\n  ]\n}`, `78711487421371470000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-78711487421371470000\">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  <span class=\"token property\">\"runs\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n    <span class=\"token punctuation\">{</span>\n      <span class=\"token property\">\"document_id\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"&lt;document-id-1>\"</span><span class=\"token punctuation\">,</span>\n      <span class=\"token property\">\"id\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"&lt;run-id>\"</span>\n    <span class=\"token punctuation\">}</span>\n  <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"skipped\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span>\n    <span class=\"token punctuation\">{</span>\n      <span class=\"token property\">\"document_id\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"&lt;document-id-2>\"</span><span class=\"token punctuation\">,</span>\n      <span class=\"token property\">\"decision\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"skipped\"</span><span class=\"token punctuation\">,</span>\n      <span class=\"token property\">\"reason\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"&lt;eligibility-reason>\"</span>\n    <span class=\"token punctuation\">}</span>\n  <span class=\"token punctuation\">]</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>Keep every returned run <code class=\"language-text\">id</code> for monitoring. A skipped document does not receive a run.</p>\n<h2 style=\"position:relative;\"><a href=\"#view-run-history\" aria-label=\"view run history 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=\"view-run-history\"></div>View run history</h2>\n<p>Use <code class=\"language-text\">GET /document-store/documents/{id}/runs</code> to retrieve a document's runs, newest first.</p>\n<p>Use run history to:</p>\n<ul>\n<li>\nCompare results after a configuration change\n</li>\n<li>\nAudit the configuration snapshot used for an attempt\n</li>\n<li>\nDiagnose a failed attempt without losing a prior successful result\n</li>\n<li>\nRetrieve results for a specific historical run\n</li>\n</ul>\n<!-- SCREENSHOT PLACEHOLDER\nFile: images/document-run-history.png\nCapture: A synthetic document's run history showing at least two runs and their statuses.\nAlt: Document processing run history\n-->\n<h2 style=\"position:relative;\"><a href=\"#reprocessing-behavior\" aria-label=\"reprocessing behavior 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=\"reprocessing-behavior\"></div>Reprocessing behavior</h2>\n<p>Reprocessing creates a new run; it does not replace prior runs.</p>\n<p>If the new run completes:</p>\n<ul>\n<li>\nThe document's latest results point to the new output.\n</li>\n<li>\nAuto-description can replace the document's current description.\n</li>\n<li>\nPrevious runs and results remain available through run history.\n</li>\n</ul>\n<p>Store the relevant <code class=\"language-text\">run_id</code> when your integration requires historical reproducibility.</p>\n<h2 style=\"position:relative;\"><a href=\"#when-to-reprocess\" aria-label=\"when to reprocess 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=\"when-to-reprocess\"></div>When to reprocess</h2>\n<p>Create a new run when:</p>\n<ul>\n<li>\nYou changed an extraction schema.\n</li>\n<li>\nYou need to apply a different platform-managed configuration.\n</li>\n<li>\nA previous run failed because of a corrected input or configuration.\n</li>\n<li>\nYou enabled splitting, descriptions, or semantic search for an existing document.\n</li>\n</ul>\n<p>Do not create duplicate runs only because an accepted run is still <code class=\"language-text\">pending</code> or <code class=\"language-text\">processing</code>. Monitor it using <a href=\"/docs/ai/document-ai/processing-documents/\">How Processing Works</a>.</p>","headings":[{"value":"Runs and Reprocessing","depth":1},{"value":"Start processing during upload","depth":2},{"value":"Process existing documents in Shipwell","depth":2},{"value":"Process existing documents through the API","depth":2},{"value":"View run history","depth":2},{"value":"Reprocessing behavior","depth":2},{"value":"When to reprocess","depth":2}]},"contentItem":{"data":{"lastModified":"2026-07-17T16:00:10.000Z","enableToc":null,"disableLastModified":null,"tocMaxDepth":null,"requestLogin":false}},"siteConfig":{"enableToc":true,"disableLastModified":false,"tocMaxDepth":4}},"pageContext":{"matchPath":"","id":"7b106edb-09b0-5dde-8681-248ceb2a7c05__redocly content/docs/ai/document-ai/runs-and-reprocessing/","seo":{"title":"Runs and Reprocessing","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"docs/ai/document-ai/runs-and-reprocessing.md","pageBaseUrl":"/docs/ai/document-ai/runs-and-reprocessing","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Runs and Reprocessing","id":"runs-and-reprocessing"},{"depth":2,"value":"Start processing during upload","id":"start-processing-during-upload"},{"depth":2,"value":"Process existing documents in Shipwell","id":"process-existing-documents-in-shipwell"},{"depth":2,"value":"Process existing documents through the API","id":"process-existing-documents-through-the-api"},{"depth":2,"value":"View run history","id":"view-run-history"},{"depth":2,"value":"Reprocessing behavior","id":"reprocessing-behavior"},{"depth":2,"value":"When to reprocess","id":"when-to-reprocess"}]},"data":{"title":"Runs and Reprocessing"},"catalogInfo":null,"link":"/docs/ai/document-ai/runs-and-reprocessing/","sidebarName":"developerPortal","isLanding":false,"showPrevButton":null,"showNextButton":null,"apiVersions":null,"apiVersionId":null,"isDefaultApiVersion":null}},"staticQueryHashes":["1123603147","1302185487","1344209882","1398840060","1520077861","1975142765","2667623876","2950305614","3240152602","3743992808","561138138"]}