From 659b86fa11b35a6292e48366bfd771edf57f80b5 Mon Sep 17 00:00:00 2001 From: Yasser's studio Date: Sun, 14 Jun 2026 18:59:05 +0100 Subject: [PATCH] docs(regions,datasources): note read-after-write eventual consistency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A newly created region or data source can briefly return 404 on an immediate get/update/delete/list because the Merchant API is eventually consistent — the resource takes a few seconds (up to ~20s) to propagate. Document it as a Read-after-write tip so create-then-get scripts know to allow a short delay or retry. --- docs/reference/datasources.md | 4 ++++ docs/reference/regions.md | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/docs/reference/datasources.md b/docs/reference/datasources.md index c1ff755..c10312a 100644 --- a/docs/reference/datasources.md +++ b/docs/reference/datasources.md @@ -59,6 +59,10 @@ cat datasource.json | gmc datasources create Input precedence: `--file` → flags → piped stdin. Passing both `--file` and flags is an error. `--json` returns the created `DataSource`. +::: tip Read-after-write +`create` returns the source (with its `dataSourceId`) immediately, but the Merchant API is eventually consistent: a `get` / `update` / `delete` in the next instant may briefly return `404` until it propagates — usually a few seconds, up to ~20s. If you script `create` followed by another call on the new id, allow a short delay or retry. +::: + Then push products into the new source: ```sh diff --git a/docs/reference/regions.md b/docs/reference/regions.md index d0e188b..550054f 100644 --- a/docs/reference/regions.md +++ b/docs/reference/regions.md @@ -58,6 +58,10 @@ flags (output-only — a region must cover enough area to be usable). `--json` e result (`{ "regions": [...] }` for list, the resource for get/create/update, `{ "deleted": "" }` for delete). +::: tip Read-after-write +`create` returns the region immediately, but the Merchant API is eventually consistent: a `get` / `update` / `delete` / `list` in the next instant may briefly return `404` (or omit it) until it propagates — usually a few seconds, up to ~20s. If you script `create` followed by another call on the new id, allow a short delay or retry. +::: + ## Exit codes `0` success · `2` usage (no/both areas, missing `--region-code`, unreadable `--file`, bad