Skip to content

Estimates

The Estimate object

object

Attributes

idstring
numberstring
itemsarray of objects
datestring<date-time>

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

date_valid_tillstring<date-time>

Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)

customer_idstring
customerobject

Customer information

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
issuerobject
notestring
payment_termsstring
tax_clausestring
currency_codestring
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
viesobject
created_atstring<date-time>
updated_atstring<date-time>
title_typestring
date_duestring
date_servicestring
date_service_tostring
Examplejson
{
  "id": "est_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": "est_item_6595a27b5d35015c3ef0c402",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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": "est_item_6595a27b5d35015c3ef0c403",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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,
  "payment_terms": null,
  "date_valid_till": "2025-04-15T00:00:00.000Z"
}

Create a new estimate

POST/estimates

Create a new estimate with line items.
Customer is optional - can be omitted or added inline without referencing a customer_id.
The estimate number is auto-generated based on the entity's number format settings.
Taxes are calculated automatically based on the tax rates provided.
Estimates are valid until the date_valid_till field (defaults to 30 days from creation).

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.

Body parameters

itemsarray of objectsrequired

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

datestringoptional

Document date in YYYY-MM-DD format

date_valid_tillstringoptional

Estimate validity date in YYYY-MM-DD format

customer_idstringoptional

Referenced Customer ID. Required if customer is not provided.

customerobjectoptional

Customer of the estimate.
Both customer and customer_id are optional - estimates can be created without customer information.
If customer_id is provided with save_customer=true, the existing customer will be updated.
If only customer is provided, the system checks for duplicates by tax_number or name.

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
issuerobjectoptional
notestringoptional
payment_termsstringoptional
tax_clausestringoptional
currency_codestringoptional
title_typestringoptional
date_duestringoptional
date_servicestringoptional
date_service_tostringoptional
eslogobjectoptional
expected_total_with_taxnumberoptional
curl -X POST "https://eu.spaceinvoices.com/estimates" \
  -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
      }
    ]
  }'
Example:

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

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

date_valid_tillstring<date-time>

Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)

customer_idstring
customerobject

Customer information

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
issuerobject
notestring
payment_termsstring
tax_clausestring
currency_codestring
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
viesobject
created_atstring<date-time>
updated_atstring<date-time>
title_typestring
date_duestring
date_servicestring
date_service_tostring
json
{
  "id": "est_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": "est_item_6595a27b5d35015c3ef0c3fd",
      "estimate_id": "est_6595a27b5d35015c3ef0c3fd",
      "advance_invoice_id": null,
      "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,
  "payment_terms": null,
  "date_valid_till": "2026-02-01T00:00:00.000Z"
}
Example:

List all estimates

GET/estimates

Retrieve a paginated list of estimates 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. Optional - defaults to the first created entity if not provided.

Query parameters

limitintegeroptional

Number of results per request.

Default: 10

next_cursorstringoptional

Cursor to fetch the next page of results. Use the value from pagination.next_cursor in the previous response.

prev_cursorstringoptional

Cursor to fetch the previous page of results. 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
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, metadata, created_at, updated_at, paid_in_full, voided_at, date_valid_till

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.

curl "https://eu.spaceinvoices.com/estimates" \
  -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": "est_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": "est_item_6595a27b5d35015c3ef0c402",
          "estimate_id": "est_6595a27b5d35015c3ef0c402",
          "advance_invoice_id": null,
          "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": "est_item_6595a27b5d35015c3ef0c403",
          "estimate_id": "est_6595a27b5d35015c3ef0c402",
          "advance_invoice_id": null,
          "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,
      "payment_terms": null,
      "date_valid_till": "2025-04-15T00:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Get estimate by ID

GET/estimates/{id}

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

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl "https://eu.spaceinvoices.com/estimates/{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 estimate was created (ISO 8601 datetime at midnight UTC)

date_valid_tillstring<date-time>

Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)

customer_idstring
customerobject

Customer information

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
issuerobject
notestring
payment_termsstring
tax_clausestring
currency_codestring
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
viesobject
created_atstring<date-time>
updated_atstring<date-time>
title_typestring
date_duestring
date_servicestring
date_service_tostring
json
{
  "id": "est_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": "est_item_6595a27b5d35015c3ef0c402",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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": "est_item_6595a27b5d35015c3ef0c403",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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,
  "payment_terms": null,
  "date_valid_till": "2025-04-15T00:00:00.000Z"
}

Update an estimate

PATCH/estimates/{id}

Update an existing estimate.
Creates a version snapshot before applying changes.
Cannot update voided estimates.
If items are provided, they replace all existing items.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.

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_valid_tillstringoptional

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

customer_idstringoptional

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

customerobjectoptional

Customer information. Set to null to remove inline customer data.

metadataobjectoptional

Custom metadata object. Set to null to clear.

Other parameters
issuerobjectoptional
notestringoptional
payment_termsstringoptional
currency_codestringoptional
change_reasonstringoptional
title_typestringoptional
eslogobjectoptional
curl -X PATCH "https://eu.spaceinvoices.com/estimates/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "note": "Updated pricing valid until end of month",
    "change_reason": "Added validity note"
  }'
Example:

Returns

idstring
numberstring
itemsarray of objects
datestring<date-time>

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

date_valid_tillstring<date-time>

Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)

customer_idstring
customerobject

Customer information

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
issuerobject
notestring
payment_termsstring
tax_clausestring
currency_codestring
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
viesobject
created_atstring<date-time>
updated_atstring<date-time>
title_typestring
date_duestring
date_servicestring
date_service_tostring
json
{
  "id": "est_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": "est_item_6595a27b5d35015c3ef0c402",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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": "est_item_6595a27b5d35015c3ef0c403",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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,
  "payment_terms": null,
  "date_valid_till": "2025-04-15T00:00:00.000Z"
}

Get estimate version history

GET/estimates/{id}/versions

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

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.

Path parameters

idstring<resource-id>required

Unique resource identifier

curl "https://eu.spaceinvoices.com/estimates/{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": "estimate",
      "document_id": "est_6595a27b5d35015c3ef0c3fd",
      "version": 2,
      "snapshot": {
        "id": "est_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": "est_item_6595a27b5d35015c3ef0c3fd",
            "estimate_id": "est_6595a27b5d35015c3ef0c3fd",
            "advance_invoice_id": null,
            "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,
        "payment_terms": null,
        "date_valid_till": "2026-02-01T00:00:00.000Z"
      },
      "changed_fields": [
        "note"
      ],
      "user": {
        "id": "usr_123",
        "name": "John Doe",
        "email": "john@example.com"
      },
      "reason": "Updated validity note",
      "created_at": "2025-01-15T10:30:00.000Z"
    },
    {
      "id": "ver_xyz789",
      "document_type": "estimate",
      "document_id": "est_6595a27b5d35015c3ef0c3fd",
      "version": 1,
      "snapshot": {
        "id": "est_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": "est_item_6595a27b5d35015c3ef0c3fd",
            "estimate_id": "est_6595a27b5d35015c3ef0c3fd",
            "advance_invoice_id": null,
            "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,
        "payment_terms": null,
        "date_valid_till": "2026-02-01T00:00:00.000Z"
      },
      "changed_fields": [
        "items"
      ],
      "user": {
        "id": "usr_123",
        "name": "John Doe",
        "email": "john@example.com"
      },
      "reason": "Revised scope and pricing",
      "created_at": "2025-01-14T15:00:00.000Z"
    }
  ],
  "count": 2
}

Get specific estimate version

GET/estimates/{id}/versions/{version}

Retrieve a specific version snapshot of an estimate.

Header parameters

entity_idstringoptional

Entity ID on which the request is made. Optional - defaults to the first created entity if not provided.

Path parameters

idstringrequired

Estimate ID

versionintegerrequired

Version number

