From eab79163cfb971c984053322e9dc94d2d8b80c75 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Mon, 25 Nov 2024 17:03:28 +0100 Subject: [PATCH 1/8] First commit, still WIP --- src/openapi/customers/SE-customers.yaml | 54 +++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/openapi/customers/SE-customers.yaml diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml new file mode 100644 index 0000000..6e4a7a8 --- /dev/null +++ b/src/openapi/customers/SE-customers.yaml @@ -0,0 +1,54 @@ +openapi: 3.0.1 +info: + title: Service Engine APIs for Customers + description: >- + Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. + To be used by touchpoints to get information about HTM customers. + version: '1.0' +servers: + - url: https://api.integratielaag.nl/abt/serviceengine/customers/1.0 +tags: + - name: ServiceEngine Customers + description: >- + Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. + To be used by touchpoints to get information about HTM customers. +paths: + /customers/tokens/{tokenId}/product-instances: + get: + tags: + - ServiceEngine Customers + summary: Get a list of all HTM products instantiated on the given OvPayToken + description: |- + Get a list of all HTM products instantiated on the given OvPayToken. + Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances. + Where relevant, operations to be performed are returned as HATEOAS links per product-instance. + parameters: + - name: tokenId + in: path + required: true + style: simple + description: Id of the OvPayToken to get product-instances for. + schema: + type: integer + example: 1 + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/TokenProductInstancesResponse' + examples: + getEmptyProductInstances: + summary: No product-instances found on token + value: + Entries: [] +components: + schemas: + TokenProductInstancesResponse: + type: object + required: + - Entries + properties: + Entries: + type: array From 3eb98b0d237371cc35b0a6ad8373e7dd2c7ef0f5 Mon Sep 17 00:00:00 2001 From: Mirjam Herald Date: Mon, 2 Dec 2024 14:59:28 +0000 Subject: [PATCH 2/8] Update src/openapi/customers/SE-customers.yaml Added Get Customer V2- first draft --- src/openapi/customers/SE-customers.yaml | 123 ++++++++++++++++++++++++ 1 file changed, 123 insertions(+) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index 6e4a7a8..a9316b9 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -13,6 +13,127 @@ tags: Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. To be used by touchpoints to get information about HTM customers. paths: + /customers: + get: + tags: + - ServiceEngine Customers + summary: Get a customer profile based on search parameters, only returns a unique profile + parameters: + - name: customerProfileId + in: query + schema: + type: integer + example: 1 + - name: customerNumber + in: query + schema: + type: integer + example: 1 + - name: debtorNumber + in: query + schema: + type: integer + example: 1 + - name: birthname + in: query + schema: + type: string + example: Jon + - name: surname + in: query + schema: + type: string + example: Doe + - name: emailAdress + in: query + schema: + type: string + format: email + example: jon.doe@mymailprovider.com + - name: dateOfBirth + in: query + schema: + type: string + format: date + example: "2000-01-01" + - name: addressStreet + in: query + schema: + type: string + example: Sesamestreet + - name: addressHouseNumber + in: query + schema: + type: integer + example: 1 + - name: addressHouseNumberSuffix + in: query + schema: + type: string + example: A + - name: addressPostalCode + in: query + schema: + type: string + example: 1234 AB + - name: addressCity + in: query + schema: + type: string + example: The Hague + - name: addressCountry + in: query + schema: + type: string + example: The Netherlands + - name: phoneNumber + in: query + schema: + type: string + example: The Netherlands + - name: ovChipcardNumber + in: query + schema: + type: integer + example: 0123456789 + - name: OvChipcardAlias + in: query + schema: + type: string + example: My ovchipcard + - name: ovPayTokenNumber + in: query + schema: + type: integer + example: 0123456789 + - name: ovPayTokenAlias + in: query + schema: + type: string + example: My Ov Pay Token + - name: ovPayTokenXTat + in: query + schema: + type: string + example: 180d04e0-a721-447e-a1d9-b416937b43bc + - name: ovPayTokenXBot + in: query + schema: + type: string + example: e1307c73-676a-4d07-967b-6141276f7c7c + responses: + '200': + description: Ok + content: + application/json: + schema: + $ref: '#/components/schemas/CustomersResponse' + '404': + description: Customer not found + content: + application/json: + schema: + $ref: '#/components/schemas/CustomersResponse' /customers/tokens/{tokenId}/product-instances: get: tags: @@ -52,3 +173,5 @@ components: properties: Entries: type: array + CustomersResponse: + type: object From feaaec2a5312c513ef1287694bb5349ddee7ab5c Mon Sep 17 00:00:00 2001 From: Max Martens Date: Tue, 3 Dec 2024 09:00:49 +0100 Subject: [PATCH 3/8] WIP GET customers, GET OvPayTokens with HATEOAS --- src/openapi/customers/SE-customers.yaml | 392 +++++++++++++++++++++++- 1 file changed, 379 insertions(+), 13 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index a9316b9..1f0c2cd 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -13,11 +13,12 @@ tags: Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. To be used by touchpoints to get information about HTM customers. paths: - /customers: + /customers: get: tags: - ServiceEngine Customers - summary: Get a customer profile based on search parameters, only returns a unique profile + summary: Get a single customer profile based on search parameters + description: Get a single customer profile based on search parameters. Only returns a profile if a single result matches the parameters; when multiple results are found, additional seach parameters are required to disambiguate. parameters: - name: customerProfileId in: query @@ -28,17 +29,17 @@ paths: in: query schema: type: integer - example: 1 + example: 1000001 - name: debtorNumber in: query schema: type: integer - example: 1 + example: 100001 - name: birthname in: query schema: type: string - example: Jon + example: John - name: surname in: query schema: @@ -49,7 +50,7 @@ paths: schema: type: string format: email - example: jon.doe@mymailprovider.com + example: john.doe@mymailprovider.com - name: dateOfBirth in: query schema: @@ -90,7 +91,7 @@ paths: in: query schema: type: string - example: The Netherlands + example: "0123456789" - name: ovChipcardNumber in: query schema: @@ -123,17 +124,53 @@ paths: example: e1307c73-676a-4d07-967b-6141276f7c7c responses: '200': - description: Ok + description: OK content: application/json: schema: $ref: '#/components/schemas/CustomersResponse' '404': - description: Customer not found + description: No customer found content: application/json: - schema: - $ref: '#/components/schemas/CustomersResponse' + example: + { + "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "apiErrorCode": "400.1", + "title": "Niet gevonden", + "detail": "Klant niet gevonden", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", + "errors": [ + { + "subApiErrorCode": "0017" + } + ] + } + '409': + description: Multiple customers found + content: + application/json: + example: + { + "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "apiErrorCode": "409.1", + "title": "Meer dan 1 klantprofiel gevonden", + "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.", + "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7" + } + /customers/tokens: + get: + tags: + - ServiceEngine Customers + summary: Get a list of all OvPayTokens for a certain customer + description: Get a list of all OvPayTokens for a certain customer. + responses: + '200': + description: OK + content: + application/json: + schema: + $ref: '#/components/schemas/OvPayTokensResponse' /customers/tokens/{tokenId}/product-instances: get: tags: @@ -166,6 +203,335 @@ paths: Entries: [] components: schemas: + CustomersResponse: + type: object + properties: + customerProfileId: + type: integer + example: 1 + customerNumber: + type: integer + example: 1000001 + debtorNumber: + type: string + example: DB100001 + customerStatus: + type: object + properties: + customerStatusId: + type: integer + example: 1 + name: + type: string + example: Active + person: + type: object + properties: + prefix: + type: string + example: Mr + birthname: + type: string + example: John + surname: + type: string + example: Doe + suffix: + type: string + example: Jr. + dateOfBirth: + type: string + format: date + example: '2023-02-01' + emailAdress: + type: string + format: email + example: 4j2dD@example.com + addresses: + type: array + items: + type: object + properties: + addressId: + type: integer + example: 1 + isPreferred: + type: boolean + example: true + addressType: + type: object + properties: + addressTypeId: + type: integer + example: 1 + name: + type: string + example: Brug + street: + type: string + example: Appelstraat + houseNumber: + type: integer + example: 1 + houseNumberSuffix: + type: string + example: BS + postalCode: + type: string + example: 1234AB + city: + type: string + example: Den Haag + country: + type: string + example: Nederland + _links: + type: object + properties: + delete: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/addresses/1 + method: + type: string + example: DELETE + phones: + type: array + items: + type: object + properties: + phoneId: + type: integer + example: 1 + isPreferred: + type: boolean + example: true + phoneType: + type: object + properties: + phoneTypeId: + type: integer + example: 1 + name: + type: string + example: Mobiel + number: + type: string + example: "0123456789" + countryCode: + type: string + example: "0031" + _links: + type: object + properties: + delete: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/phones/1 + method: + type: string + example: DELETE + _links: + type: object + properties: + partial_edit: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers + method: + type: string + example: PATCH + templated: + type: boolean + example: true + get_tokens: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + method: + type: string + example: GET + templated: + type: boolean + example: true + create_token: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + method: + type: string + example: POST + templated: + type: boolean + example: true + _templates: + type: object + properties: + partial_edit: + type: object + properties: + method: + type: string + example: PATCH + properties: + example: + [ + { name: person, required: true, properties: [ + { name: prefix, required: false, type: string }, + { name: birthname, required: false, type: string }, + { name: surname, required: false, type: string }, + { name: suffix, required: false, type: string }, + { name: dateOfBirth, required: false, type: string }, + { name: emailAdress, required: false, type: string }, + { name: addresses, required: false, multi: true, properties: [ + { name: addressId, required: false, type: integer }, + { name: isPreferred, required: false, type: boolean }, + { name: addressTypeId, required: false, type: integer }, + { name: street, required: false, type: string }, + { name: houseNumber, required: false, type: integer }, + { name: houseNumberSuffix, required: false, type: string }, + { name: postalCode, required: false, type: string }, + { name: city, required: false, type: string }, + { name: country, required: false, type: string } + ]}, + { name: phones, required: false, multi: true, properties: [ + { name: phoneId, required: false, type: integer }, + { name: isPreferred, required: false, type: boolean }, + { name: phoneTypeId, required: false, type: integer }, + { name: number, required: false, type: string }, + { name: countryCode, required: false, type: string } + ]} + ] } + ] + create_token: + type: object + properties: + method: + type: string + example: POST + properties: + example: + [ + { name: ovPayToken, required: true, properties: [ + { name: tokenTypeId, required: true, type: integer }, + { name: alias, required: true, type: string }, + { name: serviceReferenceId, required: false, type: string }, + { name: amount, required: false, type: integer }, + ]} + ] + + OvPayTokensResponse: + type: object + required: + - ovPayTokens + properties: + Entries: + type: array + items: + type: object + properties: + ovPayTokenId: + type: integer + example: 1 + tokenType: + type: object + properties: + tokenTypeId: + type: integer + example: 1 + name: + type: string + example: EMV + alias: + type: string + example: MyToken + tokenStatus: + type: object + properties: + tokenStatusId: + type: integer + example: 1 + name: + type: string + example: Active + expirationDate: + type: string + format: date + example: '2023-02-01' + replacedByTokenId: + type: integer + example: 1 + _links: + type: object + properties: + partial_edit: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + method: + type: string + example: PATCH + templated: + type: boolean + example: true + delete: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + method: + type: string + example: DELETE + product-instances: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/product-instances + method: + type: string + example: GET + trips: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/trips + method: + type: string + example: GET + _templates: + type: object + properties: + partial_edit: + type: object + properties: + method: + type: string + example: PATCH + properties: + example: + [ + { name: ovPayToken, required: true, properties: [ + { name: tokenStatusId, required: false, type: integer }, + { name: alias, required: false, type: string } + ]} + ] + + TokenProductInstancesResponse: type: object required: @@ -173,5 +539,5 @@ components: properties: Entries: type: array - CustomersResponse: - type: object + + From 33eef638d2c28b55be719586276a24fdde27ba46 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Tue, 3 Dec 2024 09:43:43 +0100 Subject: [PATCH 4/8] WIP update --- src/openapi/customers/SE-customers.yaml | 48 ++++++++++++++++++++----- 1 file changed, 40 insertions(+), 8 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index 1f0c2cd..e85f1d7 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -195,12 +195,12 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/TokenProductInstancesResponse' + $ref: '#/components/schemas/OvPayTokenProductInstancesResponse' examples: getEmptyProductInstances: summary: No product-instances found on token value: - Entries: [] + productInstances: [] components: schemas: CustomersResponse: @@ -486,6 +486,18 @@ components: templated: type: boolean example: true + replace: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/replace + method: + type: string + example: POST + templated: + type: boolean + example: true delete: type: object properties: @@ -525,19 +537,39 @@ components: properties: example: [ - { name: ovPayToken, required: true, properties: [ - { name: tokenStatusId, required: false, type: integer }, + { name: ovPayToken, required: true, properties: [ { name: alias, required: false, type: string } ]} ] + replace: + type: object + properties: + method: + type: string + example: POST + properties: + example: + [ + { name: ovPayToken, required: true, properties: [ + { name: newTokenId, required: false, type: integer }, + { name: tokenTypeId, required: false, type: integer }, + { name: alias, required: false, type: string }, + { name: serviceReferenceId, required: false, type: string }, + { name: amount, required: false, type: integer }, + ]} + ] - TokenProductInstancesResponse: + OvPayTokenProductInstancesResponse: type: object - required: - - Entries properties: - Entries: + productInstances: type: array + items: + type: object + properties: + productId: + type: integer + example: 1 From c04530e6163609e3da58245a454f515dc7c0562f Mon Sep 17 00:00:00 2001 From: Max Martens Date: Tue, 3 Dec 2024 15:40:40 +0100 Subject: [PATCH 5/8] Process comments --- src/openapi/customers/SE-customers.yaml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index e85f1d7..bc50dab 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -45,7 +45,7 @@ paths: schema: type: string example: Doe - - name: emailAdress + - name: emailAddress in: query schema: type: string @@ -97,7 +97,7 @@ paths: schema: type: integer example: 0123456789 - - name: OvChipcardAlias + - name: ovChipcardAlias in: query schema: type: string @@ -171,7 +171,7 @@ paths: application/json: schema: $ref: '#/components/schemas/OvPayTokensResponse' - /customers/tokens/{tokenId}/product-instances: + /customers/tokens/{ovPayTokenId}/productInstances: get: tags: - ServiceEngine Customers @@ -181,7 +181,7 @@ paths: Only HTM products are returned; GBO does not allow HTM to get information on non-HTM product-instances. Where relevant, operations to be performed are returned as HATEOAS links per product-instance. parameters: - - name: tokenId + - name: ovPayTokenId in: path required: true style: simple @@ -243,7 +243,7 @@ components: type: string format: date example: '2023-02-01' - emailAdress: + emailAddress: type: string format: email example: 4j2dD@example.com @@ -266,7 +266,7 @@ components: example: 1 name: type: string - example: Brug + example: Home street: type: string example: Appelstraat @@ -316,7 +316,7 @@ components: example: 1 name: type: string - example: Mobiel + example: Home number: type: string example: "0123456789" @@ -392,7 +392,7 @@ components: { name: surname, required: false, type: string }, { name: suffix, required: false, type: string }, { name: dateOfBirth, required: false, type: string }, - { name: emailAdress, required: false, type: string }, + { name: emailAddress, required: false, type: string }, { name: addresses, required: false, multi: true, properties: [ { name: addressId, required: false, type: integer }, { name: isPreferred, required: false, type: boolean }, @@ -435,7 +435,7 @@ components: required: - ovPayTokens properties: - Entries: + ovPayTokens: type: array items: type: object @@ -507,12 +507,12 @@ components: method: type: string example: DELETE - product-instances: + productInstances: type: object properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/product-instances + example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/productInstances method: type: string example: GET From a6878b9a341a10873611ba208e2b9cc9203b3f90 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Wed, 4 Dec 2024 16:03:10 +0100 Subject: [PATCH 6/8] WIP 3 --- src/openapi/customers/SE-customers.yaml | 70 ++++++++++++++++++++++++- 1 file changed, 69 insertions(+), 1 deletion(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index bc50dab..f3d2c16 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -201,6 +201,29 @@ paths: summary: No product-instances found on token value: productInstances: [] + getSingleProductInstance: + summary: One product-instance found on token + value: + { + "productInstances": [ + { + "productId": 1, + "name": "HTM 90% Korting", + "status": "Active", + "fromInclusive": "2024-11-25T13:25:00+01:00", + "untilInclusive": "2024-12-25T03:59:59+01:00", + "productCategory": { + "productCategoryId": 1, + "name": "Kortingsabonnement" + }, + "gboTypeOfProduct": "discount", + "purchasedProductId": 1, + "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", + "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", + "contractId": "string" + } + ] + } components: schemas: CustomersResponse: @@ -402,7 +425,7 @@ components: { name: houseNumberSuffix, required: false, type: string }, { name: postalCode, required: false, type: string }, { name: city, required: false, type: string }, - { name: country, required: false, type: string } + { name: country, required: false, type: string } ]}, { name: phones, required: false, multi: true, properties: [ { name: phoneId, required: false, type: integer }, @@ -571,5 +594,50 @@ components: productId: type: integer example: 1 + name: + type: string + example: HTM 90% Korting + status: + type: string + example: Active + fromInclusive: + type: string + format: date-time-offset + example: "2024-11-25T13:25:00+01:00" + untilInclusive: + type: string + format: date-time-offset + description: >- + If not present, this product-instance represents a subscription/contract without a real end. If present, it can be either the natural end date or the refund timestamp. + example: "2024-12-25T03:59:59+01:00" + productCategory: + type: object + description: The category of the originating HTM product definition + properties: + productCategoryId: + type: integer + example: 1 + name: + type: string + example: Kortingsabonnement + gboTypeOfProduct: + type: string + example: discount + description: The type of the product instance as GBO defines it + purchasedProductId: + type: integer + example: 1 + orderId: + type: string + format: uuid + example: 501B17EF-36C4-4039-B92C-6517969B464E + orderLineId: + type: string + format: uuid + example: 38B17EF-36C4-4039-B92C-4817969B464E + contractId: + description: doen? of via purchasedProductId? + + From 7c666aa351bc8943400ac1aca99699db65e8c269 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Wed, 4 Dec 2024 17:40:58 +0100 Subject: [PATCH 7/8] RC1 --- src/openapi/customers/SE-customers.yaml | 109 +++++++++++++++--------- 1 file changed, 71 insertions(+), 38 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index f3d2c16..c396c34 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -4,9 +4,9 @@ info: description: >- Service Engine APIs for HTM Customers. These are NOT the CRUD APIs to access raw data in the database. To be used by touchpoints to get information about HTM customers. - version: '1.0' + version: 'x.x' servers: - - url: https://api.integratielaag.nl/abt/serviceengine/customers/1.0 + - url: https://api.integratielaag.nl/abt/serviceengine/customers/x.x tags: - name: ServiceEngine Customers description: >- @@ -135,7 +135,7 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers", "apiErrorCode": "400.1", "title": "Niet gevonden", "detail": "Klant niet gevonden", @@ -152,7 +152,7 @@ paths: application/json: example: { - "type": "https://api.integratielaag.nl/abt/serviceengine/1.0/customers", + "type": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers", "apiErrorCode": "409.1", "title": "Meer dan 1 klantprofiel gevonden", "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.", @@ -171,7 +171,7 @@ paths: application/json: schema: $ref: '#/components/schemas/OvPayTokensResponse' - /customers/tokens/{ovPayTokenId}/productInstances: + /customers/tokens/{ovPayTokenId}/productinstances: get: tags: - ServiceEngine Customers @@ -202,7 +202,7 @@ paths: value: productInstances: [] getSingleProductInstance: - summary: One product-instance found on token + summary: One non-renewable product-instance value: { "productInstances": [ @@ -210,17 +210,26 @@ paths: "productId": 1, "name": "HTM 90% Korting", "status": "Active", - "fromInclusive": "2024-11-25T13:25:00+01:00", - "untilInclusive": "2024-12-25T03:59:59+01:00", + "isRenewable": true, "productCategory": { "productCategoryId": 1, "name": "Kortingsabonnement" }, - "gboTypeOfProduct": "discount", - "purchasedProductId": 1, + "fromInclusive": "2024-11-25T13:25:00+01:00", + "untilInclusive": "2024-12-25T03:59:59+01:00", "orderId": "501B17EF-36C4-4039-B92C-6517969B464E", "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", - "contractId": "string" + "contractId": "56B17EF-C436-9043-B76C-481797WEB464F", + "_links": { + "get_order": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E", + "method": "GET" + }, + "get_contract": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F", + "method": "GET" + } + } } ] } @@ -316,7 +325,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/addresses/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1 method: type: string example: DELETE @@ -354,7 +363,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/phones/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1 method: type: string example: DELETE @@ -366,7 +375,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers method: type: string example: PATCH @@ -378,7 +387,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens method: type: string example: GET @@ -390,7 +399,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens method: type: string example: POST @@ -502,7 +511,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 method: type: string example: PATCH @@ -514,7 +523,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/replace + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/replace method: type: string example: POST @@ -526,7 +535,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1 + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 method: type: string example: DELETE @@ -535,7 +544,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/productInstances + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances method: type: string example: GET @@ -544,7 +553,7 @@ components: properties: href: type: string - example: https://api.integratielaag.nl/abt/serviceengine/1.0/customers/tokens/1/trips + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/trips method: type: string example: GET @@ -599,17 +608,11 @@ components: example: HTM 90% Korting status: type: string + enum: [ "Active", "Ended", "Refunded" ] example: Active - fromInclusive: - type: string - format: date-time-offset - example: "2024-11-25T13:25:00+01:00" - untilInclusive: - type: string - format: date-time-offset - description: >- - If not present, this product-instance represents a subscription/contract without a real end. If present, it can be either the natural end date or the refund timestamp. - example: "2024-12-25T03:59:59+01:00" + isRenewable: + type: boolean + example: true productCategory: type: object description: The category of the originating HTM product definition @@ -620,13 +623,16 @@ components: name: type: string example: Kortingsabonnement - gboTypeOfProduct: + fromInclusive: type: string - example: discount - description: The type of the product instance as GBO defines it - purchasedProductId: - type: integer - example: 1 + format: date-time-offset + example: "2024-11-25T13:25:00+01:00" + untilInclusive: + type: string + format: date-time-offset + description: >- + If not present, this product-instance represents a subscription/contract without a real end date. If present, it can be either the natural end date or the refund timestamp. + example: "2024-12-25T03:59:59+01:00" orderId: type: string format: uuid @@ -636,7 +642,34 @@ components: format: uuid example: 38B17EF-36C4-4039-B92C-4817969B464E contractId: - description: doen? of via purchasedProductId? + type: string + format: uuid + example: 56B17EF-C436-9043-B76C-481797WEB464F + description: Only present for subscriptions/contracts + _links: + type: object + properties: + get_order: + type: object + properties: + href: + type: string + description: Always present for any HTM product-instance + example: https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E + method: + type: string + example: GET + get_contract: + type: object + properties: + href: + type: string + description: Only present for subscriptions/contracts + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/contracts/56B17EF-C436-9043-B76C-481797WEB464F + method: + type: string + example: GET + From ee8cdfc660bd1d72c49d4cd648976bc0f547c215 Mon Sep 17 00:00:00 2001 From: Max Martens Date: Thu, 5 Dec 2024 15:23:37 +0100 Subject: [PATCH 8/8] Remove _templates, add self under _links, add some new links and attributes --- src/openapi/customers/SE-customers.yaml | 207 +++++++++++------------- 1 file changed, 90 insertions(+), 117 deletions(-) diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index c396c34..7238481 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -30,11 +30,21 @@ paths: schema: type: integer example: 1000001 + - name: customerStatusId + in: query + schema: + type: integer + example: 1 - name: debtorNumber in: query schema: type: integer example: 100001 + - name: debtorStatusId + in: query + schema: + type: integer + example: 1 - name: birthname in: query schema: @@ -221,6 +231,10 @@ paths: "orderLineId": "38B17EF-36C4-4039-B92C-4817969B464E", "contractId": "56B17EF-C436-9043-B76C-481797WEB464F", "_links": { + "self": { + "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances/1", + "method": "GET" + }, "get_order": { "href": "https://api.integratielaag.nl/abt/serviceengine/x.x/orders/501B17EF-36C4-4039-B92C-6517969B464E", "method": "GET" @@ -244,9 +258,6 @@ components: customerNumber: type: integer example: 1000001 - debtorNumber: - type: string - example: DB100001 customerStatus: type: object properties: @@ -256,6 +267,18 @@ components: name: type: string example: Active + debtorNumber: + type: string + example: DB100001 + debtorStatus: + type: object + properties: + debtorStatusId: + type: integer + example: 1 + name: + type: string + example: Active person: type: object properties: @@ -320,7 +343,16 @@ components: _links: type: object properties: - delete: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/addresses/1 + method: + type: string + example: GET + delete_address: type: object properties: href: @@ -358,7 +390,16 @@ components: _links: type: object properties: - delete: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/phones/1 + method: + type: string + example: GET + delete_phone: type: object properties: href: @@ -370,6 +411,25 @@ components: _links: type: object properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers + method: + type: string + example: GET + create_customer_status: + type: object + description: ONLY ALLOWED FOR SMP - Create a new customer status + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/statuses + method: + type: string + example: POST partial_edit: type: object properties: @@ -379,9 +439,6 @@ components: method: type: string example: PATCH - templated: - type: boolean - example: true get_tokens: type: object properties: @@ -391,9 +448,6 @@ components: method: type: string example: GET - templated: - type: boolean - example: true create_token: type: object properties: @@ -402,66 +456,7 @@ components: example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens method: type: string - example: POST - templated: - type: boolean - example: true - _templates: - type: object - properties: - partial_edit: - type: object - properties: - method: - type: string - example: PATCH - properties: - example: - [ - { name: person, required: true, properties: [ - { name: prefix, required: false, type: string }, - { name: birthname, required: false, type: string }, - { name: surname, required: false, type: string }, - { name: suffix, required: false, type: string }, - { name: dateOfBirth, required: false, type: string }, - { name: emailAddress, required: false, type: string }, - { name: addresses, required: false, multi: true, properties: [ - { name: addressId, required: false, type: integer }, - { name: isPreferred, required: false, type: boolean }, - { name: addressTypeId, required: false, type: integer }, - { name: street, required: false, type: string }, - { name: houseNumber, required: false, type: integer }, - { name: houseNumberSuffix, required: false, type: string }, - { name: postalCode, required: false, type: string }, - { name: city, required: false, type: string }, - { name: country, required: false, type: string } - ]}, - { name: phones, required: false, multi: true, properties: [ - { name: phoneId, required: false, type: integer }, - { name: isPreferred, required: false, type: boolean }, - { name: phoneTypeId, required: false, type: integer }, - { name: number, required: false, type: string }, - { name: countryCode, required: false, type: string } - ]} - ] } - ] - create_token: - type: object - properties: - method: - type: string - example: POST - properties: - example: - [ - { name: ovPayToken, required: true, properties: [ - { name: tokenTypeId, required: true, type: integer }, - { name: alias, required: true, type: string }, - { name: serviceReferenceId, required: false, type: string }, - { name: amount, required: false, type: integer }, - ]} - ] - + example: POST OvPayTokensResponse: type: object required: @@ -506,8 +501,18 @@ components: _links: type: object properties: - partial_edit: + self: type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1 + method: + type: string + example: GET + partial_edit: + type: object + description: External touchpoints are only allowed to change alias - SMP can also change tokenStatus properties: href: type: string @@ -515,10 +520,7 @@ components: method: type: string example: PATCH - templated: - type: boolean - example: true - replace: + replace_token: type: object properties: href: @@ -527,10 +529,7 @@ components: method: type: string example: POST - templated: - type: boolean - example: true - delete: + delete_token: type: object properties: href: @@ -539,7 +538,7 @@ components: method: type: string example: DELETE - productInstances: + get_productinstances: type: object properties: href: @@ -548,7 +547,7 @@ components: method: type: string example: GET - trips: + get_trips: type: object properties: href: @@ -557,41 +556,6 @@ components: method: type: string example: GET - _templates: - type: object - properties: - partial_edit: - type: object - properties: - method: - type: string - example: PATCH - properties: - example: - [ - { name: ovPayToken, required: true, properties: [ - { name: alias, required: false, type: string } - ]} - ] - replace: - type: object - properties: - method: - type: string - example: POST - properties: - example: - [ - { name: ovPayToken, required: true, properties: [ - { name: newTokenId, required: false, type: integer }, - { name: tokenTypeId, required: false, type: integer }, - { name: alias, required: false, type: string }, - { name: serviceReferenceId, required: false, type: string }, - { name: amount, required: false, type: integer }, - ]} - ] - - OvPayTokenProductInstancesResponse: type: object properties: @@ -649,6 +613,15 @@ components: _links: type: object properties: + self: + type: object + properties: + href: + type: string + example: https://api.integratielaag.nl/abt/serviceengine/x.x/customers/tokens/1/productinstances + method: + type: string + example: GET get_order: type: object properties: