From 5b1b2e33e0bac2767ada29c6e4aec4989af2488a Mon Sep 17 00:00:00 2001 From: "Ronald A. Richardson" Date: Wed, 12 Aug 2026 01:27:58 +0800 Subject: [PATCH] fix(storefront): capture the store location id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Retrieve Location addresses {{location_id}} and nothing set it, so it requested the literal placeholder. List Locations runs first and is the natural source. Inert until the contract run seeds a store location — the endpoint returned [] until now (fleetbase/fleetbase#601). Co-Authored-By: Claude Opus 5 --- .../Store/List Locations.request.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/postman/collections/Fleetbase Storefront API/Store/List Locations.request.yaml b/postman/collections/Fleetbase Storefront API/Store/List Locations.request.yaml index 1c36794..0455992 100644 --- a/postman/collections/Fleetbase Storefront API/Store/List Locations.request.yaml +++ b/postman/collections/Fleetbase Storefront API/Store/List Locations.request.yaml @@ -2,4 +2,14 @@ $kind: http-request description: List Locations url: "{{base_url}}/{{api_prefix}}/{{namespace}}/locations" method: GET +scripts: + - type: afterResponse + code: |- + // Retrieve Location addresses {{location_id}}; nothing set it. + var json_response = pm.response.json(); + + if (Array.isArray(json_response) && json_response.length) { + pm.environment.set("location_id", json_response[0].id); + } + language: text/javascript order: 2400