Skip to content

Invoices

The Invoice object

object

Attributes

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other attributes
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
Examplejson
{
  "id": "inv_6595a27b5d35015c3ef0c402",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "number": "DOC-2025-001",
  "date": "2025-03-15T00:00:00.000Z",
  "currency_code": "USD",
  "issuer": {
    "name": "Starward Equipment Co.",
    "address": "1 Launchpad Way",
    "city": "Cape Canaveral",
    "state": "FL",
    "post_code": "32920",
    "country": "USA",
    "country_code": "US",
    "tax_number": "59-8765432"
  },
  "customer_id": "cus_6595a27b5d35015c3ef0c403",
  "customer": {
    "name": "Horizon Launch Systems Inc.",
    "address": "100 Rocket Row",
    "city": "Houston",
    "state": "TX",
    "post_code": "77058",
    "country": "USA",
    "country_code": "US",
    "tax_number": "74-1234567"
  },
  "items": [
    {
      "id": "inv_item_6595a27b5d35015c3ef0c402",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Ground Station Antenna Array",
      "description": "Deep space tracking antenna with 12m dish",
      "quantity": 2,
      "price": 12500,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 25000,
      "total_with_tax": 30500,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "project_code": "MSN-2025-001",
        "department": "Ground Operations"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    },
    {
      "id": "inv_item_6595a27b5d35015c3ef0c403",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Orbital Navigation License",
      "description": "Annual software license for orbital trajectory planning",
      "quantity": 1,
      "price": 5000,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 5000,
      "total_with_tax": 6100,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "license_type": "enterprise",
        "seats": "50"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    }
  ],
  "note": "Thank you for your order. Equipment ships within 5 business days.",
  "reference": "PO-2025-001",
  "total": 30000,
  "total_with_tax": 36600,
  "total_discount": 0,
  "total_converted": null,
  "total_with_tax_converted": null,
  "shareable_id": null,
  "taxes": [
    {
      "base": 30000,
      "rate": 22,
      "amount": 6600,
      "reverse_charge": false,
      "tax_id": null
    }
  ],
  "date_year": 2025,
  "metadata": {
    "project_id": "MSN-2025-001",
    "contract_id": "ORB-2024-789"
  },
  "created_at": "2025-03-15T00:00:00.000Z",
  "updated_at": "2025-03-15T00:00:00.000Z",
  "voided_at": null,
  "deleted_at": null,
  "exchange_rate": null,
  "rounding_correction": null,
  "transaction_type": "domestic",
  "vies": null,
  "tax_clause": null,
  "signature": "{entity_name}",
  "payment_terms": null,
  "date_due": "2025-04-15T00:00:00.000Z",
  "total_paid": 0,
  "total_due": 36600,
  "paid_in_full": false,
  "furs": null,
  "fina": null
}

Create a new invoice

POST/invoices

Create a new invoice with line items.
Customer is optional - can be omitted for retail/convenience store sales where customer information isn't needed, or added inline without referencing a customer_id.
The invoice number is auto-generated based on the entity's number format settings.
Taxes are calculated automatically based on the tax rates provided.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

itemsarray of objectsrequired

Line items for the invoice. At least one item is required.

datestringoptional

Document date in YYYY-MM-DD format

date_duestringoptional

Document due date in YYYY-MM-DD format

date_servicestringoptional

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestringoptional
issuerobjectoptional

Document issuer (entity) information

customer_idstringoptional

Referenced Customer ID. Required if customer is not provided.

customerobjectoptional
notestringoptional

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

metadataobjectoptional

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftbooleanoptional
payment_termsstringoptional
tax_clausestringoptional
footerstringoptional
signaturestringoptional
referencestringoptional
ptobjectoptional
date_service_tostringoptional
linked_documentsarray of stringsoptional
paymentsarray of objectsoptional
fursobjectoptional
finaobjectoptional
eslogobjectoptional
expected_total_with_taxnumberoptional
force_linked_documentsbooleanoptional
curl -X POST "https://eu.spaceinvoices.com/invoices" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "name": "Satellite Communication Module",
        "quantity": 1,
        "price": 1500
      }
    ]
  }'
Example:

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
json
{
  "id": "inv_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "number": "2026-00001",
  "date": "2026-01-01T00:00:00.000Z",
  "currency_code": "USD",
  "issuer": {
    "name": "Starward Equipment Co.",
    "country": "United States",
    "country_code": "US"
  },
  "customer_id": null,
  "customer": null,
  "items": [
    {
      "id": "inv_item_6595a27b5d35015c3ef0c3fd",
      "invoice_id": "inv_6595a27b5d35015c3ef0c3fd",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Satellite Communication Module",
      "description": null,
      "quantity": 1,
      "price": 1500,
      "gross_price": null,
      "taxes": [],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 1500,
      "total_with_tax": 1500,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {},
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "note": null,
  "reference": null,
  "total": 1500,
  "total_with_tax": 1500,
  "total_discount": 0,
  "total_converted": null,
  "total_with_tax_converted": null,
  "shareable_id": null,
  "taxes": [
    {
      "rate": null,
      "tax_id": null,
      "base": 1500,
      "amount": 0,
      "reverse_charge": false
    }
  ],
  "date_year": 2026,
  "metadata": {},
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "voided_at": null,
  "deleted_at": null,
  "exchange_rate": null,
  "rounding_correction": null,
  "transaction_type": "domestic",
  "vies": null,
  "tax_clause": null,
  "signature": "{entity_name}",
  "payment_terms": null,
  "date_due": "2026-02-01T00:00:00.000Z",
  "total_paid": 0,
  "total_due": 1500,
  "paid_in_full": false,
  "furs": null,
  "fina": null
}
Example:

Create invoice with pre-calculated totals

POST/invoices/custom

Create an invoice with pre-calculated totals from an external ERP or accounting system.
The caller provides total, total_with_tax, and taxes at the document level, and total/total_with_tax on each line item.
All other logic (numbering, fiscalization, customer handling, payments, lifecycle hooks) is identical to the standard create endpoint.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Body parameters

itemsarray of objectsrequired

Line items with pre-calculated totals. At least one item is required.

datestringoptional
date_duestringoptional
date_servicestringoptional
currency_codestringoptional
issuerobjectoptional
customer_idstringoptional

Referenced Customer ID.

customerobjectoptional
notestringoptional
totalnumberrequired

Pre-calculated document total (before tax).

total_with_taxnumberrequired

Pre-calculated document total (after tax).

taxesarray of objectsoptional

Pre-calculated tax summary. If not provided, defaults to empty array.

metadataobjectoptional

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftbooleanoptional
payment_termsstringoptional
tax_clausestringoptional
footerstringoptional
signaturestringoptional
referencestringoptional
ptoptional
date_service_tostringoptional
total_discountnumberoptional
linked_documentsarray of stringsoptional
paymentsarray of objectsoptional
fursobjectoptional
finaobjectoptional
eslogobjectoptional
force_linked_documentsbooleanoptional
curl -X POST "https://eu.spaceinvoices.com/invoices/custom" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "total": 1500,
    "total_with_tax": 1830,
    "taxes": [
      {
        "rate": 22,
        "base": 1500,
        "amount": 330
      }
    ],
    "items": [
      {
        "name": "Imported Service",
        "quantity": 1,
        "price": 1500,
        "total": 1500,
        "total_with_tax": 1830,
        "taxes": [
          {
            "rate": 22
          }
        ]
      }
    ]
  }'

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
json
{
  "id": "inv_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "number": "2026-00001",
  "date": "2026-01-01T00:00:00.000Z",
  "currency_code": "USD",
  "issuer": {
    "name": "Starward Equipment Co.",
    "country": "United States",
    "country_code": "US"
  },
  "customer_id": null,
  "customer": null,
  "items": [
    {
      "id": "inv_item_6595a27b5d35015c3ef0c3fd",
      "invoice_id": "inv_6595a27b5d35015c3ef0c3fd",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Satellite Communication Module",
      "description": null,
      "quantity": 1,
      "price": 1500,
      "gross_price": null,
      "taxes": [],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 1500,
      "total_with_tax": 1500,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {},
      "created_at": "2026-01-01T00:00:00.000Z",
      "updated_at": "2026-01-01T00:00:00.000Z"
    }
  ],
  "note": null,
  "reference": null,
  "total": 1500,
  "total_with_tax": 1500,
  "total_discount": 0,
  "total_converted": null,
  "total_with_tax_converted": null,
  "shareable_id": null,
  "taxes": [
    {
      "rate": null,
      "tax_id": null,
      "base": 1500,
      "amount": 0,
      "reverse_charge": false
    }
  ],
  "date_year": 2026,
  "metadata": {},
  "created_at": "2026-01-01T00:00:00.000Z",
  "updated_at": "2026-01-01T00:00:00.000Z",
  "voided_at": null,
  "deleted_at": null,
  "exchange_rate": null,
  "rounding_correction": null,
  "transaction_type": "domestic",
  "vies": null,
  "tax_clause": null,
  "signature": "{entity_name}",
  "payment_terms": null,
  "date_due": "2026-02-01T00:00:00.000Z",
  "total_paid": 0,
  "total_due": 1500,
  "paid_in_full": false,
  "furs": null,
  "fina": null
}
Example:

List all invoices

GET/invoices

Retrieve a paginated list of invoices with optional filtering and sorting.
Supports cursor-based pagination, flexible JSON querying with MongoDB-style operators, full-text search, and sorting.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Opaque cursor to fetch the next page of results. Reuse only with the same effective ordering. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Opaque cursor to fetch the previous page of results. Reuse only with the same effective ordering. Use the value from pagination.prev_cursor in the previous response.

include_total_countbooleanoptional

Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.

order_byoptional

Sort by one field or provide a repeated array for multi-column ordering. Prefix a field with - for descending order. When paginating, reuse cursors only with the same effective ordering.

querystring<json>optional

JSON query object for filtering results. Supports MongoDB-style operators.

Supported operators:
- equals or direct value - Exact match (default)
- gte - Greater than or equal
- lte - Less than or equal
- gt - Greater than
- lt - Less than
- in - Value in array
- notIn - Value not in array
- contains - String contains (case-insensitive)
- startsWith - String starts with
- endsWith - String ends with
- between - Value between two numbers/dates [min, max]

Allowed fields: id, number, date, customer, customer.name, customer.email, customer.address, customer.city, customer.country, total, total_with_tax, items.name, items.description, payments.type, payments.date, document_relations.relation_type, document_relations.target_type, metadata, created_at, updated_at, paid_in_full, voided_at, date_due, paid_in_full, total_due, total_paid, voided_at

Examples:
- {"total": {"gte": 1000}} - Invoices over 1000
- {"customer.name": {"contains": "Acme"}} - Customer name contains "Acme"
- {"date": {"between": ["2025-01-01", "2025-12-31"]}} - Date range

searchstringoptional

Full-text search query to filter results across multiple fields.
Searches are case-insensitive and match partial strings.
Searches across all text fields including names, descriptions, addresses, and metadata values.

includestringoptional

Comma-separated list of relations to include in the response.

Available relations:
- payments - Payment records linked to this invoice
- document_relations - Linked documents (credit notes, advance invoices, etc.)

Usage:
?include=payments
?include=payments,document_relations

deletedbooleanoptional

When true, returns only soft-deleted (trashed) items. Default false excludes deleted items.

curl "https://eu.spaceinvoices.com/invoices" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

dataarray of objects
paginationobject

Pagination metadata including cursors and result counts

json
{
  "data": [
    {
      "id": "inv_6595a27b5d35015c3ef0c402",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "number": "DOC-2025-001",
      "date": "2025-03-15T00:00:00.000Z",
      "currency_code": "USD",
      "issuer": {
        "name": "Starward Equipment Co.",
        "address": "1 Launchpad Way",
        "city": "Cape Canaveral",
        "state": "FL",
        "post_code": "32920",
        "country": "USA",
        "country_code": "US",
        "tax_number": "59-8765432"
      },
      "customer_id": "cus_6595a27b5d35015c3ef0c403",
      "customer": {
        "name": "Horizon Launch Systems Inc.",
        "address": "100 Rocket Row",
        "city": "Houston",
        "state": "TX",
        "post_code": "77058",
        "country": "USA",
        "country_code": "US",
        "tax_number": "74-1234567"
      },
      "items": [
        {
          "id": "inv_item_6595a27b5d35015c3ef0c402",
          "invoice_id": "inv_6595a27b5d35015c3ef0c402",
          "advance_invoice_id": null,
          "item_id": null,
          "name": "Ground Station Antenna Array",
          "description": "Deep space tracking antenna with 12m dish",
          "quantity": 2,
          "price": 12500,
          "gross_price": null,
          "taxes": [
            {
              "rate": 22,
              "tax_id": "tax_6595a27b5d35015c3ef0c402"
            }
          ],
          "discounts": [],
          "type": null,
          "unit": null,
          "total": 25000,
          "total_with_tax": 30500,
          "total_converted": null,
          "total_with_tax_converted": null,
          "metadata": {
            "project_code": "MSN-2025-001",
            "department": "Ground Operations"
          },
          "created_at": "2025-03-15T00:00:00.000Z",
          "updated_at": "2025-03-15T00:00:00.000Z"
        },
        {
          "id": "inv_item_6595a27b5d35015c3ef0c403",
          "invoice_id": "inv_6595a27b5d35015c3ef0c402",
          "advance_invoice_id": null,
          "item_id": null,
          "name": "Orbital Navigation License",
          "description": "Annual software license for orbital trajectory planning",
          "quantity": 1,
          "price": 5000,
          "gross_price": null,
          "taxes": [
            {
              "rate": 22,
              "tax_id": "tax_6595a27b5d35015c3ef0c402"
            }
          ],
          "discounts": [],
          "type": null,
          "unit": null,
          "total": 5000,
          "total_with_tax": 6100,
          "total_converted": null,
          "total_with_tax_converted": null,
          "metadata": {
            "license_type": "enterprise",
            "seats": "50"
          },
          "created_at": "2025-03-15T00:00:00.000Z",
          "updated_at": "2025-03-15T00:00:00.000Z"
        }
      ],
      "note": "Thank you for your order. Equipment ships within 5 business days.",
      "reference": "PO-2025-001",
      "total": 30000,
      "total_with_tax": 36600,
      "total_discount": 0,
      "total_converted": null,
      "total_with_tax_converted": null,
      "shareable_id": null,
      "taxes": [
        {
          "base": 30000,
          "rate": 22,
          "amount": 6600,
          "reverse_charge": false,
          "tax_id": null
        }
      ],
      "date_year": 2025,
      "metadata": {
        "project_id": "MSN-2025-001",
        "contract_id": "ORB-2024-789"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z",
      "voided_at": null,
      "deleted_at": null,
      "exchange_rate": null,
      "rounding_correction": null,
      "transaction_type": "domestic",
      "vies": null,
      "tax_clause": null,
      "signature": "{entity_name}",
      "payment_terms": null,
      "date_due": "2025-04-15T00:00:00.000Z",
      "total_paid": 0,
      "total_due": 36600,
      "paid_in_full": false,
      "furs": null,
      "fina": null
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Get invoice by ID

GET/invoices/{id}

Retrieve a single invoice by its unique identifier. Returns the complete invoice details including all line items, customer information, and calculated totals.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Query parameters

includestringoptional

Comma-separated list of relations to include in the response.

Available relations:
- payments - Payment records linked to this invoice
- document_relations - Linked documents (credit notes, advance invoices, etc.)

Usage:
?include=payments
?include=payments,document_relations

curl "https://eu.spaceinvoices.com/invoices/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
json
{
  "id": "inv_6595a27b5d35015c3ef0c402",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "number": "DOC-2025-001",
  "date": "2025-03-15T00:00:00.000Z",
  "currency_code": "USD",
  "issuer": {
    "name": "Starward Equipment Co.",
    "address": "1 Launchpad Way",
    "city": "Cape Canaveral",
    "state": "FL",
    "post_code": "32920",
    "country": "USA",
    "country_code": "US",
    "tax_number": "59-8765432"
  },
  "customer_id": "cus_6595a27b5d35015c3ef0c403",
  "customer": {
    "name": "Horizon Launch Systems Inc.",
    "address": "100 Rocket Row",
    "city": "Houston",
    "state": "TX",
    "post_code": "77058",
    "country": "USA",
    "country_code": "US",
    "tax_number": "74-1234567"
  },
  "items": [
    {
      "id": "inv_item_6595a27b5d35015c3ef0c402",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Ground Station Antenna Array",
      "description": "Deep space tracking antenna with 12m dish",
      "quantity": 2,
      "price": 12500,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 25000,
      "total_with_tax": 30500,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "project_code": "MSN-2025-001",
        "department": "Ground Operations"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    },
    {
      "id": "inv_item_6595a27b5d35015c3ef0c403",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Orbital Navigation License",
      "description": "Annual software license for orbital trajectory planning",
      "quantity": 1,
      "price": 5000,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 5000,
      "total_with_tax": 6100,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "license_type": "enterprise",
        "seats": "50"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    }
  ],
  "note": "Thank you for your order. Equipment ships within 5 business days.",
  "reference": "PO-2025-001",
  "total": 30000,
  "total_with_tax": 36600,
  "total_discount": 0,
  "total_converted": null,
  "total_with_tax_converted": null,
  "shareable_id": null,
  "taxes": [
    {
      "base": 30000,
      "rate": 22,
      "amount": 6600,
      "reverse_charge": false,
      "tax_id": null
    }
  ],
  "date_year": 2025,
  "metadata": {
    "project_id": "MSN-2025-001",
    "contract_id": "ORB-2024-789"
  },
  "created_at": "2025-03-15T00:00:00.000Z",
  "updated_at": "2025-03-15T00:00:00.000Z",
  "voided_at": null,
  "deleted_at": null,
  "exchange_rate": null,
  "rounding_correction": null,
  "transaction_type": "domestic",
  "vies": null,
  "tax_clause": null,
  "signature": "{entity_name}",
  "payment_terms": null,
  "date_due": "2025-04-15T00:00:00.000Z",
  "total_paid": 0,
  "total_due": 36600,
  "paid_in_full": false,
  "furs": null,
  "fina": null
}

Update an invoice

PATCH/invoices/{id}

Update an existing invoice.
Creates a version snapshot before applying changes.
Cannot update voided or FURS-fiscalized invoices.
If items are provided, they replace all existing items.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Body parameters

itemsarray of objectsoptional

Line items for the document. If provided, replaces ALL existing items. Triggers recalculation of totals.

datestringoptional

Document date (YYYY-MM-DD or ISO datetime format).

date_duestringoptional

Payment due date (YYYY-MM-DD or ISO datetime format). Set to null to clear.

date_servicestringoptional

Service/work date or start of service period. Set to null to clear.

currency_codestringoptional

Currency code (ISO 4217, 3 characters). Changing currency triggers exchange rate recalculation.

issuerobjectoptional
customer_idstringoptional

Referenced Customer ID. Set to null to remove customer reference.

customerobjectoptional
notestringoptional

Document note/memo. Set to null to clear.

metadataobjectoptional

Custom metadata object. Set to null to clear.

Other parameters
payment_termsstringoptional
signaturestringoptional
referencestringoptional
change_reasonstringoptional
date_service_tostringoptional
linked_documentsarray of stringsoptional
force_linked_documentsbooleanoptional
eslogobjectoptional
curl -X PATCH "https://eu.spaceinvoices.com/invoices/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "Payment received. Thank you!",
    "change_reason": "Added thank you note after payment"
  }'
Example:

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
json
{
  "id": "inv_6595a27b5d35015c3ef0c402",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "number": "DOC-2025-001",
  "date": "2025-03-15T00:00:00.000Z",
  "currency_code": "USD",
  "issuer": {
    "name": "Starward Equipment Co.",
    "address": "1 Launchpad Way",
    "city": "Cape Canaveral",
    "state": "FL",
    "post_code": "32920",
    "country": "USA",
    "country_code": "US",
    "tax_number": "59-8765432"
  },
  "customer_id": "cus_6595a27b5d35015c3ef0c403",
  "customer": {
    "name": "Horizon Launch Systems Inc.",
    "address": "100 Rocket Row",
    "city": "Houston",
    "state": "TX",
    "post_code": "77058",
    "country": "USA",
    "country_code": "US",
    "tax_number": "74-1234567"
  },
  "items": [
    {
      "id": "inv_item_6595a27b5d35015c3ef0c402",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Ground Station Antenna Array",
      "description": "Deep space tracking antenna with 12m dish",
      "quantity": 2,
      "price": 12500,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 25000,
      "total_with_tax": 30500,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "project_code": "MSN-2025-001",
        "department": "Ground Operations"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    },
    {
      "id": "inv_item_6595a27b5d35015c3ef0c403",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Orbital Navigation License",
      "description": "Annual software license for orbital trajectory planning",
      "quantity": 1,
      "price": 5000,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 5000,
      "total_with_tax": 6100,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "license_type": "enterprise",
        "seats": "50"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    }
  ],
  "note": "Thank you for your order. Equipment ships within 5 business days.",
  "reference": "PO-2025-001",
  "total": 30000,
  "total_with_tax": 36600,
  "total_discount": 0,
  "total_converted": null,
  "total_with_tax_converted": null,
  "shareable_id": null,
  "taxes": [
    {
      "base": 30000,
      "rate": 22,
      "amount": 6600,
      "reverse_charge": false,
      "tax_id": null
    }
  ],
  "date_year": 2025,
  "metadata": {
    "project_id": "MSN-2025-001",
    "contract_id": "ORB-2024-789"
  },
  "created_at": "2025-03-15T00:00:00.000Z",
  "updated_at": "2025-03-15T00:00:00.000Z",
  "voided_at": null,
  "deleted_at": null,
  "exchange_rate": null,
  "rounding_correction": null,
  "transaction_type": "domestic",
  "vies": null,
  "tax_clause": null,
  "signature": "{entity_name}",
  "payment_terms": null,
  "date_due": "2025-04-15T00:00:00.000Z",
  "total_paid": 0,
  "total_due": 36600,
  "paid_in_full": false,
  "furs": null,
  "fina": null
}

Void an invoice

POST/invoices/{id}/void

Void an invoice for technical reasons (duplicate, error, etc.). For FURS-fiscalized invoices, automatically submits technical cancellation to FURS and creates a credit note. For business corrections, create a credit note instead.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Body parameters

reasonstringoptional
has_original_documentbooleanoptional
curl -X POST "https://eu.spaceinvoices.com/invoices/{id}/void" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Duplicate invoice created by mistake"
  }'

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
json
{
  "id": "inv_abc123",
  "voided_at": "2026-01-20T12:00:00.000Z"
}

Get invoice version history

GET/invoices/{id}/versions

Retrieve the version history for an invoice. Each version represents the document state before an update was applied.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl "https://eu.spaceinvoices.com/invoices/{id}/versions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

versionsarray of objects
countinteger
json
{
  "versions": [
    {
      "id": "ver_abc123",
      "document_type": "invoice",
      "document_id": "inv_6595a27b5d35015c3ef0c3fd",
      "version": 2,
      "snapshot": {
        "id": "inv_6595a27b5d35015c3ef0c3fd",
        "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
        "number": "2026-00001",
        "date": "2026-01-01T00:00:00.000Z",
        "currency_code": "USD",
        "issuer": {
          "name": "Starward Equipment Co.",
          "country": "United States",
          "country_code": "US"
        },
        "customer_id": null,
        "customer": null,
        "items": [
          {
            "id": "inv_item_6595a27b5d35015c3ef0c3fd",
            "invoice_id": "inv_6595a27b5d35015c3ef0c3fd",
            "advance_invoice_id": null,
            "item_id": null,
            "name": "Satellite Communication Module",
            "description": null,
            "quantity": 1,
            "price": 1500,
            "gross_price": null,
            "taxes": [],
            "discounts": [],
            "type": null,
            "unit": null,
            "total": 1500,
            "total_with_tax": 1500,
            "total_converted": null,
            "total_with_tax_converted": null,
            "metadata": {},
            "created_at": "2026-01-01T00:00:00.000Z",
            "updated_at": "2026-01-01T00:00:00.000Z"
          }
        ],
        "note": null,
        "reference": null,
        "total": 1500,
        "total_with_tax": 1500,
        "total_discount": 0,
        "total_converted": null,
        "total_with_tax_converted": null,
        "shareable_id": null,
        "taxes": [
          {
            "rate": null,
            "tax_id": null,
            "base": 1500,
            "amount": 0,
            "reverse_charge": false
          }
        ],
        "date_year": 2026,
        "metadata": {},
        "created_at": "2026-01-01T00:00:00.000Z",
        "updated_at": "2026-01-01T00:00:00.000Z",
        "voided_at": null,
        "deleted_at": null,
        "exchange_rate": null,
        "rounding_correction": null,
        "transaction_type": "domestic",
        "vies": null,
        "tax_clause": null,
        "signature": "{entity_name}",
        "payment_terms": null,
        "date_due": "2026-02-01T00:00:00.000Z",
        "total_paid": 0,
        "total_due": 1500,
        "paid_in_full": false,
        "furs": null,
        "fina": null
      },
      "changed_fields": [
        "note"
      ],
      "user": {
        "id": "usr_123",
        "name": "John Doe",
        "email": "john@example.com"
      },
      "reason": "Added payment confirmation",
      "created_at": "2025-01-15T10:30:00.000Z"
    },
    {
      "id": "ver_xyz789",
      "document_type": "invoice",
      "document_id": "inv_6595a27b5d35015c3ef0c3fd",
      "version": 1,
      "snapshot": {
        "id": "inv_6595a27b5d35015c3ef0c3fd",
        "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
        "number": "2026-00001",
        "date": "2026-01-01T00:00:00.000Z",
        "currency_code": "USD",
        "issuer": {
          "name": "Starward Equipment Co.",
          "country": "United States",
          "country_code": "US"
        },
        "customer_id": null,
        "customer": null,
        "items": [
          {
            "id": "inv_item_6595a27b5d35015c3ef0c3fd",
            "invoice_id": "inv_6595a27b5d35015c3ef0c3fd",
            "advance_invoice_id": null,
            "item_id": null,
            "name": "Satellite Communication Module",
            "description": null,
            "quantity": 1,
            "price": 1500,
            "gross_price": null,
            "taxes": [],
            "discounts": [],
            "type": null,
            "unit": null,
            "total": 1500,
            "total_with_tax": 1500,
            "total_converted": null,
            "total_with_tax_converted": null,
            "metadata": {},
            "created_at": "2026-01-01T00:00:00.000Z",
            "updated_at": "2026-01-01T00:00:00.000Z"
          }
        ],
        "note": null,
        "reference": null,
        "total": 1500,
        "total_with_tax": 1500,
        "total_discount": 0,
        "total_converted": null,
        "total_with_tax_converted": null,
        "shareable_id": null,
        "taxes": [
          {
            "rate": null,
            "tax_id": null,
            "base": 1500,
            "amount": 0,
            "reverse_charge": false
          }
        ],
        "date_year": 2026,
        "metadata": {},
        "created_at": "2026-01-01T00:00:00.000Z",
        "updated_at": "2026-01-01T00:00:00.000Z",
        "voided_at": null,
        "deleted_at": null,
        "exchange_rate": null,
        "rounding_correction": null,
        "transaction_type": "domestic",
        "vies": null,
        "tax_clause": null,
        "signature": "{entity_name}",
        "payment_terms": null,
        "date_due": "2026-02-01T00:00:00.000Z",
        "total_paid": 0,
        "total_due": 1500,
        "paid_in_full": false,
        "furs": null,
        "fina": null
      },
      "changed_fields": [
        "items"
      ],
      "user": {
        "id": "usr_123",
        "name": "John Doe",
        "email": "john@example.com"
      },
      "reason": "Corrected line items",
      "created_at": "2025-01-14T15:00:00.000Z"
    }
  ],
  "count": 2
}

Get specific invoice version

GET/invoices/{id}/versions/{version}

Retrieve a specific version snapshot of an invoice.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Invoice ID

versionintegerrequired

Version number

curl "https://eu.spaceinvoices.com/invoices/{id}/versions/{version}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring

Version record ID

Other parameters
document_typestring
document_idstring
versioninteger
snapshotobject
changed_fieldsarray of strings
userobject
reasonstring
created_atstring<date-time>
json
{
  "id": "ver_abc123",
  "document_type": "invoice",
  "document_id": "inv_6595a27b5d35015c3ef0c3fd",
  "version": 1,
  "snapshot": {
    "id": "inv_6595a27b5d35015c3ef0c3fd",
    "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
    "number": "2026-00001",
    "date": "2026-01-01T00:00:00.000Z",
    "currency_code": "USD",
    "issuer": {
      "name": "Starward Equipment Co.",
      "country": "United States",
      "country_code": "US"
    },
    "customer_id": null,
    "customer": null,
    "items": [
      {
        "id": "inv_item_6595a27b5d35015c3ef0c3fd",
        "invoice_id": "inv_6595a27b5d35015c3ef0c3fd",
        "advance_invoice_id": null,
        "item_id": null,
        "name": "Satellite Communication Module",
        "description": null,
        "quantity": 1,
        "price": 1500,
        "gross_price": null,
        "taxes": [],
        "discounts": [],
        "type": null,
        "unit": null,
        "total": 1500,
        "total_with_tax": 1500,
        "total_converted": null,
        "total_with_tax_converted": null,
        "metadata": {},
        "created_at": "2026-01-01T00:00:00.000Z",
        "updated_at": "2026-01-01T00:00:00.000Z"
      }
    ],
    "note": null,
    "reference": null,
    "total": 1500,
    "total_with_tax": 1500,
    "total_discount": 0,
    "total_converted": null,
    "total_with_tax_converted": null,
    "shareable_id": null,
    "taxes": [
      {
        "rate": null,
        "tax_id": null,
        "base": 1500,
        "amount": 0,
        "reverse_charge": false
      }
    ],
    "date_year": 2026,
    "metadata": {},
    "created_at": "2026-01-01T00:00:00.000Z",
    "updated_at": "2026-01-01T00:00:00.000Z",
    "voided_at": null,
    "deleted_at": null,
    "exchange_rate": null,
    "rounding_correction": null,
    "transaction_type": "domestic",
    "vies": null,
    "tax_clause": null,
    "signature": "{entity_name}",
    "payment_terms": null,
    "date_due": "2026-02-01T00:00:00.000Z",
    "total_paid": 0,
    "total_due": 1500,
    "paid_in_full": false,
    "furs": null,
    "fina": null
  },
  "changed_fields": [
    "items"
  ],
  "user": {
    "id": "usr_123",
    "name": "John Doe",
    "email": "john@example.com"
  },
  "reason": "Corrected line items",
  "created_at": "2025-01-14T15:00:00.000Z"
}

Preview next document number

GET/documents/next-number

Preview the next auto-generated document number for the specified type without incrementing the sequence. Useful for showing users what number will be assigned before creating a document.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

typestringrequired

Document type

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

business_premise_namestringoptional

Business premise name (FURS or FINA). If provided with electronic_device_name, returns fiscalization-format number.

electronic_device_namestringoptional

Electronic device name (FURS or FINA). Required if business_premise_name is provided. When provided, returns fiscalization-format number.

curl "https://eu.spaceinvoices.com/documents/next-number" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

numberstring
fursobject
finaobject
ptobject
json
{
  "number": "2026-00042",
  "furs": null
}

Render invoice preview

POST/invoices/render

Render an HTML preview of an invoice without saving to the database. Perfect for displaying live previews in invoice creation/edit forms. Supports both partial mode (allows incomplete data for drafts) and complete mode (validates all required fields).

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

templatestringoptional

Document template design to use. When not specified, uses the entity's configured template.

Possible values: "modern", "classic", "condensed", "minimal", "fashion"

localestringoptional

Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY.

languagestringoptional

Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels — for example, a Slovenian entity (sl-SI formatting with commas) but English labels.

partialstringoptional

Whether to treat the document as partial (allows incomplete data) or complete (validates all required fields)

Possible values: "true", "false"

Default: "true"

upn_qr_enabledstringoptional

Override UPN QR enabled setting for preview

Possible values: "true", "false"

upn_qr_display_modestringoptional

Override UPN QR display mode for preview

Possible values: "qr_only", "full_slip"

epc_qr_enabledstringoptional

Override EPC QR enabled setting for preview

Possible values: "true", "false"

Body parameters

idstringoptional
itemsarray of objectsrequired
datestringoptional

Document date in YYYY-MM-DD format

date_duestringoptional

Document due date in YYYY-MM-DD format

date_servicestringoptional

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestringoptional
issuerobjectoptional

Document issuer (entity) information

customer_idstringoptional

Referenced Customer ID. Required if customer is not provided.

customerobjectoptional
notestringoptional

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

metadataobjectoptional

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftbooleanoptional
payment_termsstringoptional
tax_clausestringoptional
footerstringoptional
signaturestringoptional
referencestringoptional
ptobjectoptional
date_service_tostringoptional
linked_documentsarray of stringsoptional
finaobjectoptional
expected_total_with_taxnumberoptional
force_linked_documentsbooleanoptional
curl -X POST "https://eu.spaceinvoices.com/invoices/render" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "name": "Consulting Services",
        "quantity": 5,
        "price": 150
      }
    ],
    "customer": {
      "name": "Acme Corp"
    }
  }'
Example:

Preview document calculation

POST/documents/calculate

Calculate document totals, taxes, and transaction type without creating the document. Useful for showing live totals in forms or validating data before submission.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Query parameters

typestringrequired

Document type

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

Body parameters

itemsarray of objectsrequired

Document line items to calculate. At least one item is required.

Other parameters
customerobjectoptional
customer_idstringoptional
currency_codestringoptional
datestringoptional
expected_total_with_taxnumberoptional
curl -X POST "https://eu.spaceinvoices.com/documents/calculate" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "name": "Web Development",
        "quantity": 10,
        "price": 100,
        "taxes": [
          {
            "rate": 22
          }
        ]
      }
    ]
  }'

Returns

itemsarray of objects
totalnumber
total_with_taxnumber
total_discountnumber
taxesarray of objects
transaction_typestring
currency_codestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
viesobject
json
{
  "items": [
    {
      "name": "Web Development",
      "description": null,
      "type": null,
      "price": 100,
      "gross_price": null,
      "quantity": 10,
      "unit": null,
      "taxes": [
        {
          "name": "VAT",
          "rate": 22,
          "base": 1000,
          "amount": 220
        }
      ],
      "discounts": [],
      "total": 1000,
      "total_with_tax": 1220,
      "total_converted": null,
      "total_with_tax_converted": null
    }
  ],
  "total": 1000,
  "total_with_tax": 1220,
  "total_discount": 0,
  "taxes": [
    {
      "name": "VAT",
      "rate": 22,
      "base": 1000,
      "amount": 220,
      "reverse_charge": false
    }
  ],
  "transaction_type": "domestic",
  "currency_code": "EUR",
  "exchange_rate": null,
  "total_converted": null,
  "total_with_tax_converted": null,
  "rounding_correction": null,
  "vies": null
}

Render HTML

GET/documents/{id}/html

Render a saved document by its ID as HTML. The document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). The output is styled for professional presentation and optimized for display in web applications.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Query parameters

templatestringoptional

Document template design to use. When not specified, uses the entity's configured template.

Possible values: "modern", "classic", "condensed", "minimal", "fashion"

localestringoptional

Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY.

languagestringoptional

Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels — for example, a Slovenian entity (sl-SI formatting with commas) but English labels.

curl "https://eu.spaceinvoices.com/documents/{id}/html" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Render PDF

GET/documents/{id}/pdf

Render a saved document by its ID as PDF. The document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). The output is styled for professional presentation and optimized for printing. Ideal for downloads and archival.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

Query parameters

templatestringoptional

Document template design to use. When not specified, uses the entity's configured template.

Possible values: "modern", "classic", "condensed", "minimal", "fashion"

localestringoptional

Locale for number and date formatting (decimal separators, date order). When not specified, uses the entity's configured locale. For example, 'sl-SI' formats decimals with commas (5,5%) and dates as DD. MM. YYYY.

languagestringoptional

Language for document labels and translations (e.g., 'Invoice', 'Tax', 'Total'). When not specified, uses the same value as locale. Use this to get entity-locale formatting with different-language labels — for example, a Slovenian entity (sl-SI formatting with commas) but English labels.

curl "https://eu.spaceinvoices.com/documents/{id}/pdf" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Finalize a draft document

POST/documents/{id}/finalize

Finalize a draft document by assigning a document number and running fiscalization (if applicable). Only draft documents can be finalized. After finalization, the document cannot be deleted.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Document ID

Query parameters

typestringoptional

Document type. Optional — automatically inferred from the document ID prefix.

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

Body parameters

fursobjectoptional
finaobjectoptional
curl -X POST "https://eu.spaceinvoices.com/documents/{id}/finalize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "fina": {
      "business_premise_name": "PP1",
      "electronic_device_name": "1",
      "payment_type": "card"
    }
  }'
Example:
json
null

Delete a draft document

DELETE/documents/{id}

Delete a draft document. Only draft documents can be deleted. Finalized documents cannot be deleted - use void instead.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Document ID

Query parameters

typestringoptional

Document type. Optional — automatically inferred from the document ID prefix.

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

curl -X DELETE "https://eu.spaceinvoices.com/documents/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Permanently delete a document

DELETE/documents/{id}/permanent

Permanently delete a soft-deleted document. Only documents in the trash can be permanently deleted. Only draft documents and estimates can be permanently deleted.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Document ID

Query parameters

typestringoptional

Document type. Optional — automatically inferred from the document ID prefix.

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

curl -X DELETE "https://eu.spaceinvoices.com/documents/{id}/permanent" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Make document shareable

POST/documents/{id}/share

Generate a shareable token for a document. Document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_). If the document is already shared, returns the existing token. Can be used to re-share a document that was previously unshared.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl -X POST "https://eu.spaceinvoices.com/documents/{id}/share" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

shareable_idstring
json
{
  "shareable_id": "string"
}

Unshare document

DELETE/documents/{id}/share

Remove the shareable token from a document. The document will no longer be accessible via public link. Document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_).

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl -X DELETE "https://eu.spaceinvoices.com/documents/{id}/share" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Get shareable token

GET/documents/{id}/share

Retrieve the shareable token for a document if one exists. Document type is automatically detected from the ID prefix (inv_, est_, cre_, adv_).

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl "https://eu.spaceinvoices.com/documents/{id}/share" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

shareable_idstring
json
{
  "shareable_id": "string"
}

View shareable invoice

GET/invoices/shareable/{shareableId}

Retrieve invoice data using a shareable token. No authentication required. Returns full invoice data for rendering.

Path parameters

shareableIdstringrequired

Shareable document token

curl "https://eu.spaceinvoices.com/invoices/shareable/{shareableId}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
json
{
  "id": "inv_6595a27b5d35015c3ef0c402",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "number": "DOC-2025-001",
  "date": "2025-03-15T00:00:00.000Z",
  "currency_code": "USD",
  "issuer": {
    "name": "Starward Equipment Co.",
    "address": "1 Launchpad Way",
    "city": "Cape Canaveral",
    "state": "FL",
    "post_code": "32920",
    "country": "USA",
    "country_code": "US",
    "tax_number": "59-8765432"
  },
  "customer_id": "cus_6595a27b5d35015c3ef0c403",
  "customer": {
    "name": "Horizon Launch Systems Inc.",
    "address": "100 Rocket Row",
    "city": "Houston",
    "state": "TX",
    "post_code": "77058",
    "country": "USA",
    "country_code": "US",
    "tax_number": "74-1234567"
  },
  "items": [
    {
      "id": "inv_item_6595a27b5d35015c3ef0c402",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Ground Station Antenna Array",
      "description": "Deep space tracking antenna with 12m dish",
      "quantity": 2,
      "price": 12500,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 25000,
      "total_with_tax": 30500,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "project_code": "MSN-2025-001",
        "department": "Ground Operations"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    },
    {
      "id": "inv_item_6595a27b5d35015c3ef0c403",
      "invoice_id": "inv_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "item_id": null,
      "name": "Orbital Navigation License",
      "description": "Annual software license for orbital trajectory planning",
      "quantity": 1,
      "price": 5000,
      "gross_price": null,
      "taxes": [
        {
          "rate": 22,
          "tax_id": "tax_6595a27b5d35015c3ef0c402"
        }
      ],
      "discounts": [],
      "type": null,
      "unit": null,
      "total": 5000,
      "total_with_tax": 6100,
      "total_converted": null,
      "total_with_tax_converted": null,
      "metadata": {
        "license_type": "enterprise",
        "seats": "50"
      },
      "created_at": "2025-03-15T00:00:00.000Z",
      "updated_at": "2025-03-15T00:00:00.000Z"
    }
  ],
  "note": "Thank you for your order. Equipment ships within 5 business days.",
  "reference": "PO-2025-001",
  "total": 30000,
  "total_with_tax": 36600,
  "total_discount": 0,
  "total_converted": null,
  "total_with_tax_converted": null,
  "shareable_id": null,
  "taxes": [
    {
      "base": 30000,
      "rate": 22,
      "amount": 6600,
      "reverse_charge": false,
      "tax_id": null
    }
  ],
  "date_year": 2025,
  "metadata": {
    "project_id": "MSN-2025-001",
    "contract_id": "ORB-2024-789"
  },
  "created_at": "2025-03-15T00:00:00.000Z",
  "updated_at": "2025-03-15T00:00:00.000Z",
  "voided_at": null,
  "deleted_at": null,
  "exchange_rate": null,
  "rounding_correction": null,
  "transaction_type": "domestic",
  "vies": null,
  "tax_clause": null,
  "signature": "{entity_name}",
  "payment_terms": null,
  "date_due": "2025-04-15T00:00:00.000Z",
  "total_paid": 0,
  "total_due": 36600,
  "paid_in_full": false,
  "furs": null,
  "fina": null
}

Get shareable invoice as HTML

GET/invoices/shareable/{shareableId}/html

Get invoice as HTML preview using a shareable token. No authentication required. Supports multiple languages via locale query parameter.

Path parameters

shareableIdstringrequired

Shareable document token

Query parameters

localestringoptional

Locale for number and date formatting (decimal separators, date order). Defaults to entity locale.

Possible values: "en-US", "de-DE", "it-IT", "fr-FR", "es-ES", "sl-SI", "pt-PT", "nl-NL", "pl-PL", "hr-HR", "sv-SE", "fi-FI", "et-EE", "bg-BG", "cs-CZ", "sk-SK", "nb-NO", "is-IS"

languagestringoptional

Language for document labels/translations. Defaults to locale value. Use to get entity-locale formatting with different-language labels.

Possible values: "en-US", "de-DE", "it-IT", "fr-FR", "es-ES", "sl-SI", "pt-PT", "nl-NL", "pl-PL", "hr-HR", "sv-SE", "fi-FI", "et-EE", "bg-BG", "cs-CZ", "sk-SK", "nb-NO", "is-IS"

curl "https://eu.spaceinvoices.com/invoices/shareable/{shareableId}/html" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Download shareable invoice as PDF

GET/invoices/shareable/{shareableId}/pdf

Download invoice as PDF using a shareable token. No authentication required. Supports multiple languages via locale query parameter.

Path parameters

shareableIdstringrequired

Shareable document token

Query parameters

localestringoptional

Locale for number and date formatting (decimal separators, date order). Defaults to entity locale.

Possible values: "en-US", "de-DE", "it-IT", "fr-FR", "es-ES", "sl-SI", "pt-PT", "nl-NL", "pl-PL", "hr-HR", "sv-SE", "fi-FI", "et-EE", "bg-BG", "cs-CZ", "sk-SK", "nb-NO", "is-IS"

languagestringoptional

Language for document labels/translations. Defaults to locale value. Use to get entity-locale formatting with different-language labels.

Possible values: "en-US", "de-DE", "it-IT", "fr-FR", "es-ES", "sl-SI", "pt-PT", "nl-NL", "pl-PL", "hr-HR", "sv-SE", "fi-FI", "et-EE", "bg-BG", "cs-CZ", "sk-SK", "nb-NO", "is-IS"

curl "https://eu.spaceinvoices.com/invoices/shareable/{shareableId}/pdf" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Download shareable invoice as e-SLOG XML

GET/invoices/shareable/{shareableId}/eslog

Download invoice as e-SLOG 2.0 XML (Slovenian electronic invoice format) using a shareable token. No authentication required. Only available for Slovenian entities with valid e-SLOG validation.

Path parameters

shareableIdstringrequired

Shareable document token

curl "https://eu.spaceinvoices.com/invoices/shareable/{shareableId}/eslog" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Fiscalize an old invoice

POST/invoices/{id}/fiscalize

Manually fiscalize an invoice that was created before FURS was enabled. Auto-creates a dedicated "OLD" premise and device for FURS submission, assigns a new sequential FURS number (OLD-OLD-N), and submits to FURS with SubsequentSubmit=true and SpecialNotes=#OLDINV;. The original invoice number remains unchanged.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl -X POST "https://eu.spaceinvoices.com/invoices/{id}/fiscalize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

Date the invoice was created (ISO 8601 datetime at midnight UTC)

date_duestring<date-time>

Date the invoice is due (ISO 8601 datetime at midnight UTC)

date_servicestring

Service date in YYYY-MM-DD format. For invoices and credit notes.

currency_codestring
issuerobject

Document issuer (entity) information

customer_idstring
customerobject

Customer information

notestring

Note for the document. If not provided, defaults to entity's document-type-specific note setting. Pass empty string to explicitly set no note.

totalnumber
total_with_taxnumber
taxesarray of objects

Applied taxes summary

metadataobject

Custom key-value data for your own use. Store any JSON object up to 50 properties. Values must be strings up to 250 characters. Useful for storing external IDs, tags, or integration data.

Other parameters
is_draftboolean
payment_termsstring
tax_clausestring
footerstring
signaturestring
total_discountnumber
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
referencestring
viesobject
deleted_atstring<date-time>
created_atstring<date-time>
updated_atstring<date-time>
total_paidnumber
total_duenumber
paid_in_fullboolean
fursobject
finaobject
pt
date_service_tostring
document_relationsarray of objects
json
{
  "id": "inv_abc123",
  "furs": {
    "country_code": "SI",
    "status": "success",
    "fiscalized_at": "2026-01-20T12:00:00.000Z",
    "data": {
      "zoi": "a1b2c3d4e5f6...",
      "eor": "EOR-12345",
      "business_premise_name": "OLD",
      "electronic_device_name": "OLD",
      "invoice_number": "1"
    }
  }
}

Retry document fiscalization

POST/documents/{id}/fiscalize

Manually retry fiscalization for a document that has a failed fiscalization status. Only documents with failed FURS or FINA fiscalization can be retried.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Document ID

Query parameters

typestringoptional

Document type. Optional — automatically inferred from the document ID prefix.

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

curl -X POST "https://eu.spaceinvoices.com/documents/{id}/fiscalize" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"
json
null

Restore a deleted document

POST/documents/{id}/restore

Restore a soft-deleted document from the trash. The document will be returned to its original state.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.

Path parameters

idstringrequired

Document ID

Query parameters

typestringoptional

Document type. Optional — automatically inferred from the document ID prefix.

Possible values: "invoice", "estimate", "credit_note", "advance_invoice", "delivery_note"

curl -X POST "https://eu.spaceinvoices.com/documents/{id}/restore" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"
json
null