curl "https://eu.spaceinvoices.com/estimates/{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": "estimate",
  "document_id": "est_6595a27b5d35015c3ef0c3fd",
  "version": 1,
  "snapshot": {
    "id": "est_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": "est_item_6595a27b5d35015c3ef0c3fd",
        "estimate_id": "est_6595a27b5d35015c3ef0c3fd",
        "advance_invoice_id": null,
        "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,
    "payment_terms": null,
    "date_valid_till": "2026-02-01T00:00:00.000Z"
  },
  "changed_fields": [
    "items"
  ],
  "user": {
    "id": "usr_123",
    "name": "John Doe",
    "email": "john@example.com"
  },
  "reason": "Revised scope and pricing",
  "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. Optional - defaults to the first created entity if not provided.

Query parameters

typestringrequired

Document type

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

business_premise_namestringoptional

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

electronic_device_namestringoptional

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

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

Render estimate preview

POST/estimates/render

Render an HTML preview of an estimate without saving to the database. Perfect for displaying live previews in estimate 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. Optional - defaults to the first created entity if not provided.

Query parameters

templatestringoptional

Document template design to use

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

Default: "modern"

localestringoptional
partialstringoptional

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/estimates/render" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "name": "Website Redesign",
        "quantity": 1,
        "price": 5000
      }
    ],
    "customer": {
      "name": "Acme Corp"
    }
  }'
Example:

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. Optional - defaults to the first created entity if not provided.

Path parameters

idstring<resource-id>required

Unique resource identifier

Query parameters

templatestringoptional

Document template design to use

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

Default: "modern"

localestringoptional
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. Optional - defaults to the first created entity if not provided.

Path parameters

idstring<resource-id>required

Unique resource identifier

Query parameters

templatestringoptional

Document template design to use

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

Default: "modern"

localestringoptional
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. Optional - defaults to the first created entity if not provided.

Path parameters

idstringrequired

Document ID

Query parameters

typestringrequired

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"
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. Optional - defaults to the first created entity if not provided.

Path parameters

idstringrequired

Document ID

Query parameters

typestringrequired

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"

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. Optional - defaults to the first created entity if not provided.

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. Optional - defaults to the first created entity if not provided.

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. Optional - defaults to the first created entity if not provided.

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 estimate

GET/estimates/shareable/{shareableId}

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

Path parameters

shareableIdstringrequired

Shareable document token

curl "https://eu.spaceinvoices.com/estimates/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 estimate was created (ISO 8601 datetime at midnight UTC)

date_valid_tillstring<date-time>

Date until which the estimate is valid (ISO 8601 datetime at midnight UTC)

customer_idstring
customerobject

Customer information

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
issuerobject
notestring
payment_termsstring
tax_clausestring
currency_codestring
entity_idstring
date_yearinteger
shareable_idstring
voided_atstring<date>
transaction_typestring
exchange_rateobject
total_convertednumber
total_with_tax_convertednumber
rounding_correctionnumber
eslogobject
viesobject
created_atstring<date-time>
updated_atstring<date-time>
title_typestring
date_duestring
date_servicestring
date_service_tostring
json
{
  "id": "est_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": "est_item_6595a27b5d35015c3ef0c402",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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": "est_item_6595a27b5d35015c3ef0c403",
      "estimate_id": "est_6595a27b5d35015c3ef0c402",
      "advance_invoice_id": null,
      "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,
  "payment_terms": null,
  "date_valid_till": "2025-04-15T00:00:00.000Z"
}

Get shareable estimate as HTML

GET/estimates/shareable/{shareableId}/html

Get estimate 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

Document language for rendering. Defaults to entity locale.

Possible values: "en-US", "de-DE", "es-ES", "fr-FR", "it-IT", "sl-SI"

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

Download shareable estimate as PDF

GET/estimates/shareable/{shareableId}/pdf

Download estimate 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

Document language for rendering. Defaults to entity locale.

Possible values: "en-US", "de-DE", "es-ES", "fr-FR", "it-IT", "sl-SI"

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