Skip to content

Incoming Purchase Documents

The Incoming Purchase Document object

object

Attributes

idstring
Other attributes
entity_idstring
supplier_idstring
typestring
is_draftboolean
cancelled_atstring<date-time>
supplierobject
supplier_document_numberstring
datestring
date_receivedstring
date_duestring
date_servicestring
date_service_tostring
currency_codestring
transaction_typestring
referencestring
notestring
summary_classificationstring
itemsarray of objects
taxesarray of objects
totalnumber
total_with_taxnumber
total_discountnumber
exchange_rateobject
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,
  "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_draftbooleanoptional
supplier_idstringoptional
supplierobjectoptional
save_supplierbooleanoptional
supplier_document_numberstringoptional
datestringoptional
date_receivedstringoptional
date_duestringoptional
date_servicestringoptional
date_service_tostringoptional
currency_codestringoptional
transaction_typestringoptional
referencestringoptional
notestringoptional
itemsarray of objectsoptional
taxesarray of objectsoptional
totalnumberoptional
total_with_taxnumberoptional
total_discountnumberoptional
exchange_rateobjectoptional
summary_classificationstringoptional
cancelled_atstring<date-time>optional
metadataobjectoptional
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_idstring
typestring
is_draftboolean
cancelled_atstring<date-time>
supplierobject
supplier_document_numberstring
datestring
date_receivedstring
date_duestring
date_servicestring
date_service_tostring
currency_codestring
transaction_typestring
referencestring
notestring
summary_classificationstring
itemsarray of objects
taxesarray of objects
totalnumber
total_with_taxnumber
total_discountnumber
exchange_rateobject
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,
  "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

List incoming purchase documents

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

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.

typeoptional
supplier_idstringoptional
is_draftstringoptional

Possible values: "true", "false"

date_fromstringoptional
date_tostringoptional
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,
      "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,
      "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
  }
}

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_idstring
typestring
is_draftboolean
cancelled_atstring<date-time>
supplierobject
supplier_document_numberstring
datestring
date_receivedstring
date_duestring
date_servicestring
date_service_tostring
currency_codestring
transaction_typestring
referencestring
notestring
summary_classificationstring
itemsarray of objects
taxesarray of objects
totalnumber
total_with_taxnumber
total_discountnumber
exchange_rateobject
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,
  "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_draftbooleanoptional
supplier_idstringoptional
supplierobjectoptional
save_supplierbooleanoptional
supplier_document_numberstringoptional
datestringoptional
date_receivedstringoptional
date_duestringoptional
date_servicestringoptional
date_service_tostringoptional
currency_codestringoptional
transaction_typestringoptional
referencestringoptional
notestringoptional
itemsarray of objectsoptional
taxesarray of objectsoptional
totalnumberoptional
total_with_taxnumberoptional
total_discountnumberoptional
exchange_rateobjectoptional
summary_classificationstringoptional
cancelled_atstring<date-time>optional
metadataobjectoptional
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_idstring
typestring
is_draftboolean
cancelled_atstring<date-time>
supplierobject
supplier_document_numberstring
datestring
date_receivedstring
date_duestring
date_servicestring
date_service_tostring
currency_codestring
transaction_typestring
referencestring
notestring
summary_classificationstring
itemsarray of objects
taxesarray of objects
totalnumber
total_with_taxnumber
total_discountnumber
exchange_rateobject
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,
  "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
invoice_idstring
estimate_idstring
credit_note_idstring
advance_invoice_idstring
incoming_purchase_document_idstring
categorystring
urlstring
secureUrlstring
publicIdstring
formatstring
widthinteger
heightinteger
bytesinteger
filenamestring
mime_typestring
metadata
cache_keystring
created_atstring<date-time>
updated_atstring<date-time>
json
{
  "id": "string",
  "entity_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
  }
}