WPV
Pobieranie wielu rekordów
Sprawdza wiele firm jednym wywołaniem. Każdy wpis w wejściu konsumuje 1 jednostkę dziennego limitu Biała Lista VAT. Zwraca listę wyników w tej samej kolejności co dane wejściowe.
POST
/
v1
/
wpv
/
records
Pobieranie wielu rekordów
curl --request POST \
--url https://api.krdata.pl/v1/wpv/records \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"identifiers": [
{
"nip": "<string>",
"krs": "<string>"
}
]
}
'import requests
url = "https://api.krdata.pl/v1/wpv/records"
payload = { "identifiers": [
{
"nip": "<string>",
"krs": "<string>"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({identifiers: [{nip: '<string>', krs: '<string>'}]})
};
fetch('https://api.krdata.pl/v1/wpv/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.krdata.pl/v1/wpv/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identifiers' => [
[
'nip' => '<string>',
'krs' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.krdata.pl/v1/wpv/records"
payload := strings.NewReader("{\n \"identifiers\": [\n {\n \"nip\": \"<string>\",\n \"krs\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.krdata.pl/v1/wpv/records")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"identifiers\": [\n {\n \"nip\": \"<string>\",\n \"krs\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.krdata.pl/v1/wpv/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identifiers\": [\n {\n \"nip\": \"<string>\",\n \"krs\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"identifiers": {
"krs": "<string>",
"nip": "<string>",
"regon": "<string>",
"registry_type": "<string>"
},
"found": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"subject": {
"name": "<string>",
"nip": "<string>",
"status_vat": "<string>",
"krs": "<string>",
"regon": "<string>",
"pesel": "<string>",
"working_address": "<string>",
"residence_address": "<string>",
"account_numbers": [
"<string>"
],
"has_virtual_accounts": false,
"registration_legal_date": "2023-12-25",
"registration_denial_date": "2023-12-25",
"registration_denial_basis": "<string>",
"restoration_date": "2023-12-25",
"restoration_basis": "<string>",
"removal_date": "2023-12-25",
"removal_basis": "<string>",
"representatives": [
{}
],
"authorized_clerks": [
{}
],
"partners": [
{}
]
},
"request_id": "<string>",
"request_datetime": "2023-11-07T05:31:56Z",
"metadata": {
"first_seen": "2023-11-07T05:31:56Z",
"last_updated": "2023-11-07T05:31:56Z",
"source_updated_at": "2023-11-07T05:31:56Z"
}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}⌘I
Pobieranie wielu rekordów
curl --request POST \
--url https://api.krdata.pl/v1/wpv/records \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"identifiers": [
{
"nip": "<string>",
"krs": "<string>"
}
]
}
'import requests
url = "https://api.krdata.pl/v1/wpv/records"
payload = { "identifiers": [
{
"nip": "<string>",
"krs": "<string>"
}
] }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({identifiers: [{nip: '<string>', krs: '<string>'}]})
};
fetch('https://api.krdata.pl/v1/wpv/records', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.krdata.pl/v1/wpv/records",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'identifiers' => [
[
'nip' => '<string>',
'krs' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.krdata.pl/v1/wpv/records"
payload := strings.NewReader("{\n \"identifiers\": [\n {\n \"nip\": \"<string>\",\n \"krs\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.krdata.pl/v1/wpv/records")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"identifiers\": [\n {\n \"nip\": \"<string>\",\n \"krs\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.krdata.pl/v1/wpv/records")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"identifiers\": [\n {\n \"nip\": \"<string>\",\n \"krs\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"identifiers": {
"krs": "<string>",
"nip": "<string>",
"regon": "<string>",
"registry_type": "<string>"
},
"found": true,
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"subject": {
"name": "<string>",
"nip": "<string>",
"status_vat": "<string>",
"krs": "<string>",
"regon": "<string>",
"pesel": "<string>",
"working_address": "<string>",
"residence_address": "<string>",
"account_numbers": [
"<string>"
],
"has_virtual_accounts": false,
"registration_legal_date": "2023-12-25",
"registration_denial_date": "2023-12-25",
"registration_denial_basis": "<string>",
"restoration_date": "2023-12-25",
"restoration_basis": "<string>",
"removal_date": "2023-12-25",
"removal_basis": "<string>",
"representatives": [
{}
],
"authorized_clerks": [
{}
],
"partners": [
{}
]
},
"request_id": "<string>",
"request_datetime": "2023-11-07T05:31:56Z",
"metadata": {
"first_seen": "2023-11-07T05:31:56Z",
"last_updated": "2023-11-07T05:31:56Z",
"source_updated_at": "2023-11-07T05:31:56Z"
}
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}