Skip to content

Incoming Purchase Documents

The Incoming Purchase Document object

object

Attributes

idstring
Other attributes
entity_idstring
supplier_idstringnullable
typestring
is_draftboolean
cancelled_atstring<date-time>nullable
supplierobjectnullable
supplier_document_numberstringnullable
datestringnullable
date_receivedstringnullable
date_duestringnullable
date_servicestringnullable
date_service_tostringnullable
currency_codestringnullable
transaction_typestringnullable
referencestringnullable
notestringnullable
summary_classificationstringnullable
itemsarray of objects
taxesarray of objects
totalnumbernullable
total_with_taxnumbernullable
total_discountnumber
total_paidnumber
total_duenumber
paid_in_fullboolean
exchange_rateobjectnullable
metadata
created_atstring<date-time>
updated_atstring<date-time>
Examplejson
{
  "id": "ipd_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
  "type": "invoice",
  "is_draft": false,
  "cancelled_at": null,
  "supplier": {
    "name": "Elektroservisi d.o.o.",
    "address": "Agrokombinatska cesta 52a",
    "address_2": null,
    "post_code": "1000",
    "city": "Ljubljana",
    "state": null,
    "country": "Slovenia",
    "country_code": "SI",
    "tax_number": "SI987654321",
    "company_number": "0987654321",
    "email": "accounts@elektroservisi.si",
    "phone": "+38640111222",
    "peppol_id": "0088:987654321",
    "is_tax_subject": true
  },
  "supplier_document_number": "PR-2025-001",
  "date": "2025-10-03",
  "date_received": "2025-10-03",
  "date_due": "2025-11-02",
  "date_service": null,
  "date_service_to": null,
  "currency_code": "EUR",
  "transaction_type": "domestic",
  "reference": "SI00-2025-001",
  "note": "Monthly maintenance services",
  "summary_classification": null,
  "items": [
    {
      "name": "Maintenance services",
      "description": "Monthly electrical maintenance",
      "quantity": 1,
      "unit": "service",
      "classification": "service",
      "price": 100,
      "gross_price": 122,
      "discounts": [],
      "taxes": [
        {
          "rate": 22,
          "amount": 22
        }
      ],
      "total": 100,
      "total_with_tax": 122,
      "total_tax": 22
    }
  ],
  "taxes": [
    {
      "rate": 22,
      "base": 100,
      "total_tax": 22,
      "is_deductible": true,
      "reverse_charged": false
    }
  ],
  "total": 100,
  "total_with_tax": 122,
  "total_discount": 0,
  "total_paid": 0,
  "total_due": 122,
  "paid_in_full": false,
  "exchange_rate": null,
  "metadata": {
    "source": "manual"
  },
  "created_at": "2025-10-03T08:00:00.000Z",
  "updated_at": "2025-10-03T08:00:00.000Z"
}

Create incoming purchase document

POST/incoming-purchase-documents

Create incoming purchase 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.

Body parameters

typestringrequired

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

