Przejdź do treści
InvoiceIQ Faktury i KSeF

Publiczne API v0.3.0-preview.1 · OpenAPI 3.1.2

Publiczne API v1

Dokumentacja jest dostępna publicznie. Dostęp przedpremierowy do kont i integracji wymaga zaproszenia. Rzeczywiste fakturowanie i wysyłka do KSeF nie są jeszcze udostępnione.

Wersjonowany kontrakt dla dowolnego klienta InvoiceIQ. Bieżący kontrakt zawiera 50 operacji klienckich (wdrożonych, częściowych lub jawnie planowanych) i 24 granularnych scope’ów.

Wersja ma status partial-business-runtime. Operacje wysokiego ryzyka nie stają się automatyczne: wystawienie, wysłanie do KSeF i ponowienie KSeF wymagają osobnych, świeżych akceptacji użytkownika.

OAuth 2.0

Token
/oauth/token
600 s
Granty
authorization_code, client_credentials, refresh_token
Uwierzytelnienie klienta
client_secret_basic, client_secret_post
PKCE
S256 zalecane

Token jest przyjmowany wyłącznie w nagłówku Authorization: Bearer …. Klient jest po stronie serwera przypisany do jednej organizacji; payload nie wybiera tenanta ani roli. Sekret klienta jest pokazywany tylko raz, podlega rotacji i revoke.

Metadata: authorization server · protected resource

Scope’y

artifacts:read
List metadata and create authorized artifact links.
customers:read
Read tenant-owned customers.
customers:write
Create and append customer versions.
invoice-approvals:read
Read hosted confirmation status.
invoice-approvals:request
Request hosted human confirmation.
invoice-correction-approvals:read
Read hosted correction confirmation status.
invoice-correction-approvals:request
Request hosted correction confirmations.
invoice-correction-artifacts:read
Read correction artifact metadata and request private links.
invoice-correction-ksef-submissions:read
Read and reconcile correction KSeF submission state.
invoice-correction-ksef-submissions:retry
Request an approved manual correction retry.
invoice-correction-ksef-submissions:send
Start an approved online correction submission.
invoice-corrections:issue
Finalize one exact approved correction draft.
invoice-corrections:read
Read correction processes, drafts, previews and immutable candidates.
invoice-corrections:write
Start correction processes and append correction draft versions.
invoice-drafts:read
Read tenant-owned invoice drafts.
invoice-drafts:write
Create and append invoice draft versions.
invoice-previews:read
Build deterministic invoice previews.
invoices:issue
Finalize one exact approved draft.
invoices:read
Read invoice status and immutable metadata.
ksef-submissions:read
Read safe KSeF submission status.
ksef-submissions:retry
Request an approved retry or reconciliation.
ksef-submissions:send
Start transport after a separate hosted approval.
webhook-endpoints:read
Read endpoint and delivery metadata.
webhook-endpoints:write
Manage endpoints, secret rotation and replay.

Operacje

MetodaŚcieżkaOperation IDStatusScopeSemantyka
GET /.well-known/oauth-authorization-server getAuthorizationServerMetadata implemented public metadata Read authorization server metadata
GET /.well-known/oauth-protected-resource getProtectedResourceMetadata implemented public metadata Read protected resource metadata
GET /api/v1/customers listCustomers implemented customers:read List customers
POST /api/v1/customers createCustomer implemented customers:write Create a customer · Idempotency-Key
GET /api/v1/customers/{customer_id} getCustomer implemented customers:read Read a customer
PATCH /api/v1/customers/{customer_id} updateCustomer implemented customers:write Update a customer · Idempotency-Key
GET /api/v1/invoice-drafts listInvoiceDrafts implemented invoice-drafts:read List invoice drafts
POST /api/v1/invoice-drafts createInvoiceDraft implemented invoice-drafts:write Create an invoice draft · Idempotency-Key
GET /api/v1/invoice-drafts/{draft_id} getInvoiceDraft implemented invoice-drafts:read Read an invoice draft
PATCH /api/v1/invoice-drafts/{draft_id} updateInvoiceDraft implemented invoice-drafts:write Replace draft business input · Idempotency-Key
POST /api/v1/invoice-drafts/{draft_id}/validation validateInvoiceDraft implemented invoice-drafts:read Validate an exact draft version · Idempotency-Key
POST /api/v1/invoice-drafts/{draft_id}/previews createInvoicePreview implemented invoice-previews:read Build an exact invoice preview · Idempotency-Key
POST /api/v1/invoice-approval-intents createInvoiceApprovalIntent implemented invoice-approvals:request Create a hosted approval intent · Idempotency-Key
GET /api/v1/invoice-approval-intents/{approval_intent_id} getInvoiceApprovalIntent implemented invoice-approvals:read Read approval intent status
GET /api/v1/invoices listInvoices implemented invoices:read List invoices
POST /api/v1/invoices issueInvoice implemented invoices:issue Issue an invoice · Idempotency-Key
GET /api/v1/invoices/{invoice_id} getInvoice implemented invoices:read Read invoice status
POST /api/v1/ksef-submissions createKsefSubmission implemented ksef-submissions:send Start an approved KSeF submission · Idempotency-Key
GET /api/v1/ksef-submissions/{submission_id} getKsefSubmission implemented ksef-submissions:read Read KSeF submission status
POST /api/v1/ksef-submissions/{submission_id}/retries retryKsefSubmission implemented ksef-submissions:retry Request an approved KSeF retry · Idempotency-Key
GET /api/v1/invoices/{invoice_id}/artifacts listInvoiceArtifacts implemented artifacts:read List invoice artifact metadata
POST /api/v1/artifacts/{artifact_id}/download-links createArtifactDownloadLink implemented artifacts:read Create a short-lived artifact link · Idempotency-Key
GET /api/v1/invoice-correction-processes listInvoiceCorrectionProcesses implemented invoice-corrections:read List invoice-correction processes
POST /api/v1/invoice-correction-processes createInvoiceCorrectionProcess implemented invoice-corrections:write Start an invoice-correction process · Idempotency-Key
GET /api/v1/invoice-correction-processes/reconciliation reconcileInvoiceCorrectionProcess implemented invoice-corrections:read Reconcile a correction journey by external reference
GET /api/v1/invoice-correction-processes/{process_id} getInvoiceCorrectionProcess implemented invoice-corrections:read Read an invoice-correction process
POST /api/v1/invoice-correction-processes/{process_id}/drafts createInvoiceCorrectionDraft implemented invoice-corrections:write Create an invoice-correction draft · Idempotency-Key
GET /api/v1/invoice-correction-processes/{process_id}/drafts/{draft_id} getInvoiceCorrectionDraft implemented invoice-corrections:read Read an invoice-correction draft
PATCH /api/v1/invoice-correction-processes/{process_id}/drafts/{draft_id} updateInvoiceCorrectionDraft implemented invoice-corrections:write Append an invoice-correction draft version · Idempotency-Key
POST /api/v1/invoice-correction-processes/{process_id}/drafts/{draft_id}/previews createInvoiceCorrectionPreview implemented invoice-corrections:read Create a deterministic invoice-correction preview · Idempotency-Key
POST /api/v1/invoice-correction-approval-intents createInvoiceCorrectionApprovalIntent implemented invoice-correction-approvals:request Request a hosted correction approval · Idempotency-Key
GET /api/v1/invoice-correction-approval-intents/{approval_intent_id} getInvoiceCorrectionApprovalIntent implemented invoice-correction-approvals:read Read a correction approval intent
GET /api/v1/invoice-corrections listInvoiceCorrections implemented invoice-corrections:read List immutable invoice corrections
POST /api/v1/invoice-corrections finalizeInvoiceCorrection implemented invoice-corrections:issue Finalize an approved invoice correction · Idempotency-Key
GET /api/v1/invoice-corrections/{correction_id} getInvoiceCorrection implemented invoice-corrections:read Read an immutable invoice correction
POST /api/v1/invoice-correction-ksef-submissions createInvoiceCorrectionKsefSubmission implemented invoice-correction-ksef-submissions:send Create an approved correction KSeF submission · Idempotency-Key
GET /api/v1/invoice-correction-ksef-submissions/{submission_id} getInvoiceCorrectionKsefSubmission implemented invoice-correction-ksef-submissions:read Read a correction KSeF submission
POST /api/v1/invoice-correction-ksef-submissions/{submission_id}/reconciliations reconcileInvoiceCorrectionKsefSubmission implemented invoice-correction-ksef-submissions:read Reconcile an uncertain correction KSeF result · Idempotency-Key
POST /api/v1/invoice-correction-ksef-submissions/{submission_id}/retries retryInvoiceCorrectionKsefSubmission implemented invoice-correction-ksef-submissions:retry Request an approved manual correction KSeF retry · Idempotency-Key
GET /api/v1/invoice-corrections/{correction_id}/artifacts listInvoiceCorrectionArtifacts implemented invoice-correction-artifacts:read List correction artifact metadata
POST /api/v1/invoice-corrections/{correction_id}/artifacts/{artifact_id}/download-links createInvoiceCorrectionArtifactDownloadLink implemented invoice-correction-artifacts:read Create a short-lived correction artifact link · Idempotency-Key
GET /api/v1/webhook-endpoints listWebhookEndpoints implemented webhook-endpoints:read List webhook endpoints
POST /api/v1/webhook-endpoints createWebhookEndpoint implemented webhook-endpoints:write Create a webhook endpoint · Idempotency-Key
GET /api/v1/webhook-endpoints/{webhook_endpoint_id} getWebhookEndpoint implemented webhook-endpoints:read Read a webhook endpoint
PATCH /api/v1/webhook-endpoints/{webhook_endpoint_id} updateWebhookEndpoint implemented webhook-endpoints:write Update a webhook endpoint · Idempotency-Key
DELETE /api/v1/webhook-endpoints/{webhook_endpoint_id} revokeWebhookEndpoint implemented webhook-endpoints:write Revoke a webhook endpoint · Idempotency-Key
POST /api/v1/webhook-endpoints/{webhook_endpoint_id}/secret-rotations rotateWebhookEndpointSecret implemented webhook-endpoints:write Rotate a webhook secret · Idempotency-Key
GET /api/v1/webhook-deliveries listWebhookDeliveries implemented webhook-endpoints:read List webhook deliveries
GET /api/v1/webhook-deliveries/{webhook_delivery_id} getWebhookDelivery implemented webhook-endpoints:read Read a webhook delivery
POST /api/v1/webhook-deliveries/{webhook_delivery_id}/replays replayWebhookDelivery implemented webhook-endpoints:write Replay a webhook delivery · Idempotency-Key

Reguły integracji

Bezpieczne przykłady kontraktu

AuthorizationServerMetadataExample

Synthetic deployment metadata

{
    "issuer": "https://invoiceiq.invalid",
    "authorization_endpoint": "https://invoiceiq.invalid/oauth/authorize",
    "token_endpoint": "https://invoiceiq.invalid/oauth/token",
    "grant_types_supported": [
        "authorization_code",
        "client_credentials",
        "refresh_token"
    ],
    "response_types_supported": [
        "code"
    ],
    "code_challenge_methods_supported": [
        "plain",
        "S256"
    ],
    "token_endpoint_auth_methods_supported": [
        "client_secret_basic",
        "client_secret_post"
    ],
    "scopes_supported": [
        "customers:read",
        "customers:write",
        "invoice-drafts:read",
        "invoice-drafts:write",
        "invoice-previews:read",
        "invoice-approvals:request",
        "invoice-approvals:read",
        "invoice-correction-approvals:read",
        "invoice-correction-approvals:request",
        "invoice-correction-artifacts:read",
        "invoice-correction-ksef-submissions:read",
        "invoice-correction-ksef-submissions:retry",
        "invoice-correction-ksef-submissions:send",
        "invoice-corrections:issue",
        "invoice-corrections:read",
        "invoice-corrections:write",
        "invoices:read",
        "invoices:issue",
        "ksef-submissions:read",
        "ksef-submissions:send",
        "ksef-submissions:retry",
        "artifacts:read",
        "webhook-endpoints:read",
        "webhook-endpoints:write"
    ]
}

ProtectedResourceMetadataExample

Synthetic protected-resource metadata

{
    "resource": "https://invoiceiq.invalid/api/v1",
    "authorization_servers": [
        "https://invoiceiq.invalid"
    ],
    "scopes_supported": [
        "customers:read",
        "customers:write",
        "invoice-drafts:read",
        "invoice-drafts:write",
        "invoice-previews:read",
        "invoice-approvals:request",
        "invoice-approvals:read",
        "invoice-correction-approvals:read",
        "invoice-correction-approvals:request",
        "invoice-correction-artifacts:read",
        "invoice-correction-ksef-submissions:read",
        "invoice-correction-ksef-submissions:retry",
        "invoice-correction-ksef-submissions:send",
        "invoice-corrections:issue",
        "invoice-corrections:read",
        "invoice-corrections:write",
        "invoices:read",
        "invoices:issue",
        "ksef-submissions:read",
        "ksef-submissions:send",
        "ksef-submissions:retry",
        "artifacts:read",
        "webhook-endpoints:read",
        "webhook-endpoints:write"
    ],
    "bearer_methods_supported": [
        "header"
    ]
}

CustomerCreateRequestExample

Synthetic Polish buyer

{
    "name": "Synthetic Buyer sp. z o.o.",
    "tax_identifier": "9999999999",
    "address": {
        "country_code": "PL",
        "address_line_1": "00-001 Synthetic City, Testowa 1"
    },
    "external_system": "synthetic_erp",
    "external_reference": "customer/SYN-0001"
}

CustomerCollectionExample

One-item synthetic customer page

{
    "data": [
        {
            "id": "0198a9c0-7000-7000-8000-000000000001",
            "type": "customer",
            "version": 1,
            "name": "Synthetic Buyer sp. z o.o.",
            "external_system": "synthetic_erp",
            "external_reference": "customer/SYN-0001",
            "lifecycle_status": "active",
            "meta": {
                "created_at": "2026-08-17T10:15:30Z",
                "updated_at": "2026-08-17T10:15:30Z"
            }
        }
    ],
    "meta": {
        "correlation_id": "0198a9c0-7000-7000-8000-000000000010",
        "page": {
            "limit": 25,
            "has_more": false
        }
    },
    "links": {
        "self": "/api/v1/customers?limit=25"
    }
}

BadRequestErrorExample

Malformed protocol input

{
    "error": {
        "code": "bad_request",
        "message": "The request could not be parsed.",
        "correlation_id": "0198a9c0-7000-7000-8000-000000000010"
    }
}