diff --git "a/postman/collections/Fleetbase Storefront API/Customer/Authenticate a Customer \342\235\227.request.yaml" "b/postman/collections/Fleetbase Storefront API/Customer/Authenticate a Customer \342\235\227.request.yaml" index b9b3389..c004406 100644 --- "a/postman/collections/Fleetbase Storefront API/Customer/Authenticate a Customer \342\235\227.request.yaml" +++ "b/postman/collections/Fleetbase Storefront API/Customer/Authenticate a Customer \342\235\227.request.yaml" @@ -24,5 +24,8 @@ scripts: if (json_response && json_response.token) { cv.set("customer_token", json_response.token); } + + // Requests that address the customer by id use {{customer_id}}; nothing set it. + cv.set("customer_id", json_response.id); language: text/javascript order: 1000 diff --git a/postman/collections/Fleetbase Storefront API/Products/Create Product.request.yaml b/postman/collections/Fleetbase Storefront API/Products/Create Product.request.yaml index f9f5775..03bdad3 100644 --- a/postman/collections/Fleetbase Storefront API/Products/Create Product.request.yaml +++ b/postman/collections/Fleetbase Storefront API/Products/Create Product.request.yaml @@ -13,4 +13,12 @@ body: "description": "Example storefront product", "price": 1000 } -order: 3000 +scripts: + - type: afterResponse + code: | + // Retrieve and Update Product address {{product_id}}; nothing set it. + var json_response = pm.response.json(); + let cv = pm.environment; + cv.set("product_id", json_response.id); + language: text/javascript +order: 2000 \ No newline at end of file diff --git a/postman/collections/Fleetbase Storefront API/Products/Retrieve a Product.request.yaml b/postman/collections/Fleetbase Storefront API/Products/Retrieve a Product.request.yaml index 717fbdd..f7f3741 100644 --- a/postman/collections/Fleetbase Storefront API/Products/Retrieve a Product.request.yaml +++ b/postman/collections/Fleetbase Storefront API/Products/Retrieve a Product.request.yaml @@ -5,4 +5,4 @@ url: "{{base_url}}/{{api_prefix}}/{{namespace}}/products/{id}" method: GET pathVariables: id: "" -order: 2000 +order: 3000 \ No newline at end of file diff --git a/postman/collections/Fleetbase Storefront API/Store/About Store.request.yaml b/postman/collections/Fleetbase Storefront API/Store/About Store.request.yaml index 45187e7..aaac125 100644 --- a/postman/collections/Fleetbase Storefront API/Store/About Store.request.yaml +++ b/postman/collections/Fleetbase Storefront API/Store/About Store.request.yaml @@ -2,4 +2,12 @@ $kind: http-request description: About Store url: "{{base_url}}/{{api_prefix}}/{{namespace}}/about" method: GET +scripts: + - type: afterResponse + code: | + // Lookup Store addresses {{store_id}}; nothing set it. + var json_response = pm.response.json(); + let cv = pm.environment; + cv.set("store_id", json_response.id); + language: text/javascript order: 2000