HAAL✻CENTRAAL English translation
BRP API / Personen / Features / maximaal-aantal-zoekresultaten-gba

maximum number of search results for ZoekMetAdresseerbaarObjectIdentificatie

#language: en

@gba
Feature: maximum number of search results for ZoekMetAdresseerbaarObjectIdentificatie

    Background:
      Given an address has the following data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0800                 | 0800010051001502                         |
      And the person with citizen service number '000000001' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000002' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000003' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000004' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000005' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000006' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000007' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000008' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000009' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000010' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000011' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person has the following 'inschrijving' data
      | naam                                 | waarde |
      | reden opschorting bijhouding (67.20) | O      |
      And the person with citizen service number '000000012' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person has the following 'inschrijving' data
      | naam                                 | waarde |
      | reden opschorting bijhouding (67.20) | F      |
      And an address has the following data
      | gemeentecode (92.10) | identificatiecode verblijfplaats (11.80) |
      | 0800                 | 0800010000617228                         |
      And the person with citizen service number '000000021' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000022' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000023' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000024' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000025' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000026' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000027' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000028' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000029' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000030' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |
      And the person with citizen service number '000000031' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0800                              |


  Rule: Where more than 10 persons are found when searching, an error message is given

    @fout-case
    Scenario: More than 10 persons found
      When gba persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0800010000617228                        |
      | fields                           | burgerservicenummer                     |
      Then the response has an object with the following data
      | naam     | waarde                                                                    |
      | type     | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1               |
      | title    | Teveel zoekresultaten.                                                    |
      | status   | 400                                                                       |
      | detail   | Meer dan maximum van 10 zoekresultaten gevonden. Verfijn de zoekopdracht. |
      | code     | tooManyResults                                                            |
      | instance | /haalcentraal/api/brp/personen                                            |

    Scenario: The search finds exactly 10 persons, because deceased persons and removed personal records are not supplied
      When gba persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0800010051001502                        |
      | fields                           | burgerservicenummer                     |
      Then the response has 10 persons

    @fout-case
    Scenario: More than 10 persons, because deceased persons were searched for as well
      When gba persons are searched with the following parameters
      | naam                             | waarde                                  |
      | type                             | ZoekMetAdresseerbaarObjectIdentificatie |
      | adresseerbaarObjectIdentificatie | 0800010051001502                        |
      | inclusiefOverledenPersonen       | true                                    |
      | fields                           | burgerservicenummer                     |
      Then the response has an object with the following data
      | naam     | waarde                                                                    |
      | type     | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.1               |
      | title    | Teveel zoekresultaten.                                                    |
      | status   | 400                                                                       |
      | detail   | Meer dan maximum van 10 zoekresultaten gevonden. Verfijn de zoekopdracht. |
      | code     | tooManyResults                                                            |
      | instance | /haalcentraal/api/brp/personen                                            |