Manage your Stock Regularizations
Prana API (1.0)
API Prana
Welcome !!! In our developer portal you will find everything you need to interact with our platform.
Our API works with the REST interface through the HTTPS protocol and using the JSON format for processing calls.
All requests are validated against an API Key that can be obtained manually from the Configuration section of the PRANA app.
Our goal is to offer the clearest possible documentation here.
Any suggestions can be sent to: info@prana.software
API Key
To use your API key, you need only call the api with your key in the header as follow:
X-Api-Key
- https://api.prana.software/api/v1/purchase-invoice/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.prana.software/api/v1/purchase-invoice/{id}'OK
Total amount of first discount in company currency
Total amount of second discount in company currency
Type of proximity
Status of the invoice
Total disbursement amount in company currency
List of purchase delivery note lines associated with this invoice
List of purchase receipts associated with this invoice
List of purchase delivery notes associated with this invoice
Corrective invoice information if this invoice corrects another
Type of IRPF for the customer. See ApiIRPFTypeEnum enum for values.
Operation description for submission to Verifactu or SII
Operation key for submission to SII
Type of corrective invoice for submission to SII
{ "id": 1, "observations": "Special handling required", "number": 1001, "documentDate": "2024-01-15", "quantityTotal": 10, "billingSeries": { "id": 1, "type": "SALE", "code": "SER2025", "description": "Main invoice series", "deposit": true, "corrective": false, "otherSIF": false }, "locked": false, "accounted": true, "grossAmountTotal": 1000, "grossAmountTotalCompanyCurrency": 1000, "discount1AmountTotal": 150, "discount1AmountTotalCompanyCurrency": 150, "discount2AmountTotal": 75, "discount2AmountTotalCompanyCurrency": 75, "discountPp": 5, "discountPpAmountTotalCompanyCurrency": 50, "netAmountTotal": 900, "netAmountTotalCompanyCurrency": 900, "vatAmountTotal": 189, "vatAmountTotalCompanyCurrency": 189, "total": 1114.5, "totalCompanyCurrency": 1114.5, "paymentMethod": { "id": 1, "code": 1, "description": "Transferencia bancaria", "document": "Contrato", "firstTerm": 30, "terms": 3, "daysTerms": 30, "remittance": true, "addToCustomerBase": true, "serveFullPrePaid": false, "observations": "Requiere verificación bancaria", "icon": "fa-credit-card", "facturaECode": "01" }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "discount1": 10, "discount2": 5, "currency": { "id": 1, "code": "strin", "description": "string", "nomenclature": "strin", "isoCode": "USD", "changeValue": 0, "significantDecimalsDocuments": 0, "intermediateDecimalsDocuments": 0, "decimalsCalculatePrices": 0, "decimalsCalculateCosts": 0 }, "change": 1, "iban": "ES9121000418450200051332", "withholding": 15, "customerVatType": { "id": 1, "code": "GENERAL", "description": "General VAT type" }, "billingObservations": "Handle with care", "paidCommissions": true, "packages": 5, "tags": [ "urgent", "priority" ], "status": "PENDING", "reference": "FAC-2024-001", "valueDate": "2024-01-20", "shippingTerm": { "id": 1, "code": "string", "customerPays": true, "intrastatCode": "string" }, "irpfAmountTotal": 15, "withholdingAmountTotal": 15, "disbursementAmountTotal": 25.5, "disbursementAmountTotalCompanyCurrency": 25.5, "collectedAmount": 1114.5, "collectedAmountCompanyCurrency": 1114.5, "expirationDate": "2024-02-15", "manual": false, "amountReconciliation": 0, "amountReconciliationCompanyCurrency": 0, "lines": { "id": 1, "lineNumber": 1, "articleCombination": { … }, "attributesDescription": "Color: Red, Size: L", "sizeRange": { … }, "assortment": { … }, "articleDescription": "Cotton T-Shirt", "packages": 3, "quantityPerPackage": 5, "quantityLine": 15, "price": 12.95, "lineObservations": "Deliver before 9 AM", "details": [ … ], "packaging": { … }, "discount": 10.5, "vatPercentage": 21, "surchargePercentage": 5.2, "grossAmount": 1000, "grossAmountCompanyCurrency": 1000, "netAmount": 900, "netAmountCompanyCurrency": 900, "totalLine": 1089, "totalLineCompanyCurrency": 1089, "reference": "REF-2024-001", "picture": "product_image_001.jpg", "pictureToken": "abc123def456", "noAccumulateWarehouse": false, "warehouse": { … }, "purchaseOrderServedQuantity": 25.5, "batches": { … }, "serialNumbers": { … }, "invoiceId": 2001, "invoiceNumber": 10025, "invoiceDocumentDate": "2024-08-05", "invoiceBillingSeriesCode": "A", "purchaseOrderId": 1501, "purchaseOrderNumber": "PO-2024-001", "purchaseOrderTotal": 5000, "purchaseOrderLineId": 3001, "purchaseOrderLineLineNumber": 1, "supplierId": 1001, "supplierCommercialName": "ABC Suppliers Ltd.", "disbursement": false, "articleVatType": "STANDARD", "concept": "Product purchase", "investment": false, "deductible": true }, "taxes": { "id": 1, "netAmountTotal": 1000, "netAmountTotalCompanyCurrency": 1000, "vatPercentage": 21, "vatAmountTotal": 210, "vatAmountTotalCompanyCurrency": 210, "surchargePercentage": 5, "surchargeAmountTotal": 50, "surchargeAmountTotalCompanyCurrency": 50, "grossAmountTotal": 1260, "grossAmountTotalCompanyCurrency": 1260, "withholdingAmountTotal": 15, "withholdingAmountTotalCompanyCurrency": 15, "discountsAmountTotal": 100 }, "receipts": { "id": 1, "billingSeriesCode": "FAC", "invoiceNumber": 1001, "receiptNumber": 5001, "invoiceDate": "2024-01-15", "expirationDate": "2024-02-15", "receiptDate": "2024-01-20", "total": 1250, "totalCompanyCurrency": 1250, "collectedAmount": 1250, "collectedAmountCompanyCurrency": 1250, "pendingAmount": 0, "pendingAmountCompanyCurrency": 0, "paymentMethodDescription": "Bank Transfer", "supplierCode": "SUP001", "remittance": true, "paymentMethodDocument": "TRANSFER", "currencyNomenclature": "EUR", "receiptCollectionLines": { … } }, "deliveryNotes": { "id": 1, "number": 1001, "documentDate": "2024-08-07", "quantityTotal": 200.5, "observations": "Customer requested urgent delivery", "lines": [ … ], "change": 0.5, "discount1": 5, "discount2": 2, "discountAmountTotal": 100, "discountAmountTotalCompanyCurrency": 95, "discountPp": 3, "discountPpAmountTotal": 15, "discountPpAmountTotalCompanyCurrency": 14, "grossAmountTotal": 1200, "grossAmountTotalCompanyCurrency": 1150, "netAmountTotal": 1100, "netAmountTotalCompanyCurrency": 1080, "vatAmountTotal": 230, "vatAmountTotalCompanyCurrency": 225, "surchargeAmountTotal": 20, "surchargeAmountTotalCompanyCurrency": 18, "withholding": 2, "withholdingAmountTotal": 22, "withholdingAmountTotalCompanyCurrency": 21, "total": 1300, "totalCompanyCurrency": 1280, "disbursementAmountTotal": 50, "disbursementAmountTotalCompanyCurrency": 48, "billingSeries": { … }, "receivedDate": "2024-08-07", "billCode": "BILL-2024-001", "locked": false, "warehouse": { … }, "reference": "DN-2024-001", "noAccumulateWarehouse": false, "supplier": { … }, "supplierName": "ABC Suppliers Ltd.", "supplierAddress": 123, "supplierPhone": "+34 91 123 4567", "supplierEmail": "contact@abcsuppliers.com", "supplierCif": "B12345678", "deliveryNote": "DN-SUPP-2024-001", "packages": 5, "billingObservations": "Handle with care", "paymentMethod": { … }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "currency": { … }, "customerVatType": { … }, "shippingTerm": { … }, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5.2, "invoiceDocumentDate": "2024-08-05", "invoiceBillingSeriesCode": "A", "tags": [ … ], "invoiceEditObservations": "Invoice reviewed and approved" }, "files": { "id": 1, "token": "729eda1d03b34634b8e3c81a8b2d0974", "url": "https://apihost.com/file/729eda1d03b34634b8e3c81a8b2d0974", "fileName": "invoice_2023.pdf", "fileExtension": "pdf", "fileSize": 1048576, "modifiedOn": "2024-08-07T18:10:55" }, "supplier": { "id": 1, "code": 20001, "cif": "B87654321", "commercialName": "Supplier Corp", "name": "Supplier Corporation S.L.", "address": "Calle Mayor, 10", "country": "ES", "state": "MAD", "postalCode": 28001, "city": "Madrid", "phone1": "+34911222333", "phone2": "+34911444555", "currency": "EUR", "currencyNomenclature": "Euro", "currencyChangeValue": 1, "active": true, "email": "contact@suppliercorp.com", "shippingTerm": 15, "tags": [ … ], "vatDescription": "IVA General 21%", "discount1": 3.5, "paymentMethodId": 3, "paymentMethod": "Bank Transfer", "currencyCode": "EUR", "creationDate": "2021-03-15", "inactiveDate": "2024-10-01", "countryDescription": "España", "stateDescription": "Madrid", "bankName": "BBVA", "account": "ES7921000813610123456789", "picture": "https://www.suppliercorp.com/logo.png", "pictureToken": "a1b2c3d4e5f6", "modifiedOn": "2024-12-10T14:30:00+01:00", "web": "https://www.suppliercorp.com" }, "purchasingAccount": { "id": 1, "code": 1000, "description": "Cash account", "cif": "B12345678", "active": true, "color": "#FF5733", "parentCode": 100, "parentDescription": "Assets" }, "correctiveInvoice": { "id": 1, "billingSeriesCode": "A", "number": 10023, "documentDate": "2024-04-20", "valueDate": "2024-04-22", "commercialName": "Company ABC S.A.", "grossAmountTotal": 800, "grossAmountTotalCompanyCurrency": 820, "discount1AmountTotal": 10, "discount1AmountTotalCompanyCurrency": 10.25, "discount2AmountTotal": 5, "discount2AmountTotalCompanyCurrency": 5.1, "discountPpAmountTotal": 3, "discountPpAmountTotalCompanyCurrency": 3.06, "discountAmountTotal": 18, "discountAmountTotalCompanyCurrency": 18.41, "netAmountTotal": 700, "netAmountTotalCompanyCurrency": 715, "vatAmountTotal": 147, "vatAmountTotalCompanyCurrency": 150, "total": 847, "totalCompanyCurrency": 865, "paymentMethodDescription": "Bank transfer", "currencyNomenclature": "EUR", "documentType": "INVOICE", "quantityTotal": 25, "tags": [ … ], "status": "PENDING", "collectedAmount": 400, "collectedAmountCompanyCurrency": 420, "currencySignificantDecimalsDocuments": 2, "currencyIntermediateDecimalsDocuments": 2, "currencyDecimalsCalculatePrices": 4, "currencyDecimalsCalculateCosts": 4, "reference": "INV-2024-1001", "disbursementAmountTotal": 50, "disbursementAmountTotalCompanyCurrency": 50, "expirationDate": "2024-05-29", "withholdingAmountTotal": 30, "manual": false, "amountReconciliation": 0, "amountReconciliationCompanyCurrency": 0, "supplierId": 1001, "supplierCode": "SUPP001", "supplierName": "ABC Suppliers Ltd.", "purchasingAccountCode": 6000001, "billCode": "BILL-2024-001", "receivedDate": "2024-08-07", "irpfType": "LEASES" }, "billCode": "BILL-2024-001", "receivedDate": "2024-08-07", "irpfType": "LEASES", "operationDescription": "Invoice description", "siiOperationKey340": "USUAL_OPERATION", "siiSubtype": "EMPTY", "siiRecordDate": "2024-08-07" }
Unique identifier of the accounting period. If not set, system will determine based on document date.
Internal billing observations for the invoice.
Type of proximity for the invoice.
Status of the invoice.
List of delivery notes associated with the purchase invoice
Corrective invoice identifier if this invoice corrects another
Type of IRPF for the customer. See ApiIRPFTypeEnum enum for values.
Operation description for submission to Verifactu or SII
Operation key for submission to SII
Type of corrective invoice for submission to SII
- https://api.prana.software/api/v1/purchase-invoice/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://api.prana.software/api/v1/purchase-invoice/{id}' \
-H 'Content-Type: application/json' \
-d '{
"id": 1001,
"valueDate": "2024-05-15",
"locked": false,
"periodId": 1,
"accounted": true,
"packages": 5,
"observations": "Deliver before noon.",
"billingObservations": "Special rate applied.",
"paymentMethod": 3,
"firstTerm": 30,
"daysTerm": 30,
"terms": 3,
"proximityType": "NEARBY",
"tags": [
"urgent",
"international"
],
"accountingAccount": 43000001,
"status": "PENDING",
"reference": "INV-2024-0123",
"customerVatType": 1,
"billingSeries": 7,
"shippingTerm": 2,
"currency": 1,
"change": 1.1,
"discount1": 10,
"discount2": 5,
"discount3": 2,
"discount4": 1,
"discountPp": 3,
"withholding": 15,
"number": 10022,
"documentDate": "2024-05-01",
"expirationDate": "2024-06-01",
"manual": false,
"receipts": {
"id": 1,
"purchaseInvoice": 100,
"billingSeries": 5,
"paymentMethod": 3,
"supplier": 1001,
"currency": 1,
"invoiceNumber": 1001,
"receiptNumber": 5001,
"invoiceDate": "2024-01-15",
"receiptDate": "2024-01-20",
"expirationDate": "2024-02-15",
"actualDate": "2024-01-20",
"printed": true,
"accounted": true,
"reclaimed": false,
"reclaimedDate": "2024-01-25",
"currencyChangeValue": 1,
"remittance": false,
"daysUntilExpirationDate": 30,
"iban": "ES9121000418450200051332",
"total": 1250,
"totalCompanyCurrency": 1250,
"collectedAmount": 1250,
"collectedAmountCompanyCurrency": 1250,
"expenses": 25.5,
"pendingAmount": 0,
"pendingAmountCompanyCurrency": 0,
"payments": 1,
"remittable": true,
"ignorePending": false,
"uncollectable": false,
"promissoryNoteBank": "Banco Santander",
"promissoryNoteNumber": "PN-2024-001",
"observations": "Payment received"
},
"taxes": {
"id": 0,
"purchaseInvoice": 0,
"vatPercentage": 0,
"surchargePercentage": 0,
"grossAmountTotal": 0,
"netAmountTotal": 0,
"surchargeAmountTotal": 0,
"withholdingAmountTotal": 0,
"vatAmountTotal": 0,
"vatAmountTotalDeductible": 0,
"vatAmountTotalDeductibleCompanyCurrency": 0,
"surchargeAmountTotalDeductible": 0,
"surchargeAmountTotalDeductibleCompanyCurrency": 0,
"vatAmountTotalInvestment": 0,
"vatAmountTotalInvestmentCompanyCurrency": 0,
"surchargeAmountTotalInvestment": 0,
"surchargeAmountTotalInvestmentCompanyCurrency": 0
},
"deliveryNotes": {
"id": 2123,
"lines": {
"id": 1001,
"articleCombination": 5312,
"sizeRange": 15,
"assortment": 8,
"lineNumber": 1,
"articleDescription": "Cotton T-shirt - Blue",
"packages": 3,
"quantityPerPackage": 12,
"price": 19.99,
"lineObservations": "Special discount applied.",
"details": [
{
"id": 200,
"sizeRangeDetail": 15,
"width": 12,
"quantityPerPackage": 9.3
}
],
"packaging": 1001,
"discount": 10.5,
"vatPercentage": 21,
"reference": "REF-2024-001",
"picture": "product_image_001.jpg",
"noAccumulateWarehouse": false,
"warehouse": 3,
"assortedPackages": true,
"shippingVatType": "STANDARD",
"shippingVatPercentage": 21,
"shippingSurchargePercentage": 5.2,
"articleVatType": "STANDARD",
"surchargePercentage": 5.2,
"grossAmount": 1000,
"grossAmountCompanyCurrency": 1000,
"netAmount": 900,
"netAmountCompanyCurrency": 900,
"totalLine": 1089,
"totalLineCompanyCurrency": 1089,
"batchList": [
{
"id": 11,
"batch": "LOT-2025B",
"quantity": 75.5,
"packages": 2
}
],
"serialNumberList": [
{
"id": 12,
"serialNumber": "SN-20250807-XYZ"
}
],
"disbursement": false,
"concept": "Product purchase"
}
},
"purchasingAccount": 6000001,
"supplier": 1001,
"receivedDate": "2024-08-07",
"billCode": "BILL-2024-001",
"deliveryNote": "DN-2024-001",
"correctiveInvoice": 1050,
"irpfType": "LEASES",
"operationDescription": "Invoice description",
"siiOperationKey340": "USUAL_OPERATION",
"siiSubtype": "EMPTY",
"siiRecordDate": "2024-08-07"
}'OK
Total amount of first discount in company currency
Total amount of second discount in company currency
Type of proximity
Status of the invoice
Total disbursement amount in company currency
List of purchase delivery note lines associated with this invoice
List of purchase receipts associated with this invoice
List of purchase delivery notes associated with this invoice
Corrective invoice information if this invoice corrects another
Type of IRPF for the customer. See ApiIRPFTypeEnum enum for values.
Operation description for submission to Verifactu or SII
Operation key for submission to SII
Type of corrective invoice for submission to SII
{ "id": 1, "observations": "Special handling required", "number": 1001, "documentDate": "2024-01-15", "quantityTotal": 10, "billingSeries": { "id": 1, "type": "SALE", "code": "SER2025", "description": "Main invoice series", "deposit": true, "corrective": false, "otherSIF": false }, "locked": false, "accounted": true, "grossAmountTotal": 1000, "grossAmountTotalCompanyCurrency": 1000, "discount1AmountTotal": 150, "discount1AmountTotalCompanyCurrency": 150, "discount2AmountTotal": 75, "discount2AmountTotalCompanyCurrency": 75, "discountPp": 5, "discountPpAmountTotalCompanyCurrency": 50, "netAmountTotal": 900, "netAmountTotalCompanyCurrency": 900, "vatAmountTotal": 189, "vatAmountTotalCompanyCurrency": 189, "total": 1114.5, "totalCompanyCurrency": 1114.5, "paymentMethod": { "id": 1, "code": 1, "description": "Transferencia bancaria", "document": "Contrato", "firstTerm": 30, "terms": 3, "daysTerms": 30, "remittance": true, "addToCustomerBase": true, "serveFullPrePaid": false, "observations": "Requiere verificación bancaria", "icon": "fa-credit-card", "facturaECode": "01" }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "discount1": 10, "discount2": 5, "currency": { "id": 1, "code": "strin", "description": "string", "nomenclature": "strin", "isoCode": "USD", "changeValue": 0, "significantDecimalsDocuments": 0, "intermediateDecimalsDocuments": 0, "decimalsCalculatePrices": 0, "decimalsCalculateCosts": 0 }, "change": 1, "iban": "ES9121000418450200051332", "withholding": 15, "customerVatType": { "id": 1, "code": "GENERAL", "description": "General VAT type" }, "billingObservations": "Handle with care", "paidCommissions": true, "packages": 5, "tags": [ "urgent", "priority" ], "status": "PENDING", "reference": "FAC-2024-001", "valueDate": "2024-01-20", "shippingTerm": { "id": 1, "code": "string", "customerPays": true, "intrastatCode": "string" }, "irpfAmountTotal": 15, "withholdingAmountTotal": 15, "disbursementAmountTotal": 25.5, "disbursementAmountTotalCompanyCurrency": 25.5, "collectedAmount": 1114.5, "collectedAmountCompanyCurrency": 1114.5, "expirationDate": "2024-02-15", "manual": false, "amountReconciliation": 0, "amountReconciliationCompanyCurrency": 0, "lines": { "id": 1, "lineNumber": 1, "articleCombination": { … }, "attributesDescription": "Color: Red, Size: L", "sizeRange": { … }, "assortment": { … }, "articleDescription": "Cotton T-Shirt", "packages": 3, "quantityPerPackage": 5, "quantityLine": 15, "price": 12.95, "lineObservations": "Deliver before 9 AM", "details": [ … ], "packaging": { … }, "discount": 10.5, "vatPercentage": 21, "surchargePercentage": 5.2, "grossAmount": 1000, "grossAmountCompanyCurrency": 1000, "netAmount": 900, "netAmountCompanyCurrency": 900, "totalLine": 1089, "totalLineCompanyCurrency": 1089, "reference": "REF-2024-001", "picture": "product_image_001.jpg", "pictureToken": "abc123def456", "noAccumulateWarehouse": false, "warehouse": { … }, "purchaseOrderServedQuantity": 25.5, "batches": { … }, "serialNumbers": { … }, "invoiceId": 2001, "invoiceNumber": 10025, "invoiceDocumentDate": "2024-08-05", "invoiceBillingSeriesCode": "A", "purchaseOrderId": 1501, "purchaseOrderNumber": "PO-2024-001", "purchaseOrderTotal": 5000, "purchaseOrderLineId": 3001, "purchaseOrderLineLineNumber": 1, "supplierId": 1001, "supplierCommercialName": "ABC Suppliers Ltd.", "disbursement": false, "articleVatType": "STANDARD", "concept": "Product purchase", "investment": false, "deductible": true }, "taxes": { "id": 1, "netAmountTotal": 1000, "netAmountTotalCompanyCurrency": 1000, "vatPercentage": 21, "vatAmountTotal": 210, "vatAmountTotalCompanyCurrency": 210, "surchargePercentage": 5, "surchargeAmountTotal": 50, "surchargeAmountTotalCompanyCurrency": 50, "grossAmountTotal": 1260, "grossAmountTotalCompanyCurrency": 1260, "withholdingAmountTotal": 15, "withholdingAmountTotalCompanyCurrency": 15, "discountsAmountTotal": 100 }, "receipts": { "id": 1, "billingSeriesCode": "FAC", "invoiceNumber": 1001, "receiptNumber": 5001, "invoiceDate": "2024-01-15", "expirationDate": "2024-02-15", "receiptDate": "2024-01-20", "total": 1250, "totalCompanyCurrency": 1250, "collectedAmount": 1250, "collectedAmountCompanyCurrency": 1250, "pendingAmount": 0, "pendingAmountCompanyCurrency": 0, "paymentMethodDescription": "Bank Transfer", "supplierCode": "SUP001", "remittance": true, "paymentMethodDocument": "TRANSFER", "currencyNomenclature": "EUR", "receiptCollectionLines": { … } }, "deliveryNotes": { "id": 1, "number": 1001, "documentDate": "2024-08-07", "quantityTotal": 200.5, "observations": "Customer requested urgent delivery", "lines": [ … ], "change": 0.5, "discount1": 5, "discount2": 2, "discountAmountTotal": 100, "discountAmountTotalCompanyCurrency": 95, "discountPp": 3, "discountPpAmountTotal": 15, "discountPpAmountTotalCompanyCurrency": 14, "grossAmountTotal": 1200, "grossAmountTotalCompanyCurrency": 1150, "netAmountTotal": 1100, "netAmountTotalCompanyCurrency": 1080, "vatAmountTotal": 230, "vatAmountTotalCompanyCurrency": 225, "surchargeAmountTotal": 20, "surchargeAmountTotalCompanyCurrency": 18, "withholding": 2, "withholdingAmountTotal": 22, "withholdingAmountTotalCompanyCurrency": 21, "total": 1300, "totalCompanyCurrency": 1280, "disbursementAmountTotal": 50, "disbursementAmountTotalCompanyCurrency": 48, "billingSeries": { … }, "receivedDate": "2024-08-07", "billCode": "BILL-2024-001", "locked": false, "warehouse": { … }, "reference": "DN-2024-001", "noAccumulateWarehouse": false, "supplier": { … }, "supplierName": "ABC Suppliers Ltd.", "supplierAddress": 123, "supplierPhone": "+34 91 123 4567", "supplierEmail": "contact@abcsuppliers.com", "supplierCif": "B12345678", "deliveryNote": "DN-SUPP-2024-001", "packages": 5, "billingObservations": "Handle with care", "paymentMethod": { … }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "currency": { … }, "customerVatType": { … }, "shippingTerm": { … }, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5.2, "invoiceDocumentDate": "2024-08-05", "invoiceBillingSeriesCode": "A", "tags": [ … ], "invoiceEditObservations": "Invoice reviewed and approved" }, "files": { "id": 1, "token": "729eda1d03b34634b8e3c81a8b2d0974", "url": "https://apihost.com/file/729eda1d03b34634b8e3c81a8b2d0974", "fileName": "invoice_2023.pdf", "fileExtension": "pdf", "fileSize": 1048576, "modifiedOn": "2024-08-07T18:10:55" }, "supplier": { "id": 1, "code": 20001, "cif": "B87654321", "commercialName": "Supplier Corp", "name": "Supplier Corporation S.L.", "address": "Calle Mayor, 10", "country": "ES", "state": "MAD", "postalCode": 28001, "city": "Madrid", "phone1": "+34911222333", "phone2": "+34911444555", "currency": "EUR", "currencyNomenclature": "Euro", "currencyChangeValue": 1, "active": true, "email": "contact@suppliercorp.com", "shippingTerm": 15, "tags": [ … ], "vatDescription": "IVA General 21%", "discount1": 3.5, "paymentMethodId": 3, "paymentMethod": "Bank Transfer", "currencyCode": "EUR", "creationDate": "2021-03-15", "inactiveDate": "2024-10-01", "countryDescription": "España", "stateDescription": "Madrid", "bankName": "BBVA", "account": "ES7921000813610123456789", "picture": "https://www.suppliercorp.com/logo.png", "pictureToken": "a1b2c3d4e5f6", "modifiedOn": "2024-12-10T14:30:00+01:00", "web": "https://www.suppliercorp.com" }, "purchasingAccount": { "id": 1, "code": 1000, "description": "Cash account", "cif": "B12345678", "active": true, "color": "#FF5733", "parentCode": 100, "parentDescription": "Assets" }, "correctiveInvoice": { "id": 1, "billingSeriesCode": "A", "number": 10023, "documentDate": "2024-04-20", "valueDate": "2024-04-22", "commercialName": "Company ABC S.A.", "grossAmountTotal": 800, "grossAmountTotalCompanyCurrency": 820, "discount1AmountTotal": 10, "discount1AmountTotalCompanyCurrency": 10.25, "discount2AmountTotal": 5, "discount2AmountTotalCompanyCurrency": 5.1, "discountPpAmountTotal": 3, "discountPpAmountTotalCompanyCurrency": 3.06, "discountAmountTotal": 18, "discountAmountTotalCompanyCurrency": 18.41, "netAmountTotal": 700, "netAmountTotalCompanyCurrency": 715, "vatAmountTotal": 147, "vatAmountTotalCompanyCurrency": 150, "total": 847, "totalCompanyCurrency": 865, "paymentMethodDescription": "Bank transfer", "currencyNomenclature": "EUR", "documentType": "INVOICE", "quantityTotal": 25, "tags": [ … ], "status": "PENDING", "collectedAmount": 400, "collectedAmountCompanyCurrency": 420, "currencySignificantDecimalsDocuments": 2, "currencyIntermediateDecimalsDocuments": 2, "currencyDecimalsCalculatePrices": 4, "currencyDecimalsCalculateCosts": 4, "reference": "INV-2024-1001", "disbursementAmountTotal": 50, "disbursementAmountTotalCompanyCurrency": 50, "expirationDate": "2024-05-29", "withholdingAmountTotal": 30, "manual": false, "amountReconciliation": 0, "amountReconciliationCompanyCurrency": 0, "supplierId": 1001, "supplierCode": "SUPP001", "supplierName": "ABC Suppliers Ltd.", "purchasingAccountCode": 6000001, "billCode": "BILL-2024-001", "receivedDate": "2024-08-07", "irpfType": "LEASES" }, "billCode": "BILL-2024-001", "receivedDate": "2024-08-07", "irpfType": "LEASES", "operationDescription": "Invoice description", "siiOperationKey340": "USUAL_OPERATION", "siiSubtype": "EMPTY", "siiRecordDate": "2024-08-07" }
Unique identifier of the accounting period. If not set, system will determine based on document date.
Internal billing observations for the invoice.
Type of proximity for the invoice.
Status of the invoice.
List of delivery notes associated with the purchase invoice
Corrective invoice identifier if this invoice corrects another
Type of IRPF for the customer. See ApiIRPFTypeEnum enum for values.
Operation description for submission to Verifactu or SII
Operation key for submission to SII
Type of corrective invoice for submission to SII
- https://api.prana.software/api/v1/purchase-invoice
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.prana.software/api/v1/purchase-invoice \
-H 'Content-Type: application/json' \
-d '{
"id": 1001,
"valueDate": "2024-05-15",
"locked": false,
"periodId": 1,
"accounted": true,
"packages": 5,
"observations": "Deliver before noon.",
"billingObservations": "Special rate applied.",
"paymentMethod": 3,
"firstTerm": 30,
"daysTerm": 30,
"terms": 3,
"proximityType": "NEARBY",
"tags": [
"urgent",
"international"
],
"accountingAccount": 43000001,
"status": "PENDING",
"reference": "INV-2024-0123",
"customerVatType": 1,
"billingSeries": 7,
"shippingTerm": 2,
"currency": 1,
"change": 1.1,
"discount1": 10,
"discount2": 5,
"discount3": 2,
"discount4": 1,
"discountPp": 3,
"withholding": 15,
"number": 10022,
"documentDate": "2024-05-01",
"expirationDate": "2024-06-01",
"manual": false,
"receipts": {
"id": 1,
"purchaseInvoice": 100,
"billingSeries": 5,
"paymentMethod": 3,
"supplier": 1001,
"currency": 1,
"invoiceNumber": 1001,
"receiptNumber": 5001,
"invoiceDate": "2024-01-15",
"receiptDate": "2024-01-20",
"expirationDate": "2024-02-15",
"actualDate": "2024-01-20",
"printed": true,
"accounted": true,
"reclaimed": false,
"reclaimedDate": "2024-01-25",
"currencyChangeValue": 1,
"remittance": false,
"daysUntilExpirationDate": 30,
"iban": "ES9121000418450200051332",
"total": 1250,
"totalCompanyCurrency": 1250,
"collectedAmount": 1250,
"collectedAmountCompanyCurrency": 1250,
"expenses": 25.5,
"pendingAmount": 0,
"pendingAmountCompanyCurrency": 0,
"payments": 1,
"remittable": true,
"ignorePending": false,
"uncollectable": false,
"promissoryNoteBank": "Banco Santander",
"promissoryNoteNumber": "PN-2024-001",
"observations": "Payment received"
},
"taxes": {
"id": 0,
"purchaseInvoice": 0,
"vatPercentage": 0,
"surchargePercentage": 0,
"grossAmountTotal": 0,
"netAmountTotal": 0,
"surchargeAmountTotal": 0,
"withholdingAmountTotal": 0,
"vatAmountTotal": 0,
"vatAmountTotalDeductible": 0,
"vatAmountTotalDeductibleCompanyCurrency": 0,
"surchargeAmountTotalDeductible": 0,
"surchargeAmountTotalDeductibleCompanyCurrency": 0,
"vatAmountTotalInvestment": 0,
"vatAmountTotalInvestmentCompanyCurrency": 0,
"surchargeAmountTotalInvestment": 0,
"surchargeAmountTotalInvestmentCompanyCurrency": 0
},
"deliveryNotes": {
"id": 2123,
"lines": {
"id": 1001,
"articleCombination": 5312,
"sizeRange": 15,
"assortment": 8,
"lineNumber": 1,
"articleDescription": "Cotton T-shirt - Blue",
"packages": 3,
"quantityPerPackage": 12,
"price": 19.99,
"lineObservations": "Special discount applied.",
"details": [
{
"id": 200,
"sizeRangeDetail": 15,
"width": 12,
"quantityPerPackage": 9.3
}
],
"packaging": 1001,
"discount": 10.5,
"vatPercentage": 21,
"reference": "REF-2024-001",
"picture": "product_image_001.jpg",
"noAccumulateWarehouse": false,
"warehouse": 3,
"assortedPackages": true,
"shippingVatType": "STANDARD",
"shippingVatPercentage": 21,
"shippingSurchargePercentage": 5.2,
"articleVatType": "STANDARD",
"surchargePercentage": 5.2,
"grossAmount": 1000,
"grossAmountCompanyCurrency": 1000,
"netAmount": 900,
"netAmountCompanyCurrency": 900,
"totalLine": 1089,
"totalLineCompanyCurrency": 1089,
"batchList": [
{
"id": 11,
"batch": "LOT-2025B",
"quantity": 75.5,
"packages": 2
}
],
"serialNumberList": [
{
"id": 12,
"serialNumber": "SN-20250807-XYZ"
}
],
"disbursement": false,
"concept": "Product purchase"
}
},
"purchasingAccount": 6000001,
"supplier": 1001,
"receivedDate": "2024-08-07",
"billCode": "BILL-2024-001",
"deliveryNote": "DN-2024-001",
"correctiveInvoice": 1050,
"irpfType": "LEASES",
"operationDescription": "Invoice description",
"siiOperationKey340": "USUAL_OPERATION",
"siiSubtype": "EMPTY",
"siiRecordDate": "2024-08-07"
}'OK
Total amount of first discount in company currency
Total amount of second discount in company currency
Type of proximity
Status of the invoice
Total disbursement amount in company currency
List of purchase delivery note lines associated with this invoice
List of purchase receipts associated with this invoice
List of purchase delivery notes associated with this invoice
Corrective invoice information if this invoice corrects another
Type of IRPF for the customer. See ApiIRPFTypeEnum enum for values.
Operation description for submission to Verifactu or SII
Operation key for submission to SII
Type of corrective invoice for submission to SII
{ "id": 1, "observations": "Special handling required", "number": 1001, "documentDate": "2024-01-15", "quantityTotal": 10, "billingSeries": { "id": 1, "type": "SALE", "code": "SER2025", "description": "Main invoice series", "deposit": true, "corrective": false, "otherSIF": false }, "locked": false, "accounted": true, "grossAmountTotal": 1000, "grossAmountTotalCompanyCurrency": 1000, "discount1AmountTotal": 150, "discount1AmountTotalCompanyCurrency": 150, "discount2AmountTotal": 75, "discount2AmountTotalCompanyCurrency": 75, "discountPp": 5, "discountPpAmountTotalCompanyCurrency": 50, "netAmountTotal": 900, "netAmountTotalCompanyCurrency": 900, "vatAmountTotal": 189, "vatAmountTotalCompanyCurrency": 189, "total": 1114.5, "totalCompanyCurrency": 1114.5, "paymentMethod": { "id": 1, "code": 1, "description": "Transferencia bancaria", "document": "Contrato", "firstTerm": 30, "terms": 3, "daysTerms": 30, "remittance": true, "addToCustomerBase": true, "serveFullPrePaid": false, "observations": "Requiere verificación bancaria", "icon": "fa-credit-card", "facturaECode": "01" }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "discount1": 10, "discount2": 5, "currency": { "id": 1, "code": "strin", "description": "string", "nomenclature": "strin", "isoCode": "USD", "changeValue": 0, "significantDecimalsDocuments": 0, "intermediateDecimalsDocuments": 0, "decimalsCalculatePrices": 0, "decimalsCalculateCosts": 0 }, "change": 1, "iban": "ES9121000418450200051332", "withholding": 15, "customerVatType": { "id": 1, "code": "GENERAL", "description": "General VAT type" }, "billingObservations": "Handle with care", "paidCommissions": true, "packages": 5, "tags": [ "urgent", "priority" ], "status": "PENDING", "reference": "FAC-2024-001", "valueDate": "2024-01-20", "shippingTerm": { "id": 1, "code": "string", "customerPays": true, "intrastatCode": "string" }, "irpfAmountTotal": 15, "withholdingAmountTotal": 15, "disbursementAmountTotal": 25.5, "disbursementAmountTotalCompanyCurrency": 25.5, "collectedAmount": 1114.5, "collectedAmountCompanyCurrency": 1114.5, "expirationDate": "2024-02-15", "manual": false, "amountReconciliation": 0, "amountReconciliationCompanyCurrency": 0, "lines": { "id": 1, "lineNumber": 1, "articleCombination": { … }, "attributesDescription": "Color: Red, Size: L", "sizeRange": { … }, "assortment": { … }, "articleDescription": "Cotton T-Shirt", "packages": 3, "quantityPerPackage": 5, "quantityLine": 15, "price": 12.95, "lineObservations": "Deliver before 9 AM", "details": [ … ], "packaging": { … }, "discount": 10.5, "vatPercentage": 21, "surchargePercentage": 5.2, "grossAmount": 1000, "grossAmountCompanyCurrency": 1000, "netAmount": 900, "netAmountCompanyCurrency": 900, "totalLine": 1089, "totalLineCompanyCurrency": 1089, "reference": "REF-2024-001", "picture": "product_image_001.jpg", "pictureToken": "abc123def456", "noAccumulateWarehouse": false, "warehouse": { … }, "purchaseOrderServedQuantity": 25.5, "batches": { … }, "serialNumbers": { … }, "invoiceId": 2001, "invoiceNumber": 10025, "invoiceDocumentDate": "2024-08-05", "invoiceBillingSeriesCode": "A", "purchaseOrderId": 1501, "purchaseOrderNumber": "PO-2024-001", "purchaseOrderTotal": 5000, "purchaseOrderLineId": 3001, "purchaseOrderLineLineNumber": 1, "supplierId": 1001, "supplierCommercialName": "ABC Suppliers Ltd.", "disbursement": false, "articleVatType": "STANDARD", "concept": "Product purchase", "investment": false, "deductible": true }, "taxes": { "id": 1, "netAmountTotal": 1000, "netAmountTotalCompanyCurrency": 1000, "vatPercentage": 21, "vatAmountTotal": 210, "vatAmountTotalCompanyCurrency": 210, "surchargePercentage": 5, "surchargeAmountTotal": 50, "surchargeAmountTotalCompanyCurrency": 50, "grossAmountTotal": 1260, "grossAmountTotalCompanyCurrency": 1260, "withholdingAmountTotal": 15, "withholdingAmountTotalCompanyCurrency": 15, "discountsAmountTotal": 100 }, "receipts": { "id": 1, "billingSeriesCode": "FAC", "invoiceNumber": 1001, "receiptNumber": 5001, "invoiceDate": "2024-01-15", "expirationDate": "2024-02-15", "receiptDate": "2024-01-20", "total": 1250, "totalCompanyCurrency": 1250, "collectedAmount": 1250, "collectedAmountCompanyCurrency": 1250, "pendingAmount": 0, "pendingAmountCompanyCurrency": 0, "paymentMethodDescription": "Bank Transfer", "supplierCode": "SUP001", "remittance": true, "paymentMethodDocument": "TRANSFER", "currencyNomenclature": "EUR", "receiptCollectionLines": { … } }, "deliveryNotes": { "id": 1, "number": 1001, "documentDate": "2024-08-07", "quantityTotal": 200.5, "observations": "Customer requested urgent delivery", "lines": [ … ], "change": 0.5, "discount1": 5, "discount2": 2, "discountAmountTotal": 100, "discountAmountTotalCompanyCurrency": 95, "discountPp": 3, "discountPpAmountTotal": 15, "discountPpAmountTotalCompanyCurrency": 14, "grossAmountTotal": 1200, "grossAmountTotalCompanyCurrency": 1150, "netAmountTotal": 1100, "netAmountTotalCompanyCurrency": 1080, "vatAmountTotal": 230, "vatAmountTotalCompanyCurrency": 225, "surchargeAmountTotal": 20, "surchargeAmountTotalCompanyCurrency": 18, "withholding": 2, "withholdingAmountTotal": 22, "withholdingAmountTotalCompanyCurrency": 21, "total": 1300, "totalCompanyCurrency": 1280, "disbursementAmountTotal": 50, "disbursementAmountTotalCompanyCurrency": 48, "billingSeries": { … }, "receivedDate": "2024-08-07", "billCode": "BILL-2024-001", "locked": false, "warehouse": { … }, "reference": "DN-2024-001", "noAccumulateWarehouse": false, "supplier": { … }, "supplierName": "ABC Suppliers Ltd.", "supplierAddress": 123, "supplierPhone": "+34 91 123 4567", "supplierEmail": "contact@abcsuppliers.com", "supplierCif": "B12345678", "deliveryNote": "DN-SUPP-2024-001", "packages": 5, "billingObservations": "Handle with care", "paymentMethod": { … }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "currency": { … }, "customerVatType": { … }, "shippingTerm": { … }, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5.2, "invoiceDocumentDate": "2024-08-05", "invoiceBillingSeriesCode": "A", "tags": [ … ], "invoiceEditObservations": "Invoice reviewed and approved" }, "files": { "id": 1, "token": "729eda1d03b34634b8e3c81a8b2d0974", "url": "https://apihost.com/file/729eda1d03b34634b8e3c81a8b2d0974", "fileName": "invoice_2023.pdf", "fileExtension": "pdf", "fileSize": 1048576, "modifiedOn": "2024-08-07T18:10:55" }, "supplier": { "id": 1, "code": 20001, "cif": "B87654321", "commercialName": "Supplier Corp", "name": "Supplier Corporation S.L.", "address": "Calle Mayor, 10", "country": "ES", "state": "MAD", "postalCode": 28001, "city": "Madrid", "phone1": "+34911222333", "phone2": "+34911444555", "currency": "EUR", "currencyNomenclature": "Euro", "currencyChangeValue": 1, "active": true, "email": "contact@suppliercorp.com", "shippingTerm": 15, "tags": [ … ], "vatDescription": "IVA General 21%", "discount1": 3.5, "paymentMethodId": 3, "paymentMethod": "Bank Transfer", "currencyCode": "EUR", "creationDate": "2021-03-15", "inactiveDate": "2024-10-01", "countryDescription": "España", "stateDescription": "Madrid", "bankName": "BBVA", "account": "ES7921000813610123456789", "picture": "https://www.suppliercorp.com/logo.png", "pictureToken": "a1b2c3d4e5f6", "modifiedOn": "2024-12-10T14:30:00+01:00", "web": "https://www.suppliercorp.com" }, "purchasingAccount": { "id": 1, "code": 1000, "description": "Cash account", "cif": "B12345678", "active": true, "color": "#FF5733", "parentCode": 100, "parentDescription": "Assets" }, "correctiveInvoice": { "id": 1, "billingSeriesCode": "A", "number": 10023, "documentDate": "2024-04-20", "valueDate": "2024-04-22", "commercialName": "Company ABC S.A.", "grossAmountTotal": 800, "grossAmountTotalCompanyCurrency": 820, "discount1AmountTotal": 10, "discount1AmountTotalCompanyCurrency": 10.25, "discount2AmountTotal": 5, "discount2AmountTotalCompanyCurrency": 5.1, "discountPpAmountTotal": 3, "discountPpAmountTotalCompanyCurrency": 3.06, "discountAmountTotal": 18, "discountAmountTotalCompanyCurrency": 18.41, "netAmountTotal": 700, "netAmountTotalCompanyCurrency": 715, "vatAmountTotal": 147, "vatAmountTotalCompanyCurrency": 150, "total": 847, "totalCompanyCurrency": 865, "paymentMethodDescription": "Bank transfer", "currencyNomenclature": "EUR", "documentType": "INVOICE", "quantityTotal": 25, "tags": [ … ], "status": "PENDING", "collectedAmount": 400, "collectedAmountCompanyCurrency": 420, "currencySignificantDecimalsDocuments": 2, "currencyIntermediateDecimalsDocuments": 2, "currencyDecimalsCalculatePrices": 4, "currencyDecimalsCalculateCosts": 4, "reference": "INV-2024-1001", "disbursementAmountTotal": 50, "disbursementAmountTotalCompanyCurrency": 50, "expirationDate": "2024-05-29", "withholdingAmountTotal": 30, "manual": false, "amountReconciliation": 0, "amountReconciliationCompanyCurrency": 0, "supplierId": 1001, "supplierCode": "SUPP001", "supplierName": "ABC Suppliers Ltd.", "purchasingAccountCode": 6000001, "billCode": "BILL-2024-001", "receivedDate": "2024-08-07", "irpfType": "LEASES" }, "billCode": "BILL-2024-001", "receivedDate": "2024-08-07", "irpfType": "LEASES", "operationDescription": "Invoice description", "siiOperationKey340": "USUAL_OPERATION", "siiSubtype": "EMPTY", "siiRecordDate": "2024-08-07" }
- https://api.prana.software/api/v1/purchase-invoice/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.prana.software/api/v1/purchase-invoice/search \
-H 'Content-Type: application/json' \
-d '{
"condition": {
"field": "name",
"value": "Example Value",
"type": "EQ",
"endValue": 100,
"innerConditions": [
{}
],
"conditionType": "AND",
"empty": false,
"compareFields": false
},
"sortCriteria": [
{
"sortField": "name",
"sortDirection": "ASC"
}
],
"pageNumber": 0,
"pageSize": 20
}'OK
List of data items for the current page
Total amount of first discount in company currency.
Total amount of second discount in company currency.
Total amount of prompt payment discount in company currency.
Total amount of all discounts in company currency.
Total net amount (after discounts, before VAT) of the invoice.
Invoice status.
Total amount collected in company currency.
Number of significant decimals for documents in the invoice currency.
Number of intermediate decimals for documents in the invoice currency.
Number of decimals for calculating prices.
Number of decimals for calculating costs.
Total disbursement amount of the invoice in company currency.
{ "data": [ { … } ], "page": 0, "total": 150, "pages": 14, "size": 10 }