Other parameters
is_draftbooleanoptionalnullable
supplier_idstringoptionalnullable
supplierobjectoptionalnullable
save_supplierbooleanoptionalnullable
supplier_document_numberstringoptionalnullable
datestringoptionalnullable
date_receivedstringoptionalnullable
date_duestringoptionalnullable
date_servicestringoptionalnullable
date_service_tostringoptionalnullable
currency_codestringoptionalnullable
transaction_typestringoptionalnullable
referencestringoptionalnullable
notestringoptionalnullable
itemsarray of objectsoptionalnullable
taxesarray of objectsoptionalnullable
totalnumberoptionalnullable
total_with_taxnumberoptionalnullable
total_discountnumberoptionalnullable
exchange_rateobjectoptionalnullable
summary_classificationstringoptionalnullable
cancelled_atstring<date-time>optionalnullable
metadataobjectoptionalnullable
curl -X POST "https://eu.spaceinvoices.com/incoming-purchase-documents" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "invoice",
    "is_draft": false,
    "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
    "supplier_document_number": "PR-2025-001",
    "date": "2025-10-03",
    "date_received": "2025-10-03",
    "date_due": "2025-11-02",
    "currency_code": "EUR",
    "transaction_type": "domestic",
    "reference": "SI00-2025-001",
    "note": "Monthly maintenance services",
    "items": [
      {
        "name": "Maintenance services",
        "description": "Monthly electrical maintenance",
        "quantity": 1,
        "unit": "service",
        "classification": "service",
        "price": 100,
        "gross_price": 122,
        "discounts": [],
        "taxes": [
          {
            "rate": 22,
            "amount": 22
          }
        ],
        "total": 100,
        "total_with_tax": 122,
        "total_tax": 22
      }
    ],
    "taxes": [
      {
        "rate": 22,
        "base": 100,
        "total_tax": 22,
        "is_deductible": true,
        "reverse_charged": false
      }
    ],
    "total": 100,
    "total_with_tax": 122
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
supplier_idstringnullable
typestring
is_draftboolean
cancelled_atstring<date-time>nullable
supplierobjectnullable
supplier_document_numberstringnullable
datestringnullable
date_receivedstringnullable
date_duestringnullable
date_servicestringnullable
date_service_tostringnullable
currency_codestringnullable
transaction_typestringnullable
referencestringnullable
notestringnullable
summary_classificationstringnullable
itemsarray of objects
taxesarray of objects
totalnumbernullable
total_with_taxnumbernullable
total_discountnumber
total_paidnumber
total_duenumber
paid_in_fullboolean
exchange_rateobjectnullable
metadata
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ipd_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
  "type": "invoice",
  "is_draft": false,
  "cancelled_at": null,
  "supplier": {
    "name": "Elektroservisi d.o.o.",
    "address": "Agrokombinatska cesta 52a",
    "address_2": null,
    "post_code": "1000",
    "city": "Ljubljana",
    "state": null,
    "country": "Slovenia",
    "country_code": "SI",
    "tax_number": "SI987654321",
    "company_number": "0987654321",
    "email": "accounts@elektroservisi.si",
    "phone": "+38640111222",
    "peppol_id": "0088:987654321",
    "is_tax_subject": true
  },
  "supplier_document_number": "PR-2025-001",
  "date": "2025-10-03",
  "date_received": "2025-10-03",
  "date_due": "2025-11-02",
  "date_service": null,
  "date_service_to": null,
  "currency_code": "EUR",
  "transaction_type": "domestic",
  "reference": "SI00-2025-001",
  "note": "Monthly maintenance services",
  "summary_classification": null,
  "items": [
    {
      "name": "Maintenance services",
      "description": "Monthly electrical maintenance",
      "quantity": 1,
      "unit": "service",
      "classification": "service",
      "price": 100,
      "gross_price": 122,
      "discounts": [],
      "taxes": [
        {
          "rate": 22,
          "amount": 22
        }
      ],
      "total": 100,
      "total_with_tax": 122,
      "total_tax": 22
    }
  ],
  "taxes": [
    {
      "rate": 22,
      "base": 100,
      "total_tax": 22,
      "is_deductible": true,
      "reverse_charged": false
    }
  ],
  "total": 100,
  "total_with_tax": 122,
  "total_discount": 0,
  "total_paid": 0,
  "total_due": 122,
  "paid_in_full": false,
  "exchange_rate": null,
  "metadata": {
    "source": "manual"
  },
  "created_at": "2025-10-03T08:00:00.000Z",
  "updated_at": "2025-10-03T08:00:00.000Z"
}
Example:

Create incoming purchase document with pre-calculated totals

POST/incoming-purchase-documents/custom

Create an incoming purchase document using externally prepared values from OCR, ERP, or accounting software.
The caller provides document totals, item totals, and tax summaries directly.
The persistence, supplier handling, payment tracking initialization, and lifecycle rules are 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

typestringrequired

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

