diff --git a/src/openapi/customers/SE-customers.yaml b/src/openapi/customers/SE-customers.yaml index 1050f1a..196a5b3 100644 --- a/src/openapi/customers/SE-customers.yaml +++ b/src/openapi/customers/SE-customers.yaml @@ -166,6 +166,178 @@ paths: "detail": "Meer dan 1 klantprofiel gevonden. Verfijn je zoekcriteria.", "instance": "555d00b5-bc3f-4591-949b-479e76d49ea7", } + post: + tags: + - Customers + parameters: + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP, in this case the call can only be done through the SMP + summary: Create a customer profile. + description: Create a customer profile in the ABT database with status ACTIVE and debtorStatus Inactive with a start date based on the timestamp of this post call. + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + minimalCustomerProfile: + value: + { + "person": { + "emailAddress": "j.jansen@hatseflats.nl" + } + } + fullCustomerProfile: + value: + { + "customerPreference": { + "languageId": 1 + }, + "person": { + "birthname": "Jan", + "surname": "Jansen", + "prefix": "dhr", + "suffix": "jr", + "dateOfBirth": "1970-01-01", + "emailAddress": "j.jansen@hatseflats.nl", + "addresses": [ + { + "street": "Laan van Meerdervoort", + "houseNumber": 5, + "houseNumberSuffix": "B", + "postalCode": "2500AA", + "city": "Den Haag", + "country": "NL", + "isPreferred": true, + "addressTypeId": 1 + }, + { + "street": "Beeklaan", + "houseNumber": 30, + "houseNumberSuffix": "B", + "postalCode": "2500AA", + "city": "Den Haag", + "country": "NL", + "isPreferred": false, + "addressTypeId": 2 + } + ], + "phones": [ + { + "number": "6123456789", + "countryCode": "0031", + "phoneTypeId": 1, + "isPreferred": true + }, + { + "number": "7012345678", + "countryCode": "0031", + "phoneTypeId": 2, + "isPreferred": false + } + ] + } + } + responses: + "201": + description: Created + content: + application/json: + schema: + $ref: "#/components/schemas/CustomersResponse" + patch: + tags: + - Customers + parameters: + - name: X-HTM-JWT-AUTH-HEADER + in: header + schema: + type: string + example: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c + required: false + description: The JWT of a customer in case of touchpoint were customer logs in themselves + - name: X-HTM-CUSTOMER-PROFILE-ID-HEADER + in: header + schema: + type: string + example: feaaef83-a551-4283-8419-340b1ada3b55 + required: false + description: The customerProfileId of a customer in the case of the SMP + - name: X-HTM-ROLE-HEADER + in: header + schema: + type: string + example: Customer + required: false + description: The role of the HTM employee in the case of the SMP + summary: Update a customer profile + description: Update a customer profile based on the sub from the JWT, or customerProfileId in case of SMP + requestBody: + content: + application/json: + schema: + $ref: "#/components/schemas/unavailable" + examples: + patchCustomer: + value: + { + "person": { + "birthname": "Jan", + "surname": "Jansen", + "prefix": "dhr", + "suffix": "jr", + "dateOfBirth": "1970-01-01", + "addresses": [ + { + "addressId": 2, + "street": "Laan van Meerdervoort", + "houseNumber": 5, + "postalCode": "2500AA", + "city": "Den Haag", + "country": "NL" + }, + { + "addressId": 1, + "street": "Beeklaan", + "houseNumber": 30, + "houseNumberSuffix": "B", + "postalCode": "2500AA", + "city": "Den Haag", + "country": "NL", + "addressTypeId": 2 + } + ], + "phones": [ + { + "phoneId": 1, + "number": "6123456789", + "countryCode": "0031", + "phoneTypeId": 1, + "isPreferred": true + }, + { + "phoneId": 2, + "number": "7012345678", + "countryCode": "0031", + "phoneTypeId": 2, + "isPreferred": false + } + ] + } + } + responses: + "200": + description: OK + content: + application/json: + schema: + $ref: "#/components/schemas/CustomersResponse" + /customers/tokens: get: tags: