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,
"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
/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,
"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 with pre-calculated totals
/incoming-purchase-documents/customCreate 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 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/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
}'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,
"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"
}List incoming purchase documents
/incoming-purchase-documentsRetrieve 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 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
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.
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.
Whether to include the total count of items in pagination.total.
Default is true.
When false, pagination.total returns -1 for better performance.
JSON query object for filtering results. Supports MongoDB-style operators.
Supported operators:
- equals or direct value - Exact match (default)
- gte - Greater than or equal
- lte - Less than or equal
- gt - Greater than
- lt - Less than
- in - Value in array
- notIn - Value not in array
- contains - String contains (case-insensitive)
- startsWith - String starts with
- endsWith - String ends with
- between - Value between two numbers/dates [min, max]
Allowed fields: id, 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
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
{
"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
}
}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,
"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
/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,
"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
/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",
"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
/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
}
}List payments affecting an incoming purchase document
/incoming-purchase-documents/{id}/paymentsList payments affecting an 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
curl "https://eu.spaceinvoices.com/incoming-purchase-documents/{id}/payments" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "x-entity-id: YOUR_ENTITY_ID"Returns
{
"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
/incoming-purchase-documents/{id}/paymentsCreate a payment for an 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
Body parameters
Payment type/method
Possible values: "cash", "bank_transfer", "card", "check", "paypal", "coupon", "other", "credit_note", "advance"
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"
}'Returns
{
"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"
}