Other parameters
is_draftbooleanoptionalnullable
supplier_idstringoptionalnullable
supplierobjectoptionalnullable
save_supplierbooleanoptionalnullable
supplier_document_numberstringoptionalnullable
datestringoptionalnullable
date_receivedstringoptionalnullable
date_duestringoptionalnullable
date_servicestringoptionalnullable
date_service_tostringoptionalnullable
currency_codestringoptionalnullable
transaction_typestringoptionalnullable
referencestringoptionalnullable
notestringoptionalnullable
itemsarray of objectsoptionalnullable
taxesarray of objectsoptionalnullable
totalnumberoptionalnullable
total_with_taxnumberoptionalnullable
total_discountnumberoptionalnullable
exchange_rateobjectoptionalnullable
summary_classificationstringoptionalnullable
cancelled_atstring<date-time>optionalnullable
metadataobjectoptionalnullable
curl -X POST "https://eu.spaceinvoices.com/incoming-purchase-documents/custom" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "invoice",
    "is_draft": false,
    "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
    "supplier_document_number": "PR-2025-001",
    "date": "2025-10-03",
    "date_received": "2025-10-03",
    "date_due": "2025-11-02",
    "currency_code": "EUR",
    "transaction_type": "domestic",
    "reference": "SI00-2025-001",
    "note": "Monthly maintenance services",
    "items": [
      {
        "name": "Maintenance services",
        "description": "Monthly electrical maintenance",
        "quantity": 1,
        "unit": "service",
        "classification": "service",
        "price": 100,
        "gross_price": 122,
        "discounts": [],
        "taxes": [
          {
            "rate": 22,
            "amount": 22
          }
        ],
        "total": 100,
        "total_with_tax": 122,
        "total_tax": 22
      }
    ],
    "taxes": [
      {
        "rate": 22,
        "base": 100,
        "total_tax": 22,
        "is_deductible": true,
        "reverse_charged": false
      }
    ],
    "total": 100,
    "total_with_tax": 122
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
supplier_idstringnullable
typestring
is_draftboolean
cancelled_atstring<date-time>nullable
supplierobjectnullable
supplier_document_numberstringnullable
datestringnullable
date_receivedstringnullable
date_duestringnullable
date_servicestringnullable
date_service_tostringnullable
currency_codestringnullable
transaction_typestringnullable
referencestringnullable
notestringnullable
summary_classificationstringnullable
itemsarray of objects
taxesarray of objects
totalnumbernullable
total_with_taxnumbernullable
total_discountnumber
total_paidnumber
total_duenumber
paid_in_fullboolean
exchange_rateobjectnullable
metadata
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ipd_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
  "type": "invoice",
  "is_draft": false,
  "cancelled_at": null,
  "supplier": {
    "name": "Elektroservisi d.o.o.",
    "address": "Agrokombinatska cesta 52a",
    "address_2": null,
    "post_code": "1000",
    "city": "Ljubljana",
    "state": null,
    "country": "Slovenia",
    "country_code": "SI",
    "tax_number": "SI987654321",
    "company_number": "0987654321",
    "email": "accounts@elektroservisi.si",
    "phone": "+38640111222",
    "peppol_id": "0088:987654321",
    "is_tax_subject": true
  },
  "supplier_document_number": "PR-2025-001",
  "date": "2025-10-03",
  "date_received": "2025-10-03",
  "date_due": "2025-11-02",
  "date_service": null,
  "date_service_to": null,
  "currency_code": "EUR",
  "transaction_type": "domestic",
  "reference": "SI00-2025-001",
  "note": "Monthly maintenance services",
  "summary_classification": null,
  "items": [
    {
      "name": "Maintenance services",
      "description": "Monthly electrical maintenance",
      "quantity": 1,
      "unit": "service",
      "classification": "service",
      "price": 100,
      "gross_price": 122,
      "discounts": [],
      "taxes": [
        {
          "rate": 22,
          "amount": 22
        }
      ],
      "total": 100,
      "total_with_tax": 122,
      "total_tax": 22
    }
  ],
  "taxes": [
    {
      "rate": 22,
      "base": 100,
      "total_tax": 22,
      "is_deductible": true,
      "reverse_charged": false
    }
  ],
  "total": 100,
  "total_with_tax": 122,
  "total_discount": 0,
  "total_paid": 0,
  "total_due": 122,
  "paid_in_full": false,
  "exchange_rate": null,
  "metadata": {
    "source": "manual"
  },
  "created_at": "2025-10-03T08:00:00.000Z",
  "updated_at": "2025-10-03T08:00:00.000Z"
}
Example:

List incoming purchase documents

GET/incoming-purchase-documents

Retrieve a paginated list of incoming purchase documents with optional filtering.
Supports cursor-based pagination, full-text search across supplier snapshot and document fields, and suite-standard JSON query filters for date, totals, payment state, and supplier snapshot data.

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.

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, type, is_draft, cancelled_at, supplier_id, supplier, supplier_document_number, date, date_received, date_due, date_service, date_service_to, currency_code, transaction_type, reference, note, summary_classification, total, total_with_tax, total_paid, total_due, paid_in_full, created_at, updated_at, metadata

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/incoming-purchase-documents" \
  -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": "ipd_6595a27b5d35015c3ef0c3fd",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
      "type": "invoice",
      "is_draft": false,
      "cancelled_at": null,
      "supplier": {
        "name": "Elektroservisi d.o.o.",
        "address": "Agrokombinatska cesta 52a",
        "address_2": null,
        "post_code": "1000",
        "city": "Ljubljana",
        "state": null,
        "country": "Slovenia",
        "country_code": "SI",
        "tax_number": "SI987654321",
        "company_number": "0987654321",
        "email": "accounts@elektroservisi.si",
        "phone": "+38640111222",
        "peppol_id": "0088:987654321",
        "is_tax_subject": true
      },
      "supplier_document_number": "PR-2025-001",
      "date": "2025-10-03",
      "date_received": "2025-10-03",
      "date_due": "2025-11-02",
      "date_service": null,
      "date_service_to": null,
      "currency_code": "EUR",
      "transaction_type": "domestic",
      "reference": "SI00-2025-001",
      "note": "Monthly maintenance services",
      "summary_classification": null,
      "items": [
        {
          "name": "Maintenance services",
          "description": "Monthly electrical maintenance",
          "quantity": 1,
          "unit": "service",
          "classification": "service",
          "price": 100,
          "gross_price": 122,
          "discounts": [],
          "taxes": [
            {
              "rate": 22,
              "amount": 22
            }
          ],
          "total": 100,
          "total_with_tax": 122,
          "total_tax": 22
        }
      ],
      "taxes": [
        {
          "rate": 22,
          "base": 100,
          "total_tax": 22,
          "is_deductible": true,
          "reverse_charged": false
        }
      ],
      "total": 100,
      "total_with_tax": 122,
      "total_discount": 0,
      "total_paid": 0,
      "total_due": 122,
      "paid_in_full": false,
      "exchange_rate": null,
      "metadata": {
        "source": "manual"
      },
      "created_at": "2025-10-03T08:00:00.000Z",
      "updated_at": "2025-10-03T08:00:00.000Z"
    },
    {
      "id": "ipd_7595a27b5d35015c3ef0c3fe",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
      "type": "invoice",
      "is_draft": false,
      "cancelled_at": null,
      "supplier": {
        "name": "Elektroservisi d.o.o.",
        "address": "Agrokombinatska cesta 52a",
        "address_2": null,
        "post_code": "1000",
        "city": "Ljubljana",
        "state": null,
        "country": "Slovenia",
        "country_code": "SI",
        "tax_number": "SI987654321",
        "company_number": "0987654321",
        "email": "accounts@elektroservisi.si",
        "phone": "+38640111222",
        "peppol_id": "0088:987654321",
        "is_tax_subject": true
      },
      "supplier_document_number": "AP-CUSTOM-001",
      "date": "2025-10-03",
      "date_received": "2025-10-03",
      "date_due": "2025-11-02",
      "date_service": null,
      "date_service_to": null,
      "currency_code": "EUR",
      "transaction_type": "domestic",
      "reference": "SI00-2025-001",
      "note": "Supplier provided totals only",
      "summary_classification": "services",
      "items": [],
      "taxes": [
        {
          "rate": 22,
          "base": 45.22,
          "total_tax": 9.95,
          "is_deductible": true,
          "reverse_charged": false
        },
        {
          "rate": 0,
          "base": 125.63,
          "total_tax": 0,
          "is_deductible": true,
          "reverse_charged": false
        }
      ],
      "total": 170.85,
      "total_with_tax": 180.8,
      "total_discount": 0,
      "total_paid": 0,
      "total_due": 122,
      "paid_in_full": false,
      "exchange_rate": null,
      "metadata": {
        "source": "manual"
      },
      "created_at": "2025-10-03T08:00:00.000Z",
      "updated_at": "2025-10-04T08:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 2,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}
Example:

Get incoming purchase document by ID

GET/incoming-purchase-documents/{id}

Get incoming purchase document by ID

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/incoming-purchase-documents/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Returns

idstring
Other parameters
entity_idstring
supplier_idstringnullable
typestring
is_draftboolean
cancelled_atstring<date-time>nullable
supplierobjectnullable
supplier_document_numberstringnullable
datestringnullable
date_receivedstringnullable
date_duestringnullable
date_servicestringnullable
date_service_tostringnullable
currency_codestringnullable
transaction_typestringnullable
referencestringnullable
notestringnullable
summary_classificationstringnullable
itemsarray of objects
taxesarray of objects
totalnumbernullable
total_with_taxnumbernullable
total_discountnumber
total_paidnumber
total_duenumber
paid_in_fullboolean
exchange_rateobjectnullable
metadata
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ipd_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
  "type": "invoice",
  "is_draft": false,
  "cancelled_at": null,
  "supplier": {
    "name": "Elektroservisi d.o.o.",
    "address": "Agrokombinatska cesta 52a",
    "address_2": null,
    "post_code": "1000",
    "city": "Ljubljana",
    "state": null,
    "country": "Slovenia",
    "country_code": "SI",
    "tax_number": "SI987654321",
    "company_number": "0987654321",
    "email": "accounts@elektroservisi.si",
    "phone": "+38640111222",
    "peppol_id": "0088:987654321",
    "is_tax_subject": true
  },
  "supplier_document_number": "PR-2025-001",
  "date": "2025-10-03",
  "date_received": "2025-10-03",
  "date_due": "2025-11-02",
  "date_service": null,
  "date_service_to": null,
  "currency_code": "EUR",
  "transaction_type": "domestic",
  "reference": "SI00-2025-001",
  "note": "Monthly maintenance services",
  "summary_classification": null,
  "items": [
    {
      "name": "Maintenance services",
      "description": "Monthly electrical maintenance",
      "quantity": 1,
      "unit": "service",
      "classification": "service",
      "price": 100,
      "gross_price": 122,
      "discounts": [],
      "taxes": [
        {
          "rate": 22,
          "amount": 22
        }
      ],
      "total": 100,
      "total_with_tax": 122,
      "total_tax": 22
    }
  ],
  "taxes": [
    {
      "rate": 22,
      "base": 100,
      "total_tax": 22,
      "is_deductible": true,
      "reverse_charged": false
    }
  ],
  "total": 100,
  "total_with_tax": 122,
  "total_discount": 0,
  "total_paid": 0,
  "total_due": 122,
  "paid_in_full": false,
  "exchange_rate": null,
  "metadata": {
    "source": "manual"
  },
  "created_at": "2025-10-03T08:00:00.000Z",
  "updated_at": "2025-10-03T08:00:00.000Z"
}

Update incoming purchase document

PATCH/incoming-purchase-documents/{id}

Update incoming purchase 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.

Path parameters

idstring<resource-id>required

Unique resource identifier

Body parameters

is_draftbooleanoptionalnullable
supplier_idstringoptionalnullable
supplierobjectoptionalnullable
save_supplierbooleanoptionalnullable
supplier_document_numberstringoptionalnullable
datestringoptionalnullable
date_receivedstringoptionalnullable
date_duestringoptionalnullable
date_servicestringoptionalnullable
date_service_tostringoptionalnullable
currency_codestringoptionalnullable
transaction_typestringoptionalnullable
referencestringoptionalnullable
notestringoptionalnullable
itemsarray of objectsoptionalnullable
taxesarray of objectsoptionalnullable
totalnumberoptionalnullable
total_with_taxnumberoptionalnullable
total_discountnumberoptionalnullable
exchange_rateobjectoptionalnullable
summary_classificationstringoptionalnullable
cancelled_atstring<date-time>optionalnullable
metadataobjectoptionalnullable
typestringoptional
curl -X PATCH "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "is_draft": false,
    "supplier_document_number": "PR-2025-099",
    "date": "2025-10-12",
    "date_received": "2025-10-13",
    "currency_code": "EUR",
    "transaction_type": "domestic",
    "summary_classification": "services",
    "taxes": [
      {
        "rate": 22,
        "base": 80,
        "total_tax": 17.6,
        "is_deductible": true,
        "reverse_charged": false
      }
    ],
    "total": 80,
    "total_with_tax": 97.6
  }'
Example:

Returns

idstring
Other parameters
entity_idstring
supplier_idstringnullable
typestring
is_draftboolean
cancelled_atstring<date-time>nullable
supplierobjectnullable
supplier_document_numberstringnullable
datestringnullable
date_receivedstringnullable
date_duestringnullable
date_servicestringnullable
date_service_tostringnullable
currency_codestringnullable
transaction_typestringnullable
referencestringnullable
notestringnullable
summary_classificationstringnullable
itemsarray of objects
taxesarray of objects
totalnumbernullable
total_with_taxnumbernullable
total_discountnumber
total_paidnumber
total_duenumber
paid_in_fullboolean
exchange_rateobjectnullable
metadata
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "ipd_6595a27b5d35015c3ef0c3fd",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "supplier_id": "sup_6595a27b5d35015c3ef0c3fd",
  "type": "invoice",
  "is_draft": false,
  "cancelled_at": "2025-10-20T00:00:00.000Z",
  "supplier": {
    "name": "Elektroservisi d.o.o.",
    "address": "Agrokombinatska cesta 52a",
    "address_2": null,
    "post_code": "1000",
    "city": "Ljubljana",
    "state": null,
    "country": "Slovenia",
    "country_code": "SI",
    "tax_number": "SI987654321",
    "company_number": "0987654321",
    "email": "accounts@elektroservisi.si",
    "phone": "+38640111222",
    "peppol_id": "0088:987654321",
    "is_tax_subject": true
  },
  "supplier_document_number": "PR-2025-001",
  "date": "2025-10-03",
  "date_received": "2025-10-03",
  "date_due": "2025-11-02",
  "date_service": null,
  "date_service_to": null,
  "currency_code": "EUR",
  "transaction_type": "domestic",
  "reference": "SI00-2025-001",
  "note": "Monthly maintenance services",
  "summary_classification": null,
  "items": [
    {
      "name": "Maintenance services",
      "description": "Monthly electrical maintenance",
      "quantity": 1,
      "unit": "service",
      "classification": "service",
      "price": 100,
      "gross_price": 122,
      "discounts": [],
      "taxes": [
        {
          "rate": 22,
          "amount": 22
        }
      ],
      "total": 100,
      "total_with_tax": 122,
      "total_tax": 22
    }
  ],
  "taxes": [
    {
      "rate": 22,
      "base": 100,
      "total_tax": 22,
      "is_deductible": true,
      "reverse_charged": false
    }
  ],
  "total": 100,
  "total_with_tax": 122,
  "total_discount": 0,
  "total_paid": 0,
  "total_due": 122,
  "paid_in_full": false,
  "exchange_rate": null,
  "metadata": {
    "source": "manual"
  },
  "created_at": "2025-10-03T08:00:00.000Z",
  "updated_at": "2025-10-20T00:00:00.000Z"
}

Delete incoming purchase document attachment

DELETE/incoming-purchase-documents/{id}/attachments/{fileId}

Delete incoming purchase document attachment

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
fileIdstringrequired
curl -X DELETE "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}/attachments/{fileId}" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID"

Upload incoming purchase document attachment

POST/incoming-purchase-documents/{id}/attachments

Upload incoming purchase document attachment

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

Body parameters

filestring<binary>required

File to upload

curl -X POST "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}/attachments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -F "file=@/path/to/image.png"

Returns

idstring
Other parameters
entity_idstring
business_unit_idstringnullable
invoice_idstringnullable
estimate_idstringnullable
credit_note_idstringnullable
advance_invoice_idstringnullable
incoming_purchase_document_idstringnullable
categorystring
urlstring
secureUrlstring
publicIdstring
formatstring
widthintegernullable
heightintegernullable
bytesinteger
filenamestringnullable
mime_typestring
metadata
cache_keystringnullable
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_id": "string",
  "business_unit_id": "string",
  "invoice_id": "string",
  "estimate_id": "string",
  "credit_note_id": "string",
  "advance_invoice_id": "string",
  "incoming_purchase_document_id": "string",
  "category": "string",
  "url": "string",
  "secureUrl": "string",
  "publicId": "string",
  "format": "string",
  "width": 0,
  "height": 0,
  "bytes": 0,
  "filename": "string",
  "mime_type": "string",
  "metadata": null,
  "cache_key": "string",
  "created_at": "2025-01-15T10:30:00.000Z",
  "updated_at": "2025-01-15T10:30:00.000Z"
}

List incoming purchase document attachments

GET/incoming-purchase-documents/{id}/attachments

List incoming purchase document attachments

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
curl "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}/attachments" \
  -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": "file_9595a27b5d35015c3ef0c3fa",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "invoice_id": null,
      "estimate_id": null,
      "credit_note_id": null,
      "advance_invoice_id": null,
      "incoming_purchase_document_id": "ipd_6595a27b5d35015c3ef0c3fd",
      "category": "attachment",
      "url": "https://storage.example.com/si/entities/ent_6595a27b5d35015c3ef0c3fd/attachments/incoming-purchase-document.pdf",
      "secureUrl": "https://storage.example.com/si/entities/ent_6595a27b5d35015c3ef0c3fd/attachments/incoming-purchase-document.pdf",
      "publicId": "si/entities/ent_6595a27b5d35015c3ef0c3fd/attachments/incoming-purchase-document.pdf",
      "format": "pdf",
      "width": null,
      "height": null,
      "bytes": 245678,
      "filename": "supplier-invoice.pdf",
      "mime_type": "application/pdf",
      "metadata": {},
      "created_at": "2025-10-03T08:05:00.000Z",
      "updated_at": "2025-10-03T08:05:00.000Z"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

List payments affecting an incoming purchase document

GET/incoming-purchase-documents/{id}/payments

List payments affecting an incoming purchase 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.

Path parameters

idstringrequired
curl "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}/payments" \
  -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": "pmt_abc123def456",
      "invoice_id": null,
      "credit_note_id": null,
      "advance_invoice_id": null,
      "incoming_purchase_document_id": "ipd_6595a27b5d35015c3ef0c3fd",
      "applied_to_incoming_purchase_document_id": null,
      "amount": 122,
      "amount_converted": 122,
      "currency_code": "EUR",
      "type": "bank_transfer",
      "date": "2025-10-10T00:00:00.000Z",
      "reference": "SI00-2025-001",
      "tag": null,
      "note": "Supplier payment",
      "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
      "metadata": {},
      "deleted_at": null,
      "created_at": "2025-10-10T08:00:00.000Z",
      "updated_at": "2025-10-10T08:00:00.000Z"
    }
  ],
  "pagination": {
    "total": 1,
    "next_cursor": null,
    "prev_cursor": null,
    "has_more": false
  }
}

Create a payment for an incoming purchase document

POST/incoming-purchase-documents/{id}/payments

Create a payment for an incoming purchase 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.

Path parameters

idstringrequired

Body parameters

amountnumberrequired
typestringrequired

Payment type/method

Possible values: "cash", "bank_transfer", "card", "check", "paypal", "coupon", "other", "credit_note", "advance"

Other parameters
applied_to_incoming_purchase_document_idstringoptionalnullable
datestringoptional
tagstringoptionalnullable
referencestringoptionalnullable
notestringoptionalnullable
metadataobjectoptionalnullable
curl -X POST "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}/payments" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "x-entity-id: YOUR_ENTITY_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 122,
    "type": "bank_transfer",
    "date": "2025-10-10",
    "reference": "SI00-2025-001",
    "note": "Supplier payment"
  }'
Example:

Returns

idstring
Other parameters
invoice_idstringnullable
credit_note_idstringnullable
advance_invoice_idstringnullable
incoming_purchase_document_idstringnullable
applied_to_incoming_purchase_document_idstringnullable
amountnumber
currency_codestring
amount_convertednumber
typestring
datestring<date-time>
tagstringnullable
referencestringnullable
notestringnullable
entity_idstring
metadataobjectnullable
deleted_atstring<date-time>nullable
created_atstring<date-time>
updated_atstring<date-time>
Invoiceobjectnullable
CreditNoteobjectnullable
AdvanceInvoiceobjectnullable
IncomingPurchaseDocumentobjectnullable
AppliedToIncomingPurchaseDocumentobjectnullable
json
{
  "id": "pmt_abc123def456",
  "invoice_id": null,
  "credit_note_id": null,
  "advance_invoice_id": null,
  "incoming_purchase_document_id": "ipd_6595a27b5d35015c3ef0c3fd",
  "applied_to_incoming_purchase_document_id": null,
  "amount": 122,
  "amount_converted": 122,
  "currency_code": "EUR",
  "type": "bank_transfer",
  "date": "2025-10-10T00:00:00.000Z",
  "reference": "SI00-2025-001",
  "tag": null,
  "note": "Supplier payment",
  "entity_id": "ent_6595a27b5d35015c3ef0c3fd",
  "metadata": {},
  "deleted_at": null,
  "created_at": "2025-10-10T08:00:00.000Z",
  "updated_at": "2025-10-10T08:00:00.000Z"
}
Example: