Fakturnia Developers Quickstart API reference Polski

Company lookup by NIP

The /company/nip-lookup endpoint fetches Polish company data from the GUS registry. Use it to auto-fill client details or the buyer when creating a document, instead of asking the user to retype everything.

Required scope: gus:company:read.

Lookup

curl -s "https://prod.api.fakturnia.pl/external/v1/company/nip-lookup?nip=5252248481" \
  -H "Authorization: Bearer $TOKEN"

Pass the NIP as 10 digits. Dashes and spaces are ignored, so 525-224-84-81 works too.

{
  "success": true,
  "data": {
    "company": {
      "nip": "5252248481",
      "name": "PRZYKLAD SPOLKA Z OGRANICZONA ODPOWIEDZIALNOSCIA",
      "regon": "146061343",
      "street": "ul. Prosta 1 lok. 2",
      "postcode": "00-001",
      "city": "Warszawa",
      "country": "Polska",
      "countryCode": "PL"
    }
  }
}

Errors

Status Code Meaning
400 INVALID_NIP the NIP is not 10 digits
404 COMPANY_NOT_FOUND no company with this NIP in the GUS registry

Typical flow

  1. The user enters a NIP in your form.
  2. You call nip-lookup and pre-fill the form with the returned data.
  3. On confirmation you create a client or pass the buyer details directly in POST /documents.

The data comes from a public registry and is a convenience: let the user correct it before issuing an invoice. Also remember that sending to KSeF requires the buyer's full address.