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

maximum number of search results for ZoekMetStraatHuisnummerEnGemeenteVanInschrijving

#language: en

@gba
Feature: maximum number of search results for ZoekMetStraatHuisnummerEnGemeenteVanInschrijving

  Background:
      Given an address has the following data
      | gemeentecode (92.10) | straatnaam (11.10) | huisnummer (11.20) | huisletter (11.30) |
      | 0599                 | Afrikanerplein     | 2                  | A                  |
      And the person with citizen service number '000000001' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000002' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000003' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000004' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000005' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000006' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000007' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000008' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000009' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000010' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      And the person with citizen service number '000000011' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
      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) |
      | 0599                              |
      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) | straatnaam (11.10) | huisnummer (11.20) | huisletter (11.30) |
      | 0599                 | Afrikanerplein     | 2                  | B                  |
      And the person with citizen service number '000000013' is registered at the address with the following data
      | gemeente van inschrijving (09.10) |
      | 0599                              |
    

  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                    | ZoekMetStraatHuisnummerEnGemeenteVanInschrijving |
      | gemeenteVanInschrijving | 0599                                             |
      | straat                  | Afrikanerplein                                   |
      | huisnummer              | 2                                                |
      | 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: A narrowed 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                       | ZoekMetStraatHuisnummerEnGemeenteVanInschrijving |
      | gemeenteVanInschrijving    | 0599                                             |
      | straat                     | Afrikanerplein                                   |
      | huisnummer                 | 2                                                |
      | huisletter                 | A                                                |
      | 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                       | ZoekMetStraatHuisnummerEnGemeenteVanInschrijving |
      | gemeenteVanInschrijving    | 0599                                             |
      | straat                     | Afrikanerplein                                   |
      | huisnummer                 | 2                                                |
      | huisletter                 | A                                                |
      | 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                                            |