Migration from v1
This guide covers the main changes between the legacy API at api.spaceinvoices.com/v1 and the new API at eu.spaceinvoices.com. It’s intended to help existing v1 users understand what’s different and plan their migration.
Base URL
| v1 | v2 | |
|---|---|---|
| Base URL | https://api.spaceinvoices.com/v1 | https://eu.spaceinvoices.com |
v2 endpoints have no version prefix in the path.
Authentication
v1 used “launch codes” (access tokens) obtained through OAuth-style login. v2 uses Bearer token API keys that you generate from the dashboard.
| v1 | v2 | |
|---|---|---|
| Method | Launch codes / Access tokens | API keys (Authorization: Bearer sk_...) |
| Key types | Single token type | Sandbox (sk_sandbox_*) and Live (sk_live_*) |
| Entity keys | N/A | Entity-scoped keys (ek_*) |
See Authentication for full details.
Terminology Changes
Many concepts have been renamed to be clearer:
| v1 | v2 |
|---|---|
| Account | User |
| Organization | Entity |
| Client | Customer |
| Access Token / Launch Code | API Key |
Document (type: invoice) | Invoice (separate resource) |
Document (type: estimate) | Estimate (separate resource) |
Document (type: credit-note) | Credit Note (separate resource) |
Document (type: advance) | Advance Invoice (separate resource) |
| Default (separate resource) | Entity Settings (built into entity) |
Subscription and Category Migration
v1 documentCategories do not map to a document-level field in v2. In v2, reporting categories are assigned to document lines:
- Use
items[].financial_category_idwhen you know the category while building the invoice. - Use
category_assignmentswhen assigning categories by zero-based request item index. - Use line-level
revenue_recognitionwithmethod: "service_period_daily"when a subscription invoice should be recognized over a service period instead of entirely on the invoice date.
For example, a v1 monthly subscription invoice with a document category should become a v2 invoice line with a subscription financial category and revenue_recognition.date_from / date_to covering the subscription period.
Endpoint Structure
v1 scoped resources under organization IDs in the URL path. v2 uses flat top-level paths and passes the entity ID via a header instead.
# v1GET /v1/organizations/:orgId/documentsPOST /v1/organizations/:orgId/documents
# v2 (entity ID passed via header)GET /invoicesPOST /invoicesGET /estimatesGET /credit-notesIn v2, set the x-entity-id header to scope requests to a specific entity.
Data Format
| v1 | v2 | |
|---|---|---|
| Property naming | camelCase (taxNumber) | snake_case (tax_number) |
| ID format | MongoDB ObjectIds | ULIDs |
Pagination
v1 used offset/limit pagination. v2 uses cursor-based pagination exclusively.
# v1GET /v1/organizations/:orgId/documents?filter[limit]=10&filter[skip]=20
# v2GET /invoices?limit=10&cursor=01HQXYZ...See Pagination for full details.
Document Types
In v1, all documents were stored as a single Document resource with a type field. In v2, each document type is a separate resource with its own endpoints, validation, and numbering:
/invoices/estimates/credit-notes/advance-invoices
See Invoices and Other Documents for details.
If you use Slovenian (FURS) or Croatian (FINA) fiscalization and are moving mid-year, you can set a starting number per business premise or electronic device so your fiscal sequence continues from your previous system. See the Slovenia and Croatia compliance guides.
Changed Features
Connectors
v2 exposes order integration APIs, including Shopify authorization flow support and order integration resources. If connector depth matters to your rollout, validate the current behavior in the Order Integrations API before migrating production traffic.
Scoped Access (replaces Hierarchical Accounts)
v1 used hierarchical accounts with impersonation to delegate access. v2 replaces this with entity-scoped access:
- Entity-scoped API keys (
ek_*) — The account owner can generate API keys scoped to a single entity - Entity users — Add a user directly to an entity, giving them access to that entity only (no account administration)
New in v2
- React UI — Copy-paste React components for building invoicing UIs in your app
- Self-serve White Label setup — Configure white label branding directly through the UI
Next Steps
- Quickstart — Create your first invoice in v2
- Core Concepts — How the pieces fit together
- Authentication — Set up your API keys
- API Reference — Full endpoint documentation