HAALCENTRAAL English translation
BRP API / Personen / Features / fields-alias

verblijfplaats - fields alias

#language: en

Feature: verblijfplaats - fields alias

  When a consumer of the BRP API is not authorized to query the fields for a residence abroad
  Then the consumer must use the verblijfplaatsBinnenland fields alias to indicate that it is requesting fields for a domestic residence

Rule: the standard verblijfplaats field paths can be used by a consumer that is authorized to query 'verblijfplaats buitenland' fields

  Scenario Outline: the consumer is authorized for 'verblijfplaats buitenland' and requests the datumVan field of a verblijfplaats buitenland
    Given the consumer with indication '000008' is authorized for 'verblijfplaats' data
    And the person with citizen service number '000000097' has the following 'verblijfplaats' data
    | datum aanvang adres buitenland (13.20) | land adres buitenland (13.10) |
    | 19860801                               | 6014                          |
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000097                       |
    | fields              | <field>                         |
    Then the response has a person with the following 'verblijfplaats' data
    | naam                 | waarde                   |
    | type                 | VerblijfplaatsBuitenland |
    | datumVan.type        | Datum                    |
    | datumVan.datum       | 1986-08-01               |
    | datumVan.langFormaat | 1 augustus 1986          |

    Examples:
    | field                   |
    | verblijfplaats.datumVan |

  Scenario: the consumer is authorized for 'verblijfplaats buitenland' and requests the verblijfadres field of a verblijfplaats
    Given the consumer with indication '000008' is authorized for 'verblijfplaats' data
    And the person with citizen service number '000000097' has the following 'verblijfplaats' data
    | naam                             | waarde                      |
    | land adres buitenland (13.10)    | 6014                        |
    | regel 1 adres buitenland (13.30) | 1600 Pennsylvania Avenue NW |
    | regel 2 adres buitenland (13.40) | Washington, DC 20500        |
    | regel 3 adres buitenland (13.50) | Selangor                    |
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000097                       |
    | fields              | verblijfplaats.verblijfadres    |
    Then the response has a person with the following 'verblijfplaats' data
    | naam | waarde                   |
    | type | VerblijfplaatsBuitenland |
    And the 'verblijfplaats' has the following 'verblijfadres' data
    | naam              | waarde                       |
    | regel1            | 1600 Pennsylvania Avenue NW  |
    | regel2            | Washington, DC 20500         |
    | regel3            | Selangor                     |
    | land.code         | 6014                         |
    | land.omschrijving | Verenigde Staten van Amerika |

  Scenario: the consumer is authorized for 'verblijfplaats buitenland' and requests the land field of the verblijfadres field of a verblijfplaats
    Given the consumer with indication '000008' is authorized for 'verblijfplaats' data
    And the person with citizen service number '000000097' has the following 'verblijfplaats' data
    | naam                             | waarde                      |
    | land adres buitenland (13.10)    | 6014                        |
    | regel 1 adres buitenland (13.30) | 1600 Pennsylvania Avenue NW |
    | regel 2 adres buitenland (13.40) | Washington, DC 20500        |
    | regel 3 adres buitenland (13.50) | Selangor                    |
    When persons are searched with the following parameters
    | naam                | waarde                            |
    | type                | RaadpleegMetBurgerservicenummer   |
    | burgerservicenummer | 000000097                         |
    | fields              | verblijfplaats.verblijfadres.land |
    Then the response has a person with the following 'verblijfplaats' data
    | naam | waarde                   |
    | type | VerblijfplaatsBuitenland |
    And the 'verblijfplaats' has the following 'verblijfadres' data
    | naam              | waarde                       |
    | land.code         | 6014                         |
    | land.omschrijving | Verenigde Staten van Amerika |

Rule: the 'verblijfplaatsBinnenland' fields alias must be used by a consumer that is not authorized to query 'verblijfplaats buitenland' fields

  Scenario: the consumer is not authorized for 'verblijfplaats buitenland' and requests the datumVan field of a verblijfplaats buitenland
    Given the consumer with indication '000008' is authorized for 'verblijfplaats binnenland' data
    And the person with citizen service number '000000097' has the following 'verblijfplaats' data
    | datum aanvang adres buitenland (13.20) | land adres buitenland (13.10) |
    | 19860801                               | 5001                          |
    When persons are searched with the following parameters
    | naam                | waarde                            |
    | type                | RaadpleegMetBurgerservicenummer   |
    | burgerservicenummer | 000000097                         |
    | fields              | verblijfplaatsBinnenland.datumVan |
    Then the response has a person without data

  Scenario: the consumer is not authorized for 'verblijfplaats buitenland' and requests the datumVan field of an adres
    Given the consumer with indication '000008' is authorized for 'verblijfplaats binnenland' data
    And the person with citizen service number '000000097' has the following 'verblijfplaats' data
    | datum aanvang adreshouding (10.30) |
    | 19860801                           |
    And the 'verblijfplaats' has the following 'adres' data
    | naam                 | waarde          |
    | gemeentecode (92.10) | 0518            |
    | straatnaam (11.10)   | Borgesiusstraat |
    When persons are searched with the following parameters
    | naam                | waarde                            |
    | type                | RaadpleegMetBurgerservicenummer   |
    | burgerservicenummer | 000000097                         |
    | fields              | verblijfplaatsBinnenland.datumVan |
    Then the response has a person with the following 'verblijfplaats' data
    | naam                 | waarde          |
    | type                 | Adres           |
    | datumVan.type        | Datum           |
    | datumVan.datum       | 1986-08-01      |
    | datumVan.langFormaat | 1 augustus 1986 |

  Scenario Outline: the consumer is not authorized for 'verblijfplaats buitenland' and requests <omschrijving> of a verblijfplaats buitenland
    Given the consumer with indication '000008' is authorized for 'verblijfplaats binnenland' data
    And the person with citizen service number '000000097' has the following 'verblijfplaats' data
    | datum aanvang adres buitenland (13.20) | land adres buitenland (13.10) |
    | 19860801                               | 5001                          |
    When persons are searched with the following parameters
    | naam                | waarde                          |
    | type                | RaadpleegMetBurgerservicenummer |
    | burgerservicenummer | 000000097                       |
    | fields              | <fields>                        |
    Then the response has a person without data

    Examples:
    | fields                                 | omschrijving              |
    | verblijfplaatsBinnenland               | alle velden               |
    | verblijfplaatsBinnenland.verblijfadres | alle verblijfadres velden |
  
  Scenario: the consumer requests verblijfplaatsBinnenland and adressering, and the person has a foreign verblijfplaats
    Given the person with citizen service number '000000097' has the following 'verblijfplaats' data
    | naam                             | waarde                      |
    | land adres buitenland (13.10)    | 6014                        |
    | regel 1 adres buitenland (13.30) | 1600 Pennsylvania Avenue NW |
    | regel 2 adres buitenland (13.40) | Washington, DC 20500        |
    | regel 3 adres buitenland (13.50) | Selangor                    |
    When persons are searched with the following parameters
    | naam                | waarde                                             |
    | type                | RaadpleegMetBurgerservicenummer                    |
    | burgerservicenummer | 000000097                                          |
    | fields              | adressering,verblijfplaatsBinnenland.verblijfadres |
    Then the response has a person with the following 'adressering' data
    | naam              | waarde                       |
    | adresregel1       | 1600 Pennsylvania Avenue NW  |
    | adresregel2       | Washington, DC 20500         |
    | adresregel3       | Selangor                     |
    | land.code         | 6014                         |
    | land.omschrijving | Verenigde Staten van Amerika |