From d0acf2b46511af75b00919afbd50fd7a0f06d339 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 16 Dec 2024 17:23:41 +0100 Subject: [PATCH 1/3] Add optional parentProductId query parameter --- src/openapi/products/products-crud-v2.2.yaml | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/openapi/products/products-crud-v2.2.yaml b/src/openapi/products/products-crud-v2.2.yaml index 0f69225..a203013 100644 --- a/src/openapi/products/products-crud-v2.2.yaml +++ b/src/openapi/products/products-crud-v2.2.yaml @@ -1,13 +1,13 @@ openapi: 3.0.1 info: - title: ABTProducts (based on domainmodel v2.2) + title: ABTProducts description: >- CRUD APIs for HTM products (based on the new domainmodel v2.2). Internal use only; external touchpoints can get read-only, filtered access via the HTM Service Engine, using a different endpoint. - version: '2.2' + version: '1.0' servers: - - url: https://api.integratielaag.nl/abt/products/2.2 + - url: https://api.integratielaag.nl/abt/products/21.0 tags: - name: ABTProducts CRUD description: >- @@ -27,6 +27,16 @@ paths: only products that have active sellingPeriods for touchpoints within the same retailer as the calling retailer are returned. \ Touchpoint 1 and 2 belong to retailer 1; touchpoint 3 and 4 belong to retailer 2. + parameters: + - name: parentProductId + in: query + required: false + description: |- + Only return products that refer to the given parentProductId. \ + Returns parent-products (i.e. products with parentProductId = null) if left empty. + schema: + type: integer + example: 1 responses: '200': description: OK From 53aa8cc62c35fbaef492f7f7315f02e22ebf22fc Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 16 Dec 2024 17:25:09 +0100 Subject: [PATCH 2/3] Typo --- src/openapi/products/products-crud-v2.2.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/openapi/products/products-crud-v2.2.yaml b/src/openapi/products/products-crud-v2.2.yaml index a203013..f6afd2e 100644 --- a/src/openapi/products/products-crud-v2.2.yaml +++ b/src/openapi/products/products-crud-v2.2.yaml @@ -7,7 +7,7 @@ info: Service Engine, using a different endpoint. version: '1.0' servers: - - url: https://api.integratielaag.nl/abt/products/21.0 + - url: https://api.integratielaag.nl/abt/products/1.0 tags: - name: ABTProducts CRUD description: >- From ae387e822c1384058cf5ec0d9c8e78455aa1683e Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 16 Dec 2024 17:26:38 +0100 Subject: [PATCH 3/3] Update description --- src/openapi/products/products-crud-v2.2.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/openapi/products/products-crud-v2.2.yaml b/src/openapi/products/products-crud-v2.2.yaml index f6afd2e..3daa4ec 100644 --- a/src/openapi/products/products-crud-v2.2.yaml +++ b/src/openapi/products/products-crud-v2.2.yaml @@ -20,8 +20,8 @@ paths: - ABTProducts CRUD summary: Get a list of all defined HTM products description: |- - Get a list of all HTM products, without any filters. Only a few details - are returned per product - use the `GET /products/{productId}` endpoint + Get a list of all HTM products that refer to a given parentProductId (or without parent, if not specified), without any other filters. \ + Only a few details are returned per product - use the `GET /products/{productId}` endpoint to get more details. \ In the examples, it can be seen that (when a touchpoint HTTP header is present) only products that have active sellingPeriods for touchpoints within the same