API Definition to interact with Prana platform
Prana API (1.0)
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}'{ "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": true }, "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": 0, "cif": "string", "commercialName": "string", "name": "string", "address": "string", "country": "string", "state": "string", "postalCode": "string", "city": "string", "phone1": "string", "phone2": "string", "currency": "string", "currencyNomenclature": "string", "currencyChangeValue": 0, "active": true, "email": "string", "shippingTerm": 0, "tags": [ … ], "vatDescription": "string", "discount1": 0, "paymentMethodId": 0, "paymentMethod": "string", "currencyCode": "string", "creationDate": "2019-08-24", "inactiveDate": "2019-08-24", "countryDescription": "string", "stateDescription": "string", "bankName": "string", "account": "string", "picture": "string", "pictureToken": "string", "modifiedOn": "2019-08-24T14:15:22Z", "web": "string" }, "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" }
Unique identifier of the accounting period. If not set, system will determine based on document date.
Internal billing observations for the invoice.
Corrective invoice identifier if this invoice corrects another
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"
}'{ "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": true }, "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": 0, "cif": "string", "commercialName": "string", "name": "string", "address": "string", "country": "string", "state": "string", "postalCode": "string", "city": "string", "phone1": "string", "phone2": "string", "currency": "string", "currencyNomenclature": "string", "currencyChangeValue": 0, "active": true, "email": "string", "shippingTerm": 0, "tags": [ … ], "vatDescription": "string", "discount1": 0, "paymentMethodId": 0, "paymentMethod": "string", "currencyCode": "string", "creationDate": "2019-08-24", "inactiveDate": "2019-08-24", "countryDescription": "string", "stateDescription": "string", "bankName": "string", "account": "string", "picture": "string", "pictureToken": "string", "modifiedOn": "2019-08-24T14:15:22Z", "web": "string" }, "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" }
Unique identifier of the accounting period. If not set, system will determine based on document date.
Internal billing observations for the invoice.
Corrective invoice identifier if this invoice corrects another
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"
}'{ "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": true }, "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": 0, "cif": "string", "commercialName": "string", "name": "string", "address": "string", "country": "string", "state": "string", "postalCode": "string", "city": "string", "phone1": "string", "phone2": "string", "currency": "string", "currencyNomenclature": "string", "currencyChangeValue": 0, "active": true, "email": "string", "shippingTerm": 0, "tags": [ … ], "vatDescription": "string", "discount1": 0, "paymentMethodId": 0, "paymentMethod": "string", "currencyCode": "string", "creationDate": "2019-08-24", "inactiveDate": "2019-08-24", "countryDescription": "string", "stateDescription": "string", "bankName": "string", "account": "string", "picture": "string", "pictureToken": "string", "modifiedOn": "2019-08-24T14:15:22Z", "web": "string" }, "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" }
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.
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 }