Advance Invoices
Advance Invoices
Advance invoice management operations. Create, retrieve, and list advance invoices. Advance invoices are issued before goods/services are delivered to collect prepayment. When linked to a final invoice, the paid amount is applied as a payment.
The Advance Invoice object
Attributes
{
"id": "adv_6595a27b5d35015c3ef0c402",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "DOC-2025-001",
"date": "2025-03-15T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "My Company Ltd",
"address": "123 Business St",
"city": "San Francisco",
"state": "CA",
"post_code": "94102",
"country": "USA",
"country_code": "US",
"tax_number": "12345678"
},
"customer_id": "cus_6595a27b5d35015c3ef0c403",
"customer": {
"name": "Acme Corporation",
"address": "456 Client Ave",
"city": "New York",
"state": "NY",
"post_code": "10001",
"country": "USA",
"country_code": "US",
"tax_number": "87654321"
},
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c402",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Professional Services - Consulting",
"description": "Strategic consulting services for Q1 2025",
"quantity": 40,
"price": 150,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 6000,
"total_with_tax": 7320,
"total_converted": null,
"total_with_tax_converted": null,
"metadata": {
"project_code": "PROJ-2025-001",
"department": "Consulting"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z"
},
{
"id": "adv_item_6595a27b5d35015c3ef0c403",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Software License - Annual",
"description": "Enterprise software license renewal",
"quantity": 1,
"price": 2500,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 2500,
"total_with_tax": 3050,
"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 business!",
"total": 8500,
"total_with_tax": 10370,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [
{
"base": 8500,
"rate": 22,
"amount": 1870,
"reverse_charge": false
}
],
"date_year": 2025,
"metadata": {
"project_id": "PROJ-2025-001",
"contract_id": "CTR-2024-789"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2025-04-15T00:00:00.000Z",
"total_paid": 0,
"total_due": 10370,
"paid_in_full": false,
"furs": null
}Create a new advance invoice
/advance-invoicesCreate a new advance invoice with line items. Advance invoices are issued before goods/services are delivered to collect prepayment. When payment is received, the advance can be linked to a final invoice to apply the prepaid amount.
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Body parameters
Document date in YYYY-MM-DD format
Document due date in YYYY-MM-DD format
Referenced Customer ID. Required if customer is not provided.
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.
curl -X POST "https://eu.spaceinvoices.com/advance-invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"name": "Professional Services",
"quantity": 1,
"price": 1500
}
]
}'Returns
Date the advance invoice was created (ISO 8601 datetime at midnight UTC)
Date the advance invoice is due (ISO 8601 datetime at midnight UTC)
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.
{
"id": "adv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "2026-00001",
"date": "2026-01-01T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "Test Entity",
"country": "United States",
"country_code": "US"
},
"customer_id": null,
"customer": null,
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c3fd",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c3fd",
"name": "Professional Services",
"description": null,
"quantity": 1,
"price": 1500,
"gross_price": null,
"taxes": [],
"discounts": [],
"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,
"total": 1500,
"total_with_tax": 1500,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [],
"date_year": 2026,
"metadata": {},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2026-02-01T00:00:00.000Z",
"total_paid": 0,
"total_due": 1500,
"paid_in_full": false,
"furs": null
}List all advance invoices
/advance-invoicesRetrieve a paginated list of advance invoices with optional filtering and sorting. Supports cursor-based pagination, JSON querying with MongoDB-style operators, full-text search, and sorting.
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Query parameters
Number of results per request.
Default: 10
Cursor to fetch the next page of results. Use the value from pagination.next_cursor in the previous response.
Cursor to fetch the previous page of results. Use the value from pagination.prev_cursor in the previous response.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
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, metadata, created_at, updated_at, paid_in_full, voided_at, date_due, paid_in_full, 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
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.
Comma-separated list of relations to include in the response. Allowed: payments
curl "https://eu.spaceinvoices.com/advance-invoices" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"data": [
{
"id": "adv_6595a27b5d35015c3ef0c402",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "DOC-2025-001",
"date": "2025-03-15T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "My Company Ltd",
"address": "123 Business St",
"city": "San Francisco",
"state": "CA",
"post_code": "94102",
"country": "USA",
"country_code": "US",
"tax_number": "12345678"
},
"customer_id": "cus_6595a27b5d35015c3ef0c403",
"customer": {
"name": "Acme Corporation",
"address": "456 Client Ave",
"city": "New York",
"state": "NY",
"post_code": "10001",
"country": "USA",
"country_code": "US",
"tax_number": "87654321"
},
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c402",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Professional Services - Consulting",
"description": "Strategic consulting services for Q1 2025",
"quantity": 40,
"price": 150,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 6000,
"total_with_tax": 7320,
"total_converted": null,
"total_with_tax_converted": null,
"metadata": {
"project_code": "PROJ-2025-001",
"department": "Consulting"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z"
},
{
"id": "adv_item_6595a27b5d35015c3ef0c403",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Software License - Annual",
"description": "Enterprise software license renewal",
"quantity": 1,
"price": 2500,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 2500,
"total_with_tax": 3050,
"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 business!",
"total": 8500,
"total_with_tax": 10370,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [
{
"base": 8500,
"rate": 22,
"amount": 1870,
"reverse_charge": false
}
],
"date_year": 2025,
"metadata": {
"project_id": "PROJ-2025-001",
"contract_id": "CTR-2024-789"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2025-04-15T00:00:00.000Z",
"total_paid": 0,
"total_due": 10370,
"paid_in_full": false,
"furs": null
}
],
"pagination": {
"total": 1,
"next_cursor": null,
"prev_cursor": null,
"has_more": false
}
}Get advance invoice by ID
/advance-invoices/{id}Retrieve a single advance invoice by its unique identifier. Returns the complete advance invoice details including all line items, customer information, and calculated totals.
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Unique resource identifier
Query parameters
Comma-separated list of relations to include in the response. Allowed: payments
curl "https://eu.spaceinvoices.com/advance-invoices/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
Date the advance invoice was created (ISO 8601 datetime at midnight UTC)
Date the advance invoice is due (ISO 8601 datetime at midnight UTC)
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.
{
"id": "adv_6595a27b5d35015c3ef0c402",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "DOC-2025-001",
"date": "2025-03-15T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "My Company Ltd",
"address": "123 Business St",
"city": "San Francisco",
"state": "CA",
"post_code": "94102",
"country": "USA",
"country_code": "US",
"tax_number": "12345678"
},
"customer_id": "cus_6595a27b5d35015c3ef0c403",
"customer": {
"name": "Acme Corporation",
"address": "456 Client Ave",
"city": "New York",
"state": "NY",
"post_code": "10001",
"country": "USA",
"country_code": "US",
"tax_number": "87654321"
},
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c402",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Professional Services - Consulting",
"description": "Strategic consulting services for Q1 2025",
"quantity": 40,
"price": 150,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 6000,
"total_with_tax": 7320,
"total_converted": null,
"total_with_tax_converted": null,
"metadata": {
"project_code": "PROJ-2025-001",
"department": "Consulting"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z"
},
{
"id": "adv_item_6595a27b5d35015c3ef0c403",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Software License - Annual",
"description": "Enterprise software license renewal",
"quantity": 1,
"price": 2500,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 2500,
"total_with_tax": 3050,
"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 business!",
"total": 8500,
"total_with_tax": 10370,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [
{
"base": 8500,
"rate": 22,
"amount": 1870,
"reverse_charge": false
}
],
"date_year": 2025,
"metadata": {
"project_id": "PROJ-2025-001",
"contract_id": "CTR-2024-789"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2025-04-15T00:00:00.000Z",
"total_paid": 0,
"total_due": 10370,
"paid_in_full": false,
"furs": null
}Update an advance invoice
/advance-invoices/{id}Update an existing advance invoice.
Creates a version snapshot before applying changes.
Cannot update voided or FURS-fiscalized advance invoices.
If items are provided, they replace all existing items.
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Unique resource identifier
Body parameters
Document date (YYYY-MM-DD or ISO datetime format).
Payment due date (YYYY-MM-DD or ISO datetime format). Set to null to clear.
Referenced Customer ID. Set to null to remove customer reference.
Custom metadata object. Set to null to clear.
curl -X PATCH "https://eu.spaceinvoices.com/advance-invoices/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"note": "Prepayment received. Thank you!",
"change_reason": "Added confirmation note"
}'Returns
Date the advance invoice was created (ISO 8601 datetime at midnight UTC)
Date the advance invoice is due (ISO 8601 datetime at midnight UTC)
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.
{
"id": "adv_6595a27b5d35015c3ef0c402",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "DOC-2025-001",
"date": "2025-03-15T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "My Company Ltd",
"address": "123 Business St",
"city": "San Francisco",
"state": "CA",
"post_code": "94102",
"country": "USA",
"country_code": "US",
"tax_number": "12345678"
},
"customer_id": "cus_6595a27b5d35015c3ef0c403",
"customer": {
"name": "Acme Corporation",
"address": "456 Client Ave",
"city": "New York",
"state": "NY",
"post_code": "10001",
"country": "USA",
"country_code": "US",
"tax_number": "87654321"
},
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c402",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Professional Services - Consulting",
"description": "Strategic consulting services for Q1 2025",
"quantity": 40,
"price": 150,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 6000,
"total_with_tax": 7320,
"total_converted": null,
"total_with_tax_converted": null,
"metadata": {
"project_code": "PROJ-2025-001",
"department": "Consulting"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z"
},
{
"id": "adv_item_6595a27b5d35015c3ef0c403",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c402",
"name": "Software License - Annual",
"description": "Enterprise software license renewal",
"quantity": 1,
"price": 2500,
"gross_price": null,
"taxes": [
{
"rate": 22,
"tax_id": "tax_6595a27b5d35015c3ef0c402"
}
],
"discounts": [],
"unit": null,
"total": 2500,
"total_with_tax": 3050,
"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 business!",
"total": 8500,
"total_with_tax": 10370,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [
{
"base": 8500,
"rate": 22,
"amount": 1870,
"reverse_charge": false
}
],
"date_year": 2025,
"metadata": {
"project_id": "PROJ-2025-001",
"contract_id": "CTR-2024-789"
},
"created_at": "2025-03-15T00:00:00.000Z",
"updated_at": "2025-03-15T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2025-04-15T00:00:00.000Z",
"total_paid": 0,
"total_due": 10370,
"paid_in_full": false,
"furs": null
}Get advance invoice version history
/advance-invoices/{id}/versionsRetrieve the version history for an advance invoice. Each version represents the document state before an update was applied.
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Unique resource identifier
curl "https://eu.spaceinvoices.com/advance-invoices/{id}/versions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"versions": [
{
"id": "ver_abc123",
"document_type": "advance_invoice",
"document_id": "adv_6595a27b5d35015c3ef0c3fd",
"version": 2,
"snapshot": {
"id": "adv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "2026-00001",
"date": "2026-01-01T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "Test Entity",
"country": "United States",
"country_code": "US"
},
"customer_id": null,
"customer": null,
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c3fd",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c3fd",
"name": "Professional Services",
"description": null,
"quantity": 1,
"price": 1500,
"gross_price": null,
"taxes": [],
"discounts": [],
"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,
"total": 1500,
"total_with_tax": 1500,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [],
"date_year": 2026,
"metadata": {},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2026-02-01T00:00:00.000Z",
"total_paid": 0,
"total_due": 1500,
"paid_in_full": false,
"furs": null
},
"changed_fields": [
"note"
],
"user": {
"id": "usr_123",
"name": "John Doe",
"email": "john@example.com"
},
"reason": "Added confirmation note",
"created_at": "2025-01-15T10:30:00.000Z"
},
{
"id": "ver_xyz789",
"document_type": "advance_invoice",
"document_id": "adv_6595a27b5d35015c3ef0c3fd",
"version": 1,
"snapshot": {
"id": "adv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "2026-00001",
"date": "2026-01-01T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "Test Entity",
"country": "United States",
"country_code": "US"
},
"customer_id": null,
"customer": null,
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c3fd",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c3fd",
"name": "Professional Services",
"description": null,
"quantity": 1,
"price": 1500,
"gross_price": null,
"taxes": [],
"discounts": [],
"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,
"total": 1500,
"total_with_tax": 1500,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [],
"date_year": 2026,
"metadata": {},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2026-02-01T00:00:00.000Z",
"total_paid": 0,
"total_due": 1500,
"paid_in_full": false,
"furs": null
},
"changed_fields": [
"items"
],
"user": {
"id": "usr_123",
"name": "John Doe",
"email": "john@example.com"
},
"reason": "Corrected prepayment breakdown",
"created_at": "2025-01-14T15:00:00.000Z"
}
],
"count": 2
}Get specific advance invoice version
/advance-invoices/{id}/versions/{version}Retrieve a specific version snapshot of an advance invoice.
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Advance Invoice ID
Version number
curl "https://eu.spaceinvoices.com/advance-invoices/{id}/versions/{version}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
Version record ID
{
"id": "ver_abc123",
"document_type": "advance_invoice",
"document_id": "adv_6595a27b5d35015c3ef0c3fd",
"version": 1,
"snapshot": {
"id": "adv_6595a27b5d35015c3ef0c3fd",
"entity_id": "ent_6595a27b5d35015c3ef0c3fd",
"number": "2026-00001",
"date": "2026-01-01T00:00:00.000Z",
"currency_code": "USD",
"issuer": {
"name": "Test Entity",
"country": "United States",
"country_code": "US"
},
"customer_id": null,
"customer": null,
"items": [
{
"id": "adv_item_6595a27b5d35015c3ef0c3fd",
"advance_invoice_id": "adv_6595a27b5d35015c3ef0c3fd",
"name": "Professional Services",
"description": null,
"quantity": 1,
"price": 1500,
"gross_price": null,
"taxes": [],
"discounts": [],
"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,
"total": 1500,
"total_with_tax": 1500,
"total_converted": null,
"total_with_tax_converted": null,
"shareable_id": null,
"taxes": [],
"date_year": 2026,
"metadata": {},
"created_at": "2026-01-01T00:00:00.000Z",
"updated_at": "2026-01-01T00:00:00.000Z",
"voided_at": null,
"exchange_rate": null,
"rounding_correction": null,
"transaction_type": "domestic",
"vies": null,
"tax_clause": null,
"date_due": "2026-02-01T00:00:00.000Z",
"total_paid": 0,
"total_due": 1500,
"paid_in_full": false,
"furs": null
},
"changed_fields": [
"items"
],
"user": {
"id": "usr_123",
"name": "John Doe",
"email": "john@example.com"
},
"reason": "Corrected prepayment breakdown",
"created_at": "2025-01-14T15:00:00.000Z"
}Preview next document number
/documents/next-numberPreview 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 ID on which the request is made. Optional - defaults to the first created entity if not provided.
Query parameters
Document type
Possible values: "invoice", "estimate", "credit_note", "advance_invoice"
Business premise name (Slovenia FURS). If provided with electronic_device_name, returns fiscalization-format number.
Electronic device name (Slovenia FURS). Required if business_premise_name is provided.
curl "https://eu.spaceinvoices.com/documents/next-number" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"number": "2026-00042",
"furs": null
}Render advance invoice preview
/advance-invoices/renderRender an HTML preview of an advance invoice without saving to the database. Perfect for displaying live previews in advance invoice creation/edit forms. Supports both partial mode (allows incomplete data for drafts) and complete mode (validates all required fields).
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Query parameters
Document template design to use
Possible values: "modern", "classic", "minimal", "fashion"
Default: "modern"
Whether to treat the document as partial (allows incomplete data) or complete (validates all required fields)
Possible values: "true", "false"
Default: "true"
curl -X POST "https://eu.spaceinvoices.com/advance-invoices/render" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"name": "Prepayment - Project Setup",
"quantity": 1,
"price": 2500
}
],
"customer": {
"name": "Acme Corp"
}
}'Render HTML
/documents/{id}/htmlRender 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 ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Unique resource identifier
Query parameters
Document template design to use
Possible values: "modern", "classic", "minimal", "fashion"
Default: "modern"
curl "https://eu.spaceinvoices.com/documents/{id}/html" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Render PDF
/documents/{id}/pdfRender 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 ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Unique resource identifier
Query parameters
Document template design to use
Possible values: "modern", "classic", "minimal", "fashion"
Default: "modern"
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
/documents/{id}/finalizeFinalize 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 ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Document ID
Query parameters
Document type
Possible values: "invoice", "estimate", "credit_note", "advance_invoice"
curl -X POST "https://eu.spaceinvoices.com/documents/{id}/finalize" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"nullDelete a draft document
/documents/{id}Delete a draft document. Only draft documents can be deleted. Finalized documents cannot be deleted - use void instead.
Header parameters
Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.
Path parameters
Document ID
Query parameters
Document type
Possible values: "invoice", "estimate", "credit_note", "advance_invoice"
curl -X DELETE "https://eu.spaceinvoices.com/documents/{id}" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"