Incoming Purchase Documents
Incoming Purchase Documents
Incoming supplier invoices, credit notes, and advance invoices.
The Incoming Purchase Document object
Attributes
{
"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
/incoming-purchase-documentsCreate incoming purchase document
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Body parameters
Possible values: "invoice", "credit_note", "advance_invoice"
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
}'Returns
{
"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"
}List incoming purchase documents
/incoming-purchase-documentsList incoming purchase documents
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Query parameters
Number of results per request.
Default: 10
Cursor to fetch the next page of results. Use the value from pagination.next_cursor in the previous response.
Cursor to fetch the previous page of results. Use the value from pagination.prev_cursor in the previous response.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
Possible values: "true", "false"
curl "https://eu.spaceinvoices.com/incoming-purchase-documents" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"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
/incoming-purchase-documents/{id}Get incoming purchase document by ID
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
{
"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
/incoming-purchase-documents/{id}Update incoming purchase document
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Unique resource identifier
Body parameters
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
}'Returns
{
"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
/incoming-purchase-documents/{id}/attachments/{fileId}Delete incoming purchase document attachment
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
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
/incoming-purchase-documents/{id}/attachmentsUpload incoming purchase document attachment
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
Body parameters
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
{
"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
/incoming-purchase-documents/{id}/attachmentsList incoming purchase document attachments
Header parameters
Entity ID on which the request is made. Auto-selected when only one entity exists, required when multiple entities exist.
Path parameters
curl "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}/attachments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"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
}
}