Skip to content

Releases

v3.0.1

Choose a tag to compare

@klo-chi klo-chi released this 29 Nov 17:25
e6b922d
  • The app is listed in the module registry: its AppConfig sets is_volkanos = True, so django-munin's
    GET /api/munin/v2/ reports it under the key regon_api. Before, the registry left it out although it was
    installed. Its label there and in the Django admin is "Company Registry Lookup" (was "Django_Regon_Api").
  • The lookup routes nip/<nip>/ and regon/<regon>/ check the identifier first: spaces and dashes are removed, then a
    NIP must have 10 digits and a REGON 9 or 14. Anything else answers 400 (data "Invalid NIP" / "Invalid REGON",
    codes 5001 / 5003) without a registry call. A NIP or REGON written with spaces or dashes is now looked up.
  • The lookup routes are throttled per client address, both routes in one bucket: scope regon_lookup_ip in
    REST_FRAMEWORK["DEFAULT_THROTTLE_RATES"], 30/hour when the scope is missing or malformed. Over the limit the
    answer is 429 with Retry-After (meta.status "THROTTLED"). The address comes from
    django_utils.api.client_ip.get_client_ip (CLIENT_IP_HEADER; behind a storefront that proxies the API
    server-side, CLIENT_IP_TRUSTED_PROXIES + CLIENT_IP_FORWARDED_HEADER give each visitor its own bucket).
  • Requires entirius-django-utils>=2.4.2 (was >=2.0.0) for that helper.
  • The lookup routes answer through the Django cache (GET_GOV_DATA_CACHE_TIMEOUT): a repeated NIP or REGON is
    served without a registry call. raw_gus_data answers are cached under their own key. The answer of a first lookup
    is unchanged; failed lookups are not cached.
  • New output.search_gov_registry(kind, number, raw=False): the cached VAT registry lookup behind the routes and
    get_nip_from_gov (same cache key as before for NIP).

3.0.0

Choose a tag to compare

@zolvio zolvio released this 31 Jul 13:32

Initial public release.