changed GET customers to always return a list

This commit is contained in:
Mirjam Herald 2025-08-19 15:23:55 +02:00
parent 908afa2bc0
commit 270ea246df

View File

@ -17,10 +17,10 @@ paths:
get: get:
tags: tags:
- Customers - Customers
summary: Get a single customer profile based on search parameters summary: Get a customer profile based on search parameters
description: | description: |
Get a single customer profile based on search parameters. Only returns a profile if a single result matches Get a profile based on search parameters. Only returns a profile if a single result matches for a customer
the parameters; when multiple results are found, additional search parameters are required to disambiguate. the parameters; when multiple results are found, additional search parameters are required to disambiguate. If role is klantenservice, multiple customers can be returned.
parameters: parameters:
- name: customerProfileId - name: customerProfileId
in: query in: query
@ -140,7 +140,7 @@ paths:
content: content:
application/json: application/json:
schema: schema:
$ref: "#/components/schemas/CustomersResponse" $ref: "#/components/schemas/CustomersResponseList"
"404": "404":
description: No customer found description: No customer found
content: content:
@ -3257,211 +3257,218 @@ components:
alias: alias:
type: string type: string
example: MyNewToken example: MyNewToken
CustomersResponseList:
type: object
properties:
customers:
type: array
items:
$ref: "#/components/schemas/CustomersResponse"
CustomersResponse: CustomersResponse:
type: object type: object
properties: properties:
customerProfileId: customerProfileId:
type: integer type: integer
example: 1 example: 1
customerNumber: customerNumber:
type: integer type: integer
example: 1000001 example: 1000001
customerStatus: customerStatus:
type: object type: object
properties: properties:
customerStatusId: customerStatusId:
type: integer type: integer
example: 1 example: 1
name: name:
type: string type: string
example: Active example: Active
debtorNumber: debtorNumber:
type: string type: string
example: DB100001 example: DB100001
debtorStatus: debtorStatus:
type: object type: object
properties: properties:
debtorStatusId: debtorStatusId:
type: integer type: integer
example: 1 example: 1
name: name:
type: string type: string
example: Active example: Active
person: person:
type: object type: object
properties: properties:
prefix: prefix:
type: string type: string
example: Mr example: Mr
birthname: birthname:
type: string type: string
example: John example: John
surname: surname:
type: string type: string
example: Doe example: Doe
suffix: suffix:
type: string type: string
example: Jr. example: Jr.
dateOfBirth: dateOfBirth:
type: string type: string
format: date format: date
example: "2023-02-01" example: "2023-02-01"
emailAddress: emailAddress:
type: string type: string
format: email format: email
example: 4j2dD@example.com example: 4j2dD@example.com
addresses: addresses:
type: array type: array
items: items:
type: object
properties:
addressId:
type: integer
example: 1
addressType:
type: object
properties:
addressTypeId:
type: integer
example: 1
name:
type: string
example: Shipping
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: NL
_links:
type: object
properties:
self:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/addresses/1
method:
type: string
example: GET
delete_address:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/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: Home
number:
type: string
example: "0123456789"
countryCode:
type: string
example: "0031"
_links:
type: object
properties:
self:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1
method:
type: string
example: GET
delete_phone:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1
method:
type: string
example: DELETE
_links:
type: object
properties:
self:
type: object type: object
properties: properties:
addressId: href:
type: integer
example: 1
addressType:
type: object
properties:
addressTypeId:
type: integer
example: 1
name:
type: string
example: Shipping
street:
type: string type: string
example: Appelstraat example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers
houseNumber: method:
type: integer
example: 1
houseNumberSuffix:
type: string type: string
example: BS example: GET
postalCode: create_customer_status:
type: object
description: ONLY ALLOWED FOR SMP - Create a new customer status
properties:
href:
type: string type: string
example: 1234AB example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/statuses
city: method:
type: string type: string
example: Den Haag example: POST
country: partial_edit:
type: string
example: NL
_links:
type: object
properties:
self:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/addresses/1
method:
type: string
example: GET
delete_address:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/addresses/1
method:
type: string
example: DELETE
phones:
type: array
items:
type: object type: object
properties: properties:
phoneId: href:
type: integer
example: 1
isPreferred:
type: boolean
example: true
phoneType:
type: object
properties:
phoneTypeId:
type: integer
example: 1
name:
type: string
example: Home
number:
type: string type: string
example: "0123456789" example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers
countryCode: method:
type: string type: string
example: "0031" example: PATCH
_links: get_tokens:
type: object type: object
properties: properties:
self: href:
type: object type: string
properties: example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens
href: method:
type: string type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1 example: GET
method: create_token:
type: string type: object
example: GET properties:
delete_phone: href:
type: object type: string
properties: example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens
href: method:
type: string type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/phones/1 example: POST
method:
type: string
example: DELETE
_links:
type: object
properties:
self:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/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/touchpoint/1.0/customers/statuses
method:
type: string
example: POST
partial_edit:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers
method:
type: string
example: PATCH
get_tokens:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens
method:
type: string
example: GET
create_token:
type: object
properties:
href:
type: string
example: https://api.integratielaag.nl/abt/touchpoint/1.0/customers/tokens
method:
type: string
example: POST
OvPayTokensResponse: OvPayTokensResponse:
type: object type: object
required: required: