{"id":117,"date":"2026-09-26T09:00:00","date_gmt":"2026-09-26T07:00:00","guid":{"rendered":"https:\/\/yindle.com\/?p=117"},"modified":"2026-09-26T09:00:00","modified_gmt":"2026-09-26T07:00:00","slug":"api-timeout-opnieuw-schrijven-voorkomen","status":"publish","type":"post","link":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/","title":{"rendered":"Writing again after an API timeout? Check first"},"content":{"rendered":"<p>After an API timeout, only write again once you have checked whether the first command reached the destination system. A timeout means your application received no final response; it does not mean AFAS, a carrier or a payment provider did nothing. Retrying blindly can cause precisely the duplicate entry that a retry was supposed to resolve.<\/p>\n<h2>Uncertain is a process status of its own<\/h2>\n<p>There are three fundamentally different outcomes: confirmed failure, confirmed success and uncertainty. Only the first is immediately suitable for a normal retry. With an uncertain write, the server may have processed the command before losing the connection. Explicitly mark that attempt as \u201ccheck outcome\u201d and block dependent follow-up actions until the facts have been established.<\/p>\n<p>Before the POST, record what you will write: workspace, order, action, deterministic reference and a limited hash or snapshot of the business content. This recording point matters. If the process crashes after sending but before saving the response, the recovery process still knows which external identity to search for.<\/p>\n<h2>Runbook: evidence before retry<\/h2>\n<ol>\n<li><strong>Pause automatic retries.<\/strong> Prevent several workers from handling the same uncertainty simultaneously.<\/li>\n<li><strong>Search by deterministic identity.<\/strong> Use a unique order reference, posting key or provider ID; do not match on amount and date alone.<\/li>\n<li><strong>Compare the contents.<\/strong> A record with the same key but different lines is a conflict, not a success.<\/li>\n<li><strong>Record the evidence.<\/strong> Record which source confirmed whether the command exists.<\/li>\n<li><strong>Choose one next step.<\/strong> Link the existing record, resubmit safely or investigate manually.<\/li>\n<\/ol>\n<p>This develops the general principle of idempotency in concrete terms. In a <a href=\"\/en\/woocommerce-afas-integration-guide\/\">WooCommerce\u2013AFAS integration<\/a> the business reference, in particular, must remain recognisable throughout the process.<\/p>\n<h2>Fictional example: response lost after a posting<\/h2>\n<p>Fictional example: homeware store Lumenhuis sends a financial posting with reference LH-2026-00918 to AFAS. The connection drops after thirty seconds. The client sees a timeout, but AFAS has already saved the posting. Its status becomes \u201cuncertain\u201d; the next automatic attempt remains blocked.<\/p>\n<p>A recovery step asks AFAS specifically for LH-2026-00918. The record exists and its lines, amount and debtor match the snapshot saved in advance. The integration links the external identity to the original attempt and marks it complete. There is no second POST. If no record had been found and the search itself had completed reliably, one controlled retry could have been released. This example is fictional; the key is not to interpret the technical absence of a response as the business absence of a record.<\/p>\n<h2>Design choices that make recovery possible<\/h2>\n<figure class=\"wp-block-table\">\n<table>\n<thead>\n<tr>\n<th>Choice<\/th>\n<th>Why it is needed<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Deterministic external reference<\/td>\n<td>Enables a targeted receipt check<\/td>\n<\/tr>\n<tr>\n<td>Recording before sending<\/td>\n<td>Survives a crash between request and response<\/td>\n<\/tr>\n<tr>\n<td>Locking per substep<\/td>\n<td>Prevents competing recovery attempts<\/td>\n<\/tr>\n<tr>\n<td>Content comparison<\/td>\n<td>Prevents linking to a coincidentally similar record<\/td>\n<\/tr>\n<tr>\n<td>Visible uncertainty<\/td>\n<td>Gives operations a different action from a normal error<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/figure>\n<p><a href=\"\/en\/connect\/\">Connect<\/a> can model these provider steps with a status and audit trail. In <a href=\"\/en\/desk\/\">Desk<\/a> the employee can then see whether a record is confirmed, still under investigation or safe to resubmit. Avoid telling customers \u201cthe posting failed\u201d while its outcome is actually uncertain.<\/p>\n<p>Practise the runbook with artificial failures. Break the connection once before the provider receives the request, once during processing and once after the destination record has been created but before the response returns. Those three cases may look the same to the client, but require different recovery decisions. Check whether the system retrieves the previously saved intent after restarting and whether locking stops two recovery workers from acting simultaneously. Do not give manual operators an unrestricted \u201csend again\u201d button without first showing the verification result. When a provider offers no reliable search facility, the process must become more conservative: longer observation, explicit human checks or a unique reference in a report that becomes available later. Hiding uncertainty behind a technical retry policy does not remove it.<\/p>\n<p>For each provider, record which read route counts as sufficient evidence and how long it takes for data to appear there. An immediate search may find nothing because indexing is delayed. In that case, \u201cnot found\u201d is not final either, and a second, delayed check belongs before the retry.<\/p>\n<p>Want to make retries safe for your financial or logistics APIs? <a href=\"\/en\/contact\/\">Work through one uncertain-write scenario with Yindle<\/a>.<\/p>","protected":false},"excerpt":{"rendered":"<p>Treat an unclear API response as a separate status. Record the write intent in advance and look for evidence before releasing a retry.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-117","post","type-post","status-publish","format-standard","hentry","category-integraties"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>API-time-out: controleer v\u00f3\u00f3r je opnieuw schrijft<\/title>\n<meta name=\"description\" content=\"Een time-out bewijst niet dat een externe write mislukte. Verifieer eerst op vaste identiteit en voorkom dubbele financi\u00eble of logistieke records.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"API-time-out: controleer v\u00f3\u00f3r je opnieuw schrijft\" \/>\n<meta property=\"og:description\" content=\"Een time-out bewijst niet dat een externe write mislukte. Verifieer eerst op vaste identiteit en voorkom dubbele financi\u00eble of logistieke records.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/\" \/>\n<meta property=\"og:site_name\" content=\"Yindle\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-26T07:00:00+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/yindle.com\/wp-content\/themes\/yindle\/assets\/images\/yindle-social-share.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Yindle\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Yindle\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/\"},\"author\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#organization\"},\"headline\":\"Na een API-time-out opnieuw schrijven? Eerst controleren\",\"datePublished\":\"2026-09-26T07:00:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/\"},\"wordCount\":686,\"publisher\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#organization\"},\"articleSection\":[\"Integraties\"],\"inLanguage\":\"en-GB\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/\",\"url\":\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/\",\"name\":\"API-time-out: controleer v\u00f3\u00f3r je opnieuw schrijft\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#website\"},\"datePublished\":\"2026-09-26T07:00:00+00:00\",\"description\":\"Een time-out bewijst niet dat een externe write mislukte. Verifieer eerst op vaste identiteit en voorkom dubbele financi\u00eble of logistieke records.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/writing-again-after-an-api-timeout-check-first\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/yindle.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Na een API-time-out opnieuw schrijven? Eerst controleren\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/yindle.com\\\/en\\\/\",\"name\":\"Yindle\",\"description\":\"Software voor e-commerce en klantprocessen\",\"publisher\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/yindle.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#organization\",\"name\":\"Yindle B.V.\",\"url\":\"https:\\\/\\\/yindle.com\\\/en\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/yindle.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/yindle-site-icon.png\",\"contentUrl\":\"https:\\\/\\\/yindle.com\\\/wp-content\\\/uploads\\\/2026\\\/09\\\/yindle-site-icon.png\",\"width\":512,\"height\":512,\"caption\":\"Yindle B.V.\"},\"image\":{\"@id\":\"https:\\\/\\\/yindle.com\\\/en\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"legalName\":\"Yindle B.V.\",\"address\":{\"@type\":\"PostalAddress\",\"streetAddress\":\"Markt 43\",\"postalCode\":\"5554 CA\",\"addressLocality\":\"Valkenswaard\",\"addressCountry\":\"NL\"},\"identifier\":{\"@type\":\"PropertyValue\",\"propertyID\":\"KvK\",\"value\":\"99695367\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"API timeout: check before writing again","description":"A timeout does not prove an external write failed. First verify using a stable identity to prevent duplicate financial or logistics records.","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:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/","og_locale":"en_GB","og_type":"article","og_title":"API-time-out: controleer v\u00f3\u00f3r je opnieuw schrijft","og_description":"Een time-out bewijst niet dat een externe write mislukte. Verifieer eerst op vaste identiteit en voorkom dubbele financi\u00eble of logistieke records.","og_url":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/","og_site_name":"Yindle","article_published_time":"2026-09-26T07:00:00+00:00","og_image":[{"width":1200,"height":630,"url":"https:\/\/yindle.com\/wp-content\/themes\/yindle\/assets\/images\/yindle-social-share.png","type":"image\/png"}],"author":"Yindle","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Yindle","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/#article","isPartOf":{"@id":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/"},"author":{"@id":"https:\/\/yindle.com\/en\/#organization"},"headline":"Na een API-time-out opnieuw schrijven? Eerst controleren","datePublished":"2026-09-26T07:00:00+00:00","mainEntityOfPage":{"@id":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/"},"wordCount":686,"publisher":{"@id":"https:\/\/yindle.com\/en\/#organization"},"articleSection":["Integraties"],"inLanguage":"en-GB"},{"@type":"WebPage","@id":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/","url":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/","name":"API timeout: check before writing again","isPartOf":{"@id":"https:\/\/yindle.com\/en\/#website"},"datePublished":"2026-09-26T07:00:00+00:00","description":"A timeout does not prove an external write failed. First verify using a stable identity to prevent duplicate financial or logistics records.","breadcrumb":{"@id":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/yindle.com\/en\/writing-again-after-an-api-timeout-check-first\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/yindle.com\/en\/"},{"@type":"ListItem","position":2,"name":"Na een API-time-out opnieuw schrijven? Eerst controleren"}]},{"@type":"WebSite","@id":"https:\/\/yindle.com\/en\/#website","url":"https:\/\/yindle.com\/en\/","name":"Yindle","description":"Software for e-commerce and customer processes","publisher":{"@id":"https:\/\/yindle.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/yindle.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/yindle.com\/en\/#organization","name":"Yindle B.V.","url":"https:\/\/yindle.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/yindle.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/yindle.com\/wp-content\/uploads\/2026\/09\/yindle-site-icon.png","contentUrl":"https:\/\/yindle.com\/wp-content\/uploads\/2026\/09\/yindle-site-icon.png","width":512,"height":512,"caption":"Yindle B.V."},"image":{"@id":"https:\/\/yindle.com\/en\/#\/schema\/logo\/image\/"},"legalName":"Yindle B.V.","address":{"@type":"PostalAddress","streetAddress":"Markt 43","postalCode":"5554 CA","addressLocality":"Valkenswaard","addressCountry":"NL"},"identifier":{"@type":"PropertyValue","propertyID":"KvK","value":"99695367"}}]}},"_links":{"self":[{"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/posts\/117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/comments?post=117"}],"version-history":[{"count":1,"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/posts\/117\/revisions"}],"predecessor-version":[{"id":932,"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/posts\/117\/revisions\/932"}],"wp:attachment":[{"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/media?parent=117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/categories?post=117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/yindle.com\/en\/wp-json\/wp\/v2\/tags?post=117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}