{"componentChunkName":"component---src-templates-simple-markdown-js","path":"/docs/ai/document-ai/custom-configurations/","matchPath":"","result":{"data":{"markdownRemark":{"html":"<h1 style=\"position:relative;\"><a href=\"#custom-configurations\" aria-label=\"custom configurations 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=\"custom-configurations\"></div>Custom Configurations</h1>\n<p>Create a custom processing configuration when your company needs a repeatable extraction or enrichment workflow.</p>\n<h2 style=\"position:relative;\"><a href=\"#create-a-configuration-in-shipwell\" aria-label=\"create a configuration 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=\"create-a-configuration-in-shipwell\"></div>Create a configuration in Shipwell</h2>\n<ol>\n<li>\nOpen \n<strong>Document AI</strong>\n.\n</li>\n<li>\nSelect \n<strong>Configuration</strong>\n.\n</li>\n<li>\nOpen \n<strong>Processing Configuration</strong>\n.\n</li>\n<li>\nSelect \n<strong>New Processing Config</strong>\n.\n</li>\n<li>\nEnter a unique name and a description that tells users when to select it.\n</li>\n<li>\nLeave \n<strong>Enabled</strong>\n selected if the configuration should immediately appear in upload and processing workflows.\n</li>\n<li>\nSelect \n<strong>Create</strong>\n.\n</li>\n</ol>\n<p><img src=\"/a102f286f0fc654996133f8cbe283ae1/create-processing-config.png\" alt=\"Creating a custom processing configuration\"></p>\n<p>After creation, configure document enrichment, document structure, and extraction schemas.</p>\n<h2 style=\"position:relative;\"><a href=\"#configure-document-enrichment\" aria-label=\"configure document enrichment 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=\"configure-document-enrichment\"></div>Configure document enrichment</h2>\n<h3 style=\"position:relative;\"><a href=\"#generate-per-page-embeddings\" aria-label=\"generate per page embeddings 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=\"generate-per-page-embeddings\"></div>Generate per-page embeddings</h3>\n<p>Enable embeddings when users or integrations should be able to find processed documents by meaning. A document must have embeddings to appear in semantic search results.</p>\n<h3 style=\"position:relative;\"><a href=\"#enable-auto-description\" aria-label=\"enable auto description 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=\"enable-auto-description\"></div>Enable auto-description</h3>\n<p>Enable auto-description to generate a concise natural-language description after a successful run.</p>\n<p>You can also:</p>\n<ul>\n<li>\nInclude key facts such as important dates, totals, and parties\n</li>\n<li>\nAdd an optional prompt to tailor the description\n</li>\n</ul>\n<p>The generated description becomes the document's current description after a successful run.</p>\n<p><img src=\"/1c2e877ce676d05efae17ed8aacc6c0a/config-document-enrichment.png\" alt=\"Document enrichment settings\"></p>\n<h2 style=\"position:relative;\"><a href=\"#configure-document-structure\" aria-label=\"configure document structure 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=\"configure-document-structure\"></div>Configure document structure</h2>\n<p>Enable <strong>Split into per-document slices</strong> when a single PDF may contain multiple logical documents, such as an invoice followed by a proof of delivery.</p>\n<p>Splitting applies to eligible PDFs. Each detected logical document is returned as a separate result while remaining associated with the uploaded parent document.</p>\n<h2 style=\"position:relative;\"><a href=\"#add-extraction-schemas\" aria-label=\"add extraction schemas 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=\"add-extraction-schemas\"></div>Add extraction schemas</h2>\n<p>An extraction schema tells Document AI what value to find and what JSON shape to return.</p>\n<p>For each schema:</p>\n<ol>\n<li>\nEnter a stable, machine-readable name.\n</li>\n<li>\nWrite a focused extraction prompt.\n</li>\n<li>\nDefine the expected value with JSON Schema.\n</li>\n<li>\nChoose whether extraction applies to each segment or the whole document.\n</li>\n<li>\nChoose whether to return one result or multiple results.\n</li>\n<li>\nEnable source regions if users need to locate the value on a PDF or image.\n</li>\n</ol>\n<p><img src=\"/5cbea12a97c488848f877b05f3d7dfd7/config-schema-builder.png\" alt=\"Building an extraction schema\"></p>\n<p>For example:</p>\n<div class=\"code-wrapper\">\n        <div class=\"gatsby-code-button-container\"\n             data-toaster-id=\"14477971971157455000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`{\n  &quot;name&quot;: &quot;purchase_order_number&quot;,\n  &quot;prompt&quot;: &quot;Extract the purchase order number. Return null when it is not present.&quot;,\n  &quot;json_schema&quot;: {\n    &quot;type&quot;: [&quot;string&quot;, &quot;null&quot;]\n  },\n  &quot;scope&quot;: &quot;document&quot;,\n  &quot;result_cardinality&quot;: &quot;single&quot;,\n  &quot;include_source_regions&quot;: true\n}`, `14477971971157455000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-14477971971157455000\">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\">\"name\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"purchase_order_number\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"prompt\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"Extract the purchase order number. Return null when it is not present.\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"json_schema\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token property\">\"type\"</span><span class=\"token operator\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"string\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"null\"</span><span class=\"token punctuation\">]</span>\n  <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"scope\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"document\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"result_cardinality\"</span><span class=\"token operator\">:</span> <span class=\"token string\">\"single\"</span><span class=\"token punctuation\">,</span>\n  <span class=\"token property\">\"include_source_regions\"</span><span class=\"token operator\">:</span> <span class=\"token boolean\">true</span>\n<span class=\"token punctuation\">}</span></code></pre></div>\n      </div>\n<p>See <a href=\"/docs/ai/document-ai/extraction-schemas/\">Extraction Schemas</a> for schema design, JSON shapes, scope, cardinality, source regions, and the schema-generation helper.</p>\n<h2 style=\"position:relative;\"><a href=\"#save-and-test\" aria-label=\"save and test 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=\"save-and-test\"></div>Save and test</h2>\n<ol>\n<li>\nSelect \n<strong>Save changes</strong>\n.\n</li>\n<li>\nUpload a representative synthetic document.\n</li>\n<li>\nSelect your custom configuration in \n<strong>Upload behavior</strong>\n.\n</li>\n<li>\nReview every extracted value and its source.\n</li>\n<li>\nTest missing values, repeated values, and documents with different layouts.\n</li>\n</ol>\n<p>Do not test with production-sensitive documents in a sandbox environment.</p>\n<h2 style=\"position:relative;\"><a href=\"#manage-availability\" aria-label=\"manage availability 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=\"manage-availability\"></div>Manage availability</h2>\n<p>Disable a configuration to prevent it from being selected for new uploads and manual runs. Existing run history and results are not changed.</p>\n<p>Delete a custom configuration only when it is no longer needed. Platform-managed configurations cannot be deleted.</p>\n<h2 style=\"position:relative;\"><a href=\"#create-a-configuration-through-the-api\" aria-label=\"create a configuration 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=\"create-a-configuration-through-the-api\"></div>Create a configuration through the API</h2>\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=\"47775261474618610000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`curl -X POST &quot;https://sandbox-api.shipwell.com/document-store/configs/processing-configs&quot; \\\\\n  -H &quot;Authorization: Token <user-token>&quot; \\\\\n  -H &quot;Content-Type: application/json&quot; \\\\\n  -d '{\n    &quot;name&quot;: &quot;Purchase order extraction&quot;,\n    &quot;description&quot;: &quot;Extracts purchase order identifiers and totals.&quot;,\n    &quot;enabled&quot;: true,\n    &quot;pipeline_config&quot;: {\n      &quot;schemas&quot;: [\n        {\n          &quot;name&quot;: &quot;purchase_order_number&quot;,\n          &quot;prompt&quot;: &quot;Extract the purchase order number. Return null when absent.&quot;,\n          &quot;json_schema&quot;: {&quot;type&quot;: [&quot;string&quot;, &quot;null&quot;]},\n          &quot;scope&quot;: &quot;document&quot;,\n          &quot;result_cardinality&quot;: &quot;single&quot;,\n          &quot;include_source_regions&quot;: true\n        },\n        {\n          &quot;name&quot;: &quot;total_amount&quot;,\n          &quot;prompt&quot;: &quot;Extract the total amount and currency.&quot;,\n          &quot;json_schema&quot;: {\n            &quot;type&quot;: [&quot;object&quot;, &quot;null&quot;],\n            &quot;properties&quot;: {\n              &quot;amount&quot;: {&quot;type&quot;: &quot;number&quot;},\n              &quot;currency&quot;: {&quot;type&quot;: &quot;string&quot;}\n            },\n            &quot;required&quot;: [&quot;amount&quot;, &quot;currency&quot;],\n            &quot;additionalProperties&quot;: false\n          },\n          &quot;scope&quot;: &quot;document&quot;,\n          &quot;result_cardinality&quot;: &quot;single&quot;\n        }\n      ],\n      &quot;split&quot;: false,\n      &quot;embed&quot;: true,\n      &quot;describe&quot;: {\n        &quot;enabled&quot;: true,\n        &quot;key_facts&quot;: true\n      }\n    }\n  }'`, `47775261474618610000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-47775261474618610000\">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/configs/processing-configs&quot; \\\n  -H &quot;Authorization: Token &lt;user-token&gt;&quot; \\\n  -H &quot;Content-Type: application/json&quot; \\\n  -d &#39;{\n    &quot;name&quot;: &quot;Purchase order extraction&quot;,\n    &quot;description&quot;: &quot;Extracts purchase order identifiers and totals.&quot;,\n    &quot;enabled&quot;: true,\n    &quot;pipeline_config&quot;: {\n      &quot;schemas&quot;: [\n        {\n          &quot;name&quot;: &quot;purchase_order_number&quot;,\n          &quot;prompt&quot;: &quot;Extract the purchase order number. Return null when absent.&quot;,\n          &quot;json_schema&quot;: {&quot;type&quot;: [&quot;string&quot;, &quot;null&quot;]},\n          &quot;scope&quot;: &quot;document&quot;,\n          &quot;result_cardinality&quot;: &quot;single&quot;,\n          &quot;include_source_regions&quot;: true\n        },\n        {\n          &quot;name&quot;: &quot;total_amount&quot;,\n          &quot;prompt&quot;: &quot;Extract the total amount and currency.&quot;,\n          &quot;json_schema&quot;: {\n            &quot;type&quot;: [&quot;object&quot;, &quot;null&quot;],\n            &quot;properties&quot;: {\n              &quot;amount&quot;: {&quot;type&quot;: &quot;number&quot;},\n              &quot;currency&quot;: {&quot;type&quot;: &quot;string&quot;}\n            },\n            &quot;required&quot;: [&quot;amount&quot;, &quot;currency&quot;],\n            &quot;additionalProperties&quot;: false\n          },\n          &quot;scope&quot;: &quot;document&quot;,\n          &quot;result_cardinality&quot;: &quot;single&quot;\n        }\n      ],\n      &quot;split&quot;: false,\n      &quot;embed&quot;: true,\n      &quot;describe&quot;: {\n        &quot;enabled&quot;: true,\n        &quot;key_facts&quot;: true\n      }\n    }\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=\"25997508960452276000\"\n             data-toaster-duration=\"1500\"\n             onClick=\"copyCodeToClipboard(`import requests\n\npayload = {\n    &quot;name&quot;: &quot;Purchase order extraction&quot;,\n    &quot;description&quot;: &quot;Extracts purchase order identifiers and totals.&quot;,\n    &quot;enabled&quot;: True,\n    &quot;pipeline_config&quot;: {\n        &quot;schemas&quot;: [\n            {\n                &quot;name&quot;: &quot;purchase_order_number&quot;,\n                &quot;prompt&quot;: &quot;Extract the purchase order number. Return null when absent.&quot;,\n                &quot;json_schema&quot;: {&quot;type&quot;: [&quot;string&quot;, &quot;null&quot;]},\n                &quot;scope&quot;: &quot;document&quot;,\n                &quot;result_cardinality&quot;: &quot;single&quot;,\n                &quot;include_source_regions&quot;: True,\n            },\n            {\n                &quot;name&quot;: &quot;total_amount&quot;,\n                &quot;prompt&quot;: &quot;Extract the total amount and currency.&quot;,\n                &quot;json_schema&quot;: {\n                    &quot;type&quot;: [&quot;object&quot;, &quot;null&quot;],\n                    &quot;properties&quot;: {\n                        &quot;amount&quot;: {&quot;type&quot;: &quot;number&quot;},\n                        &quot;currency&quot;: {&quot;type&quot;: &quot;string&quot;},\n                    },\n                    &quot;required&quot;: [&quot;amount&quot;, &quot;currency&quot;],\n                    &quot;additionalProperties&quot;: False,\n                },\n                &quot;scope&quot;: &quot;document&quot;,\n                &quot;result_cardinality&quot;: &quot;single&quot;,\n            },\n        ],\n        &quot;split&quot;: False,\n        &quot;embed&quot;: True,\n        &quot;describe&quot;: {&quot;enabled&quot;: True, &quot;key_facts&quot;: True},\n    },\n}\n\nresponse = requests.post(\n    &quot;https://sandbox-api.shipwell.com/document-store/configs/processing-configs&quot;,\n    headers={&quot;Authorization&quot;: &quot;Token <user-token>&quot;},\n    json=payload,\n    timeout=30,\n)\nresponse.raise_for_status()\nconfiguration = response.json()`, `25997508960452276000`)\"\n        >\n          <div class=\"gatsby-code-button\" title=\"Copy the code snippet\">Copy</div>\n          <div class=\"done-indicator done-indicator-25997508960452276000\">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\npayload <span class=\"token operator\">=</span> <span class=\"token punctuation\">{</span>\n    <span class=\"token string\">\"name\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"Purchase order extraction\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token string\">\"description\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"Extracts purchase order identifiers and totals.\"</span><span class=\"token punctuation\">,</span>\n    <span class=\"token string\">\"enabled\"</span><span class=\"token punctuation\">:</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">,</span>\n    <span class=\"token string\">\"pipeline_config\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n        <span class=\"token string\">\"schemas\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span>\n            <span class=\"token punctuation\">{</span>\n                <span class=\"token string\">\"name\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"purchase_order_number\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"prompt\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"Extract the purchase order number. Return null when absent.\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"json_schema\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span><span class=\"token string\">\"type\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"string\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"null\"</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"scope\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"document\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"result_cardinality\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"single\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"include_source_regions\"</span><span class=\"token punctuation\">:</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">,</span>\n            <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n            <span class=\"token punctuation\">{</span>\n                <span class=\"token string\">\"name\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"total_amount\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"prompt\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"Extract the total amount and currency.\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"json_schema\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n                    <span class=\"token string\">\"type\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"object\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"null\"</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n                    <span class=\"token string\">\"properties\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span>\n                        <span class=\"token string\">\"amount\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span><span class=\"token string\">\"type\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"number\"</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n                        <span class=\"token string\">\"currency\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span><span class=\"token string\">\"type\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"string\"</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n                    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n                    <span class=\"token string\">\"required\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">[</span><span class=\"token string\">\"amount\"</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"currency\"</span><span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n                    <span class=\"token string\">\"additionalProperties\"</span><span class=\"token punctuation\">:</span> <span class=\"token boolean\">False</span><span class=\"token punctuation\">,</span>\n                <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"scope\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"document\"</span><span class=\"token punctuation\">,</span>\n                <span class=\"token string\">\"result_cardinality\"</span><span class=\"token punctuation\">:</span> <span class=\"token string\">\"single\"</span><span class=\"token punctuation\">,</span>\n            <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n        <span class=\"token punctuation\">]</span><span class=\"token punctuation\">,</span>\n        <span class=\"token string\">\"split\"</span><span class=\"token punctuation\">:</span> <span class=\"token boolean\">False</span><span class=\"token punctuation\">,</span>\n        <span class=\"token string\">\"embed\"</span><span class=\"token punctuation\">:</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">,</span>\n        <span class=\"token string\">\"describe\"</span><span class=\"token punctuation\">:</span> <span class=\"token punctuation\">{</span><span class=\"token string\">\"enabled\"</span><span class=\"token punctuation\">:</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">,</span> <span class=\"token string\">\"key_facts\"</span><span class=\"token punctuation\">:</span> <span class=\"token boolean\">True</span><span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n    <span class=\"token punctuation\">}</span><span class=\"token punctuation\">,</span>\n<span class=\"token punctuation\">}</span>\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/configs/processing-configs\"</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>payload<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>\nconfiguration <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>Names must be unique within your company.</p>\n<h2 style=\"position:relative;\"><a href=\"#update-or-delete-through-the-api\" aria-label=\"update or delete 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=\"update-or-delete-through-the-api\"></div>Update or delete through the API</h2>\n<p>Use <code class=\"language-text\">PATCH /document-store/configs/processing-configs/{id}</code> to update only the fields that should change.</p>\n<p>Use <code class=\"language-text\">DELETE /document-store/configs/processing-configs/{id}</code> to delete a company-owned configuration. A successful delete returns <code class=\"language-text\">204 No Content</code>.</p>","headings":[{"value":"Custom Configurations","depth":1},{"value":"Create a configuration in Shipwell","depth":2},{"value":"Configure document enrichment","depth":2},{"value":"Generate per-page embeddings","depth":3},{"value":"Enable auto-description","depth":3},{"value":"Configure document structure","depth":2},{"value":"Add extraction schemas","depth":2},{"value":"Save and test","depth":2},{"value":"Manage availability","depth":2},{"value":"Create a configuration through the API","depth":2},{"value":"Update or delete through the API","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":"916b42ef-59c1-5f8f-b241-600744a424b4__redocly content/docs/ai/document-ai/custom-configurations/","seo":{"title":"Custom Configurations","description":null,"image":"","keywords":null,"jsonLd":null,"lang":null,"siteUrl":null},"pageId":"docs/ai/document-ai/custom-configurations.md","pageBaseUrl":"/docs/ai/document-ai/custom-configurations","type":"markdown","toc":{"enable":true,"maxDepth":4,"headings":[{"depth":1,"value":"Custom Configurations","id":"custom-configurations"},{"depth":2,"value":"Create a configuration in Shipwell","id":"create-a-configuration-in-shipwell"},{"depth":2,"value":"Configure document enrichment","id":"configure-document-enrichment"},{"depth":3,"value":"Generate per-page embeddings","id":"generate-per-page-embeddings"},{"depth":3,"value":"Enable auto-description","id":"enable-auto-description"},{"depth":2,"value":"Configure document structure","id":"configure-document-structure"},{"depth":2,"value":"Add extraction schemas","id":"add-extraction-schemas"},{"depth":2,"value":"Save and test","id":"save-and-test"},{"depth":2,"value":"Manage availability","id":"manage-availability"},{"depth":2,"value":"Create a configuration through the API","id":"create-a-configuration-through-the-api"},{"depth":2,"value":"Update or delete through the API","id":"update-or-delete-through-the-api"}]},"data":{"title":"Custom Configurations"},"catalogInfo":null,"link":"/docs/ai/document-ai/custom-configurations/","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"]}