Dokumentacja
Kontakt z pomocą ↗
Baza wiedzy / Kontrahenci — zapis / customers.create
WAPRO API v2

customers.create

Tworzy kontrahenta. Identyfikator może być NIP, PESEL albo NONE.

ZAPISPOST/v2/connect.php

Nagłówki

HTTP
Authorization: Bearer rvn_api_TUTAJ_WPROWADZ_KLUCZ
Content-Type: application/json
Idempotency-Key: integracja-unikalny-klucz-001

Request

json
{
  "method": "customers.create",
  "company_id": 1,
  "name": "API FIRMA 001",
  "full_name": "API FIRMA 001 Sp. z o.o.",
  "identifier": {
    "type": "NIP",
    "value": "8567346215"
  },
  "regon": "",
  "postal_code": "00-001",
  "city": "Warszawa",
  "street": "Testowa 1",
  "province": "mazowieckie",
  "email": "[email protected]",
  "phone": "+48123456789",
  "website": "https://example.com",
  "country_code": "PL",
  "classification_id": 0,
  "group_id": 0,
  "receiver": true,
  "supplier": false,
  "vat_payer": true,
  "payment_method": "Przelew",
  "payment_days": 14,
  "notes": "Kontrahent utworzony przez API",
  "external_reference": "ERP-CLIENT-001",
  "b2b_available": false,
  "blocked": false,
  "field1": "API"
}

Przykładowa odpowiedź

json
{
  "ok": true,
  "data": {
    "customer_id": 209,
    "customer_code": "API",
    "identifier_type": "NIP",
    "identifier_value": "8567346215",
    "nip": "8567346215",
    "pesel": "44051401458",
    "name": "Przykładowa nazwa"
  },
  "trace_id": "api_demo_001"
}

Najważniejsze pola odpowiedzi

  • data.customer_id
  • data.customer_code
  • data.identifier_type
  • data.identifier_value
  • data.nip
  • data.pesel
  • data.name
Legacy tax_id jest obsługiwane jako alias NIP, ale nowe integracje powinny używać identifier.