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
CustomersResponse: CustomersResponseList:
type: object type: object
properties: properties:
customerProfileId: customers:
type: integer type: array
example: 1 items:
customerNumber: $ref: "#/components/schemas/CustomersResponse"
type: integer CustomersResponse:
example: 1000001 type: object
customerStatus: properties:
type: object customerProfileId:
properties: type: integer
customerStatusId: example: 1
type: integer customerNumber:
example: 1 type: integer
name: example: 1000001
type: string customerStatus:
example: Active type: object
debtorNumber: properties:
type: string customerStatusId:
example: DB100001 type: integer
debtorStatus: example: 1
type: object name:
properties: type: string
debtorStatusId: example: Active
type: integer debtorNumber:
example: 1 type: string
name: example: DB100001
type: string debtorStatus:
example: Active type: object
person: properties:
type: object debtorStatusId:
properties: type: integer
prefix: example: 1
type: string name:
example: Mr type: string
birthname: example: Active
type: string person:
example: John type: object
surname: properties:
type: string prefix:
example: Doe type: string
suffix: example: Mr
type: string birthname:
example: Jr. type: string
dateOfBirth: example: John
type: string surname:
format: date type: string
example: "2023-02-01" example: Doe
emailAddress: suffix:
type: string type: string
format: email example: Jr.
example: 4j2dD@example.com dateOfBirth:
addresses: type: string
type: array format: date
items: example: "2023-02-01"
emailAddress:
type: string
format: email
example: 4j2dD@example.com
addresses:
type: array
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: