{"id":445420,"date":"2026-09-18T00:58:44","date_gmt":"2026-09-17T22:58:44","guid":{"rendered":"https:\/\/www.kafinea.com\/documentation\/uncategorized\/rest-api-refresh-an-online-store-order\/"},"modified":"2026-11-22T17:50:39","modified_gmt":"2026-11-22T16:50:39","password":"","slug":"rest-api-refresh-an-online-store-order","status":"publish","type":"docs","link":"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/","title":{"rendered":"REST API &#8211; Refresh an online store order"},"content":{"rendered":"<p>This page describes the operation that <strong>re-runs the import of a document already downloaded from an online<br \/>\nstore<\/strong>. It is the remote, batch equivalent of the &#8220;Refresh from store&#8221;<br \/>\nbutton located on the document.<\/p>\n<div style=\"overflow-x:auto\">\n<table>\n<thead>\n<tr>\n<th>Operation<\/th>\n<th>Method<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>onlinestore_refresh_order<\/code><\/td>\n<td>POST<\/td>\n<td>Re-run the import of a batch of documents from their store<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<blockquote>\n<p><strong>Restricted to administrators.<\/strong> This operation rewrites sales management documents from<br \/>\nan external source.<\/p>\n<\/blockquote>\n<hr>\n<h2>When to use it<\/h2>\n<p>A document imported from a store reflects the store <strong>at the time of import<\/strong>. If a store<br \/>\nsetting has changed since then (customer recognition, customer creation, a shipping fee<br \/>\nrule, an added item or payment method mapping), the document does not retroactively benefit from the new<br \/>\nsetting. Refreshing re-runs it with the current settings, <strong>subject to the safeguards below<\/strong>.<\/p>\n<p>The most common case: orders linked to the store&#8217;s <strong>fallback customer<\/strong> because<br \/>\ntheir customer was not yet recognized. You complete the mappings (see<br \/>\n<a href=\"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-bulk-import-upsert\/\">Bulk Import<\/a>) or you authorize customer creation on the store<br \/>\nrecord, then you refresh the orders concerned: each one is re-assigned to its customer.<\/p>\n<p>The same batch allows you to set the <strong>payment method<\/strong> after completing the<br \/>\n<strong>Payment mappings<\/strong> on the store record. The method is retrieved with the current<br \/>\nmapping. If this mapping remains to be completed, the refresh proceeds and keeps the method already<br \/>\npresent on the document. Payment terms are not modified by this mapping.<\/p>\n<h2>What the operation guarantees<\/h2>\n<ul>\n<li><strong>It updates the existing document<\/strong>, without creating a second document.<\/li>\n<li><strong>It applies the standard checks for locked documents and linked records.<\/strong> A document whose<br \/>\nlines are included in an invoice, a delivery note, or a credit note is not refreshed: <code>errors<\/code><br \/>\nidentifies this document, and the requested document remains unchanged.<\/li>\n<li><strong>It recalculates the tax region when provided by the store.<\/strong> If no region applies<br \/>\nanymore with the current configuration, the document no longer carries one and the <strong>VAT to verify<\/strong> notice indicates this.<\/li>\n<li><strong>A rejection does not prevent the processing of other documents.<\/strong> The response indicates the document and the reason.<\/li>\n<li><strong>A new run remains possible for eligible documents<\/strong>, with current data and<br \/>\nsettings. With identical source and settings, it maintains the same result.<\/li>\n<\/ul>\n<p>Before launching a batch, review the data, history, and linked records of the documents concerned.<br \/>\nRefreshing may overwrite adjustments made in Kafinea with store data;<br \/>\nexclude documents to be kept from the submitted list. A <strong>VAT to verify<\/strong> notice or a<br \/>\n<strong>Store amount discrepancy<\/strong> remains informational and does not, on its own, block invoicing.<\/p>\n<hr\/>\n<h2>Refresh a batch of documents<\/h2>\n<blockquote>\n<p><strong>POST<\/strong> <code>https:\/\/apps.kafinea.com\/{instance}\/webservice.php<\/code><\/p>\n<\/blockquote>\n<div style=\"overflow-x:auto\">\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Type<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>operation<\/code><\/td>\n<td>string<\/td>\n<td>yes<\/td>\n<td><code>onlinestore_refresh_order<\/code><\/td>\n<\/tr>\n<tr>\n<td><code>sessionName<\/code><\/td>\n<td>string<\/td>\n<td>yes<\/td>\n<td>Session ID obtained upon authentication<\/td>\n<\/tr>\n<tr>\n<td><code>ids<\/code><\/td>\n<td>string<\/td>\n<td>yes<\/td>\n<td>JSON array of document Webservice IDs, up to 100 maximum<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<p>The originating store and order reference are <strong>read from the document<\/strong>: you do not need<br \/>\nto provide anything else, and a document that does not originate from a store is flagged as such.<\/p>\n<p><!-- doc-check-ignore: tech --><\/p>\n<pre><code class=\"language-bash\">curl -X POST https:\/\/apps.kafinea.com\/YourKafinea\/webservice.php \\\n  -d \"operation=onlinestore_refresh_order\" \\\n  -d \"sessionName=YOUR_SESSION_ID\" \\\n  -d 'ids=[\"5x700001\",\"5x700002\"]'\n<\/code><\/pre>\n<p>Response example (all IDs on this page are fictitious):<\/p>\n<p><!-- doc-check-ignore: tech --><\/p>\n<pre><code class=\"language-json\">{\n  \"success\": true,\n  \"result\": {\n    \"processed\": 2,\n    \"refreshed\": 2,\n    \"documents\": [\n      {\"index\": 0, \"id\": \"5x700001\", \"module\": \"SalesOrder\", \"externalRef\": \"DEMO-701\", \"storeId\": 900001},\n      {\"index\": 1, \"id\": \"5x700002\", \"module\": \"SalesOrder\", \"externalRef\": \"DEMO-702\", \"storeId\": 900001}\n    ],\n    \"errors\": []\n  }\n}\n<\/code><\/pre>\n<p><code>index<\/code> is the position of the document in the submitted array: this allows you to find the<br \/>\nline to correct when <code>errors<\/code> is not empty.<\/p>\n<hr>\n<h2>Related references \ud83d\udd17<\/h2>\n<ul>\n<li><a href=\"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-bulk-import-upsert\/\">Bulk import (identifier mapping)<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-full-reference-openapi\/\">Complete API reference<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-requests-and-querying\/\">Queries and search<\/a><\/li>\n<li><a href=\"https:\/\/www.kafinea.com\/fr\/documentation\/parametrage\/la-region-fiscale-des-documents\/\">Document tax region<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>This page describes the operation that re-runs the import of a document already downloaded from an online store. It is the remote, batch equivalent of the &#8220;Refresh from store&#8221; button located on the document. Operation Method Description onlinestore_refresh_order POST Re-run the import of a batch of documents from their store Restricted to administrators. This operation&#8230;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_uag_custom_page_level_css":"","_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","footnotes":""},"doc_category":[759],"doc_tag":[],"class_list":["post-445420","docs","type-docs","status-publish","hentry","doc_category-api"],"year_month":"2026-11","word_count":584,"total_views":0,"reactions":{"happy":0,"normal":0,"sad":0},"author_info":{"name":"David Valminos","author_nicename":"david","author_url":"https:\/\/www.kafinea.com\/en\/author\/david\/"},"doc_category_info":[{"term_name":"API","term_url":"https:\/\/www.kafinea.com\/en\/help\/api\/"}],"doc_tag_info":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Help - REST API - Refresh an online store order &#8226; Kafinea<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Help - REST API - Refresh an online store order &#8226; Kafinea\" \/>\n<meta property=\"og:description\" content=\"This page describes the operation that re-runs the import of a document already downloaded from an online store. It is the remote, batch equivalent of the &#8220;Refresh from store&#8221; button located on the document. Operation Method Description onlinestore_refresh_order POST Re-run the import of a batch of documents from their store Restricted to administrators. This operation...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/\" \/>\n<meta property=\"og:site_name\" content=\"Kafinea\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-22T16:50:39+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/api\\\/rest-api-refresh-an-online-store-order\\\/\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/api\\\/rest-api-refresh-an-online-store-order\\\/\",\"name\":\"Help - REST API - Refresh an online store order &#8226; Kafinea\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#website\"},\"datePublished\":\"2026-09-17T22:58:44+00:00\",\"dateModified\":\"2026-11-22T16:50:39+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/api\\\/rest-api-refresh-an-online-store-order\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/api\\\/rest-api-refresh-an-online-store-order\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/help\\\/api\\\/rest-api-refresh-an-online-store-order\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"REST API &#8211; Refresh an online store order\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/\",\"name\":\"Kafinea\",\"description\":\"Une solution unique pour toutes vos ambitions\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#organization\",\"name\":\"Kafinea\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.kafinea.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/Logo-Kafinea-SVG-orange-bleu.svg\",\"contentUrl\":\"https:\\\/\\\/www.kafinea.com\\\/wp-content\\\/uploads\\\/2024\\\/10\\\/Logo-Kafinea-SVG-orange-bleu.svg\",\"width\":296.31,\"height\":66.48,\"caption\":\"Kafinea\"},\"image\":{\"@id\":\"https:\\\/\\\/www.kafinea.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.linkedin.com\\\/company\\\/kafinea\\\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Help - REST API - Refresh an online store order &#8226; Kafinea","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/","og_locale":"en_US","og_type":"article","og_title":"Help - REST API - Refresh an online store order &#8226; Kafinea","og_description":"This page describes the operation that re-runs the import of a document already downloaded from an online store. It is the remote, batch equivalent of the &#8220;Refresh from store&#8221; button located on the document. Operation Method Description onlinestore_refresh_order POST Re-run the import of a batch of documents from their store Restricted to administrators. This operation...","og_url":"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/","og_site_name":"Kafinea","article_modified_time":"2026-11-22T16:50:39+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/","url":"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/","name":"Help - REST API - Refresh an online store order &#8226; Kafinea","isPartOf":{"@id":"https:\/\/www.kafinea.com\/en\/#website"},"datePublished":"2026-09-17T22:58:44+00:00","dateModified":"2026-11-22T16:50:39+00:00","breadcrumb":{"@id":"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.kafinea.com\/en\/help\/api\/rest-api-refresh-an-online-store-order\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.kafinea.com\/en\/"},{"@type":"ListItem","position":2,"name":"REST API &#8211; Refresh an online store order"}]},{"@type":"WebSite","@id":"https:\/\/www.kafinea.com\/en\/#website","url":"https:\/\/www.kafinea.com\/en\/","name":"Kafinea","description":"Une solution unique pour toutes vos ambitions","publisher":{"@id":"https:\/\/www.kafinea.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.kafinea.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.kafinea.com\/en\/#organization","name":"Kafinea","url":"https:\/\/www.kafinea.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.kafinea.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.kafinea.com\/wp-content\/uploads\/2024\/10\/Logo-Kafinea-SVG-orange-bleu.svg","contentUrl":"https:\/\/www.kafinea.com\/wp-content\/uploads\/2024\/10\/Logo-Kafinea-SVG-orange-bleu.svg","width":296.31,"height":66.48,"caption":"Kafinea"},"image":{"@id":"https:\/\/www.kafinea.com\/en\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.linkedin.com\/company\/kafinea\/"]}]}},"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"David Valminos","author_link":"https:\/\/www.kafinea.com\/en\/author\/david\/"},"uagb_comment_info":0,"uagb_excerpt":"This page describes the operation that re-runs the import of a document already downloaded from an online store. It is the remote, batch equivalent of the &#8220;Refresh from store&#8221; button located on the document. Operation Method Description onlinestore_refresh_order POST Re-run the import of a batch of documents from their store Restricted to administrators. This operation...","_links":{"self":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/docs\/445420","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/comments?post=445420"}],"version-history":[{"count":0,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/docs\/445420\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/media?parent=445420"}],"wp:term":[{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/doc_category?post=445420"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.kafinea.com\/en\/wp-json\/wp\/v2\/doc_tag?post=445420"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}