HAALCENTRAAL English translation
BRP API / Personen / Features / zoek-fout-cases

Searching

#language: en

Feature: Searching

Rule: A valid search type must be supplied

  @fout-case
  Scenario: searching without supplying parameters
    When persons are searched with the following parameters
    | naam | waarde |
    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    | Een of meerdere parameters zijn niet correct.               |
    | status   | 400                                                         |
    | detail   | De foutieve parameter(s) zijn: type.                        |
    | code     | paramsValidation                                            |
    | instance | /haalcentraal/api/brp/personen                              |
    And the object has the following 'invalidParams' data
    | code     | name | reason                  |
    | required | type | Parameter is verplicht. |

  @fout-case
  Scenario: searching without supplying the 'type' parameter
    When persons are searched with the following parameters
    | naam     | waarde |
    | postcode | 3077AW |
    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    | Een of meerdere parameters zijn niet correct.               |
    | status   | 400                                                         |
    | detail   | De foutieve parameter(s) zijn: type.                        |
    | code     | paramsValidation                                            |
    | instance | /haalcentraal/api/brp/personen                              |
    And the object has the following 'invalidParams' data
    | code     | name | reason                  |
    | required | type | Parameter is verplicht. |

  @fout-case
  Scenario: searching with an empty type
    When persons are searched with the following parameters
    | naam | waarde |
    | type |        |
    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    | Een of meerdere parameters zijn niet correct.               |
    | status   | 400                                                         |
    | detail   | De foutieve parameter(s) zijn: type.                        |
    | code     | paramsValidation                                            |
    | instance | /haalcentraal/api/brp/personen                              |
    And the object has the following 'invalidParams' data
    | code  | name | reason                           |
    | value | type | Waarde is geen geldig zoek type. |

  @fout-case
  Scenario Outline: searching with an invalid type value
    When persons are searched with the following parameters
    | naam | waarde |
    | type | <type> |
    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    | Een of meerdere parameters zijn niet correct.               |
    | status   | 400                                                         |
    | detail   | De foutieve parameter(s) zijn: type.                        |
    | code     | paramsValidation                                            |
    | instance | /haalcentraal/api/brp/personen                              |
    And the object has the following 'invalidParams' data
    | code  | name | reason                           |
    | value | type | Waarde is geen geldig zoek type. |

    Examples:
    | omschrijving               | type                                |
    | ongeldig zoek type         | OnbekendZoekType                    |
    | type voldoet niet aan case | zoekmetgeslachtsnaamengeboortedatum |


Rule: only application/json and charset utf-8 are supported as the content type for the response

  @fout-case
  Scenario: The Accept content type requested is not supported
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 999999321                       |
    | fields              | burgerservicenummer             |
    | header: Accept      | application/xml                 |
    Then the response has an object with the following data
    | naam     | waarde                                                      |
    | type     | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.6 |
    | title    | Gevraagde content type wordt niet ondersteund.               |
    | detail   | Ondersteunde content type: application/json; charset=utf-8.  |
    | code     | notAcceptable                                               |
    | status   | 406                                                         |
    | instance | /haalcentraal/api/brp/personen                              |

  Scenario Outline: '<accept media type>' is supported as an Accept content type
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000024                       |
    | fields              | burgerservicenummer             |
    | header: Accept      | <accept media type>             |
    Then the response has 0 persons

    Examples:
    | accept media type               |
    | */*                             |
    | */*; charset=utf-8              |
    | */*;charset=utf-8               |
    | application/json                |
    | application/json; charset=utf-8 |
    | application/json;charset=utf-8  |
    | */*;charset=UTF-8               |
    | application/json;charset=Utf-8  |
    | application/json; charset=UTF-8 |


Rule: only application/json and charset utf-8 are supported as the content type for the request

  Scenario Outline: '<media type>' is supported as a Content-Type value
    When persons are searched with the following parameters
    | naam                 | waarde                          |
    | type                 | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer  | 000000024                       |
    | fields               | burgerservicenummer             |
    | header: Content-Type | <media type>                    |
    Then the response has 0 persons

    Examples:
    | media type                      |
    | application/json                |
    | application/json;charset=utf-8  |
    | application/json; charset=utf-8 |
    | application/json;charset=Utf-8  |
    | application/json; charset=UTF-8 |

  Scenario Outline: '<media type>' is supported as a Content-Type value when searching
    When persons are searched with the following parameters
    | naam                 | waarde                              |
    | type                 | ZoekMetGeslachtsnaamEnGeboortedatum |
    | geslachtsnaam        | brănduş-dendyuk                     |
    | geboortedatum        | 1983-05-26                          |
    | voornamen            | Kuşan                               |
    | fields               | burgerservicenummer                 |
    | header: Content-Type | <media type>                        |
    Then the response has 0 persons

    Examples:
    | media type                      |
    | application/json                |
    | application/json;charset=utf-8  |
    | application/json; charset=utf-8 |
    | application/json;charset=Utf-8  |
    | application/json; charset=UTF-8 |

  @fout-case
  Scenario Outline: '<media type>' is not supported as a Content-Type value
    When persons are searched with the following parameters
    | naam                 | waarde                          |
    | type                 | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer  | 999999321                       |
    | fields               | burgerservicenummer             |
    | header: Content-Type | <media type>                    |
    Then the response has an object with the following data
    | naam     | waarde                                                       |
    | type     | https://datatracker.ietf.org/doc/html/rfc7231#section-6.5.13 |
    | title    | Media Type wordt niet ondersteund.                           |
    | detail   | Ondersteunde content type: application/json; charset=utf-8.   |
    | code     | unsupportedMediaType                                         |
    | status   | 415                                                          |
    | instance | /haalcentraal/api/brp/personen                               |

    Examples:
    | media type                       |
    | application/xml                  |
    | text/csv                         |
    | application/json; charset=cp1252 |
    | */*                              |
    | */*; charset=utf-8               |
    | */*;charset=utf-8                |


Rule: the content type for the response is application/json and charset utf-8 by default

  Scenario: An empty Accept content type is supported
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000024                       |
    | fields              | burgerservicenummer             |
    | header: Accept      |                                 |
    Then the response has 0 persons


Rule: the content type for the request is application/json and charset utf-8 by default

  Scenario: An empty Content-Type is supported
    When persons are searched with the following parameters
    | naam                 | waarde                          |
    | type                 | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer  | 000000024                       |
    | fields               | burgerservicenummer             |
    | header: Content-Type |                                 |
    Then the response has 0 persons

  Scenario: An empty Content-Type is supported when searching
    When persons are searched with the following parameters
    | naam                 | waarde                              |
    | type                 | ZoekMetGeslachtsnaamEnGeboortedatum |
    | geslachtsnaam        | brănduş-dendyuk                     |
    | geboortedatum        | 1983-05-26                          |
    | voornamen            | Kuşan                               |
    | fields               | burgerservicenummer                 |
    | header: Content-Type |                                     |
    Then the response has 0 persons