API Definition to interact with Prana platform
Prana API (1.0)
https://api.prana.software/api/v1/invoice/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://api.prana.software/api/v1/invoice/{id}'OK
Total amount of first discount in company currency
Total amount of second discount in company currency
Total disbursement amount in company currency
Total amount of third discount in company currency
Total amount of fourth discount in company currency
Administrative center accounting office code
Administrative center processing unit code
{ "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, "taxes": { "id": 1, "netAmountTotal": 1000, "netAmountTotalCompanyCurrency": 1000, "vatPercentage": 21, "vatAmountTotal": 210, "vatAmountTotalCompanyCurrency": 210, "surchargePercentage": 5, "surchargeAmountTotal": 50, "surchargeAmountTotalCompanyCurrency": 50, "grossAmountTotal": 1260, "grossAmountTotalCompanyCurrency": 1260, "discountsAmountTotal": 100, "withholdingAmountTotal": 15, "withholdingAmountTotalCompanyCurrency": 15, "withholdingPercentage": 1.5 }, "invoicePosPaymentTypes": { "id": 1, "paymentType": "CARD", "amount": 1000 }, "receipts": { "id": 1, "receiptCollectionLines": { … }, "receiptNumber": 1001, "expirationDate": "2024-12-31", "total": 1500.75, "totalCompanyCurrency": 1500.75, "collectedAmount": 750, "collectedAmountCompanyCurrency": 750, "pendingAmount": 750.75, "pendingAmountCompanyCurrency": 750.75, "remittable": true, "situation": "CO" }, "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": { … }, "valueDate": "2024-01-20", "customerAddress": { … }, "warehouse": { … }, "reference": "ALB-2024-001", "rateCode": { … }, "agency": { … }, "locked": false, "paymentMethod": { … }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "discount3": 3, "discount4": 2, "currency": { … }, "iban": "ES9121000418450200051332", "customerVatType": { … }, "phytosanitaryAuthorizedPerson": { … }, "representative1": { … }, "commissionType1": "PERCENTAGE", "commission1": 5, "representative2": { … }, "commissionType2": "PERCENTAGE", "commission2": 100, "representative3": { … }, "commissionType3": "PERCENTAGE", "commission3": 2.5, "noAccumulateRisk": false, "packages": 5, "grossWeight": 25.5, "netWeight": 23, "volume": 0.5, "billingObservations": "Handle with care", "shippingTerm": { … }, "shippingAmount": 25.5, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5, "tags": [ … ], "invoiceEditObservations": "Special handling required", "collectedAmount": 1500, "collectedAmountCompanyCurrency": 1500 }, "customerAddress": { "id": 1, "code": 101, "customerCode": "C10001", "customerName": "Acme S.A.", "customerPostalCode": "03001", "customerAddress": "Avenida de la Estación, 5", "customerCity": "Alicante", "customerState": "A", "customerStateDescription": "Alicante", "customerCountry": "ES", "customerCountryDescription": "Spain", "customerFirstPhoneNumber": "+34965123456", "customerSecondPhoneNumber": "+34965111111", "customerEmail": "cliente@acme.es", "customerCif": "B12345678", "customerId": 10001, "customerCommercialName": "Acme España", "name": "Warehourse", "city": "Alicante", "state": "A", "stateDescription": "Alicante", "postalCode": "03001", "country": "ES", "countryDescription": "Spain", "address": "Street Example, 14", "firstPhoneNumber": "+34965123456", "secondPhoneNumber": "+34965111111", "email": "direccion@acme.es", "cif": "B12345678", "activity": "Wholesale", "brand": "Acme Main Brand", "brandId": 5010, "customerIsActive": true, "isActive": true }, "rateCode": { "id": 1, "code": "string", "taxesIncluded": true }, "discount3": 2, "discount4": 1, "discount3AmountTotal": 20, "discount3AmountTotalCompanyCurrency": 20, "discount4AmountTotal": 10, "discount4AmountTotalCompanyCurrency": 10, "discountPpAmountTotal": 30, "percentageIrpf": 15, "shippingAmount": 25.5, "shippingAmountCompanyCurrency": 25.5, "manualExpiration": false, "commissions": { "id": 1, "representative": { … }, "commissionType": "PERCENTAGE", "percentage": 5, "total": 250, "totalCompanyCurrency": 250, "counter": 10 }, "ediInvoiceType": "COMMERCIAL_INVOICE", "electronicInvoiceSent": "SENT", "deliveryTerms": "FOB destination", "intrastatNatureTransaction": 11, "intrastatShippingTerm": "FOB", "intrastatPort": "ES004", "returnReason": "Product defect", "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, "billingSeriesInvoiceDraft": false, "invoiceNumber": "F-2024-000152", "customerCode": "CUST001", "customerBusinessName": "Clavei S.A.", "customerName": "John Doe", "iban": "ES4721000418401234567891", "referenceDocumentNumber": "REF-2024-0177", "hasReceipt": true, "customerEmail": "customer@example.com", "customerCountry": "Spain", "customerStateDescription": "Alicante", "customerAddressId": 7, "representatives": "Ana Torres, Juan Pérez", "salesAccountCode": 700, "quoteNumber": 15034, "quoteId": 320, "discount3AmountTotal": 12, "discount3AmountTotalCompanyCurrency": 12.47, "discount4AmountTotal": 10, "discount4AmountTotalCompanyCurrency": 10.39, "externalCode": "EXT-INV-2024-00123" }, "manualReceipts": false, "quoteNumber": 2001, "quoteId": 2001, "templateSaleInvoiceNumber": 3001, "templateSaleInvoiceId": 3001, "salesAccount": { "id": 1, "code": 1000, "description": "Cash account", "cif": "B12345678", "active": true, "color": "#FF5733", "parentCode": 100, "parentDescription": "Assets" }, "invoiceEditObservations": "Invoice reviewed and approved", "grossWeight": 125.5, "netWeight": 120, "volume": 2.35, "transportType": "Road transport", "agentDuty": "Agent duty paid", "creditLetter": "CL-2024-001", "administrativeCenterAccountingOffice": "ACC001", "administrativeCenterManagingBody": "MAN001", "administrativeCenterProcessingUnit": "PRO001", "administrativeCenterProposingBody": "PROP001", "correctiveReason": "INVOICE_NUMBER", "externalCode": "EXT-INV-2024-00123" }
Unique identifier of the accounting period. If not set, system will determine based on document date.
Internal billing observations for the invoice.
Administrative center accounting office code
Administrative center processing unit code
https://api.prana.software/api/v1/invoice/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
'https://api.prana.software/api/v1/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,
"invoice": 100,
"billingSeries": 5,
"paymentMethod": 3,
"customerAddress": 10,
"representative": 2,
"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,
"daysUntilExpirationDate": 30,
"iban": "ES9121000418450200051332",
"totalWithoutExpenses": 1250,
"totalWithoutExpensesCompanyCurrency": 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",
"unpaidDate": "2024-02-15",
"unpaidReason": 1,
"receiptExpenses": {
"id": 1,
"header": 100,
"description": "Bank commission",
"percentage": 2.5,
"amount": 25,
"totalAmount": 25,
"type": "CATEGORY1"
},
"addExpenses": true
},
"deliveryNotes": {
"id": 2123,
"lines": {
"id": 1001,
"articleCombination": 200,
"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,
"assortedPackages": true,
"discount": 10.5,
"rsp": 25.99,
"reference": "REF-2024-001",
"picture": "product_image_001.jpg",
"warehouse": 3,
"noAccumulateWarehouse": false,
"brand": 5,
"returnReason": 1,
"received": true,
"accepted": true,
"freeDescription1": "Special handling required",
"freeDescription2": "Custom packaging",
"freeDescription3": "Priority delivery",
"freeDescription4": "Gift wrap",
"freeDescription5": "Express shipping",
"customCommission": false,
"representative1": 2,
"commissionType1": "PERCENTAGE",
"commission1": 5,
"representative2": 3,
"commissionType2": "PERCENTAGE",
"commission2": 3,
"representative3": 4,
"commissionType3": "FIXED",
"commission3": 25,
"articleVatType": "STANDARD",
"vatPercentage": 21,
"surchargePercentage": 5.2,
"grossAmount": 1000,
"grossAmountCompanyCurrency": 1000,
"netAmount": 900,
"netAmountCompanyCurrency": 900,
"totalLine": 1089,
"totalLineCompanyCurrency": 1089,
"batches": [
{
"id": 21,
"batch": 102,
"quantity": 40,
"packages": 3
}
],
"serialNumbers": [
{
"id": 8,
"serialNumber": 202
}
],
"concept": "Product delivery",
"disbursement": false
},
"billingSeries": 7,
"warehouse": 3,
"vatOperationType": 2
},
"taxes": {
"id": 1,
"invoice": 100,
"netAmountTotal": 1000,
"netAmountTotalCompanyCurrency": 1000,
"vatPercentage": 21,
"vatAmountTotal": 210,
"vatAmountTotalCompanyCurrency": 210,
"surchargePercentage": 5,
"surchargeAmountTotal": 50,
"surchargeAmountTotalCompanyCurrency": 50
},
"invoicePosPaymentTypes": {
"id": 1001,
"invoice": 100,
"paymentType": "CARD",
"amount": 1000
},
"salesAccount": 7001,
"manualReceipts": false,
"grossWeight": 125.5,
"netWeight": 120,
"volume": 2.35,
"creditLetter": "CL-2024-001",
"agentDuty": "Agent duty paid",
"transportType": "Road transport",
"ediInvoiceType": "COMMERCIAL_INVOICE",
"electronicInvoiceSent": "SENT",
"deliveryTerms": "FOB destination",
"intrastatNatureTransaction": 11,
"intrastatShippingTerm": "FOB",
"intrastatPort": "ES004",
"returnReason": "Product defect",
"paidCommissions": true,
"manualExpiration": false,
"iban": "ES9121000418450200051332",
"correctiveInvoice": 1050,
"customerAddress": 15,
"percentageIrpf": 15,
"invoiceEditObservations": "Invoice reviewed and approved",
"shippingVatType": "STANDARD",
"shippingAmount": 25.5,
"shippingVatPercentage": 21,
"shippingSurchargePercentage": 5.2,
"approved": true,
"quote": 2001,
"rateCode": 101,
"administrativeCenterAccountingOffice": "ACC001",
"administrativeCenterManagingBody": "MAN001",
"administrativeCenterProcessingUnit": "PRO001",
"administrativeCenterProposingBody": "PROP001",
"correctiveReason": "INVOICE_NUMBER",
"externalCode": "EXT-INV-2024-00123"
}'OK
Total amount of first discount in company currency
Total amount of second discount in company currency
Total disbursement amount in company currency
Total amount of third discount in company currency
Total amount of fourth discount in company currency
Administrative center accounting office code
Administrative center processing unit code
{ "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, "taxes": { "id": 1, "netAmountTotal": 1000, "netAmountTotalCompanyCurrency": 1000, "vatPercentage": 21, "vatAmountTotal": 210, "vatAmountTotalCompanyCurrency": 210, "surchargePercentage": 5, "surchargeAmountTotal": 50, "surchargeAmountTotalCompanyCurrency": 50, "grossAmountTotal": 1260, "grossAmountTotalCompanyCurrency": 1260, "discountsAmountTotal": 100, "withholdingAmountTotal": 15, "withholdingAmountTotalCompanyCurrency": 15, "withholdingPercentage": 1.5 }, "invoicePosPaymentTypes": { "id": 1, "paymentType": "CARD", "amount": 1000 }, "receipts": { "id": 1, "receiptCollectionLines": { … }, "receiptNumber": 1001, "expirationDate": "2024-12-31", "total": 1500.75, "totalCompanyCurrency": 1500.75, "collectedAmount": 750, "collectedAmountCompanyCurrency": 750, "pendingAmount": 750.75, "pendingAmountCompanyCurrency": 750.75, "remittable": true, "situation": "CO" }, "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": { … }, "valueDate": "2024-01-20", "customerAddress": { … }, "warehouse": { … }, "reference": "ALB-2024-001", "rateCode": { … }, "agency": { … }, "locked": false, "paymentMethod": { … }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "discount3": 3, "discount4": 2, "currency": { … }, "iban": "ES9121000418450200051332", "customerVatType": { … }, "phytosanitaryAuthorizedPerson": { … }, "representative1": { … }, "commissionType1": "PERCENTAGE", "commission1": 5, "representative2": { … }, "commissionType2": "PERCENTAGE", "commission2": 100, "representative3": { … }, "commissionType3": "PERCENTAGE", "commission3": 2.5, "noAccumulateRisk": false, "packages": 5, "grossWeight": 25.5, "netWeight": 23, "volume": 0.5, "billingObservations": "Handle with care", "shippingTerm": { … }, "shippingAmount": 25.5, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5, "tags": [ … ], "invoiceEditObservations": "Special handling required", "collectedAmount": 1500, "collectedAmountCompanyCurrency": 1500 }, "customerAddress": { "id": 1, "code": 101, "customerCode": "C10001", "customerName": "Acme S.A.", "customerPostalCode": "03001", "customerAddress": "Avenida de la Estación, 5", "customerCity": "Alicante", "customerState": "A", "customerStateDescription": "Alicante", "customerCountry": "ES", "customerCountryDescription": "Spain", "customerFirstPhoneNumber": "+34965123456", "customerSecondPhoneNumber": "+34965111111", "customerEmail": "cliente@acme.es", "customerCif": "B12345678", "customerId": 10001, "customerCommercialName": "Acme España", "name": "Warehourse", "city": "Alicante", "state": "A", "stateDescription": "Alicante", "postalCode": "03001", "country": "ES", "countryDescription": "Spain", "address": "Street Example, 14", "firstPhoneNumber": "+34965123456", "secondPhoneNumber": "+34965111111", "email": "direccion@acme.es", "cif": "B12345678", "activity": "Wholesale", "brand": "Acme Main Brand", "brandId": 5010, "customerIsActive": true, "isActive": true }, "rateCode": { "id": 1, "code": "string", "taxesIncluded": true }, "discount3": 2, "discount4": 1, "discount3AmountTotal": 20, "discount3AmountTotalCompanyCurrency": 20, "discount4AmountTotal": 10, "discount4AmountTotalCompanyCurrency": 10, "discountPpAmountTotal": 30, "percentageIrpf": 15, "shippingAmount": 25.5, "shippingAmountCompanyCurrency": 25.5, "manualExpiration": false, "commissions": { "id": 1, "representative": { … }, "commissionType": "PERCENTAGE", "percentage": 5, "total": 250, "totalCompanyCurrency": 250, "counter": 10 }, "ediInvoiceType": "COMMERCIAL_INVOICE", "electronicInvoiceSent": "SENT", "deliveryTerms": "FOB destination", "intrastatNatureTransaction": 11, "intrastatShippingTerm": "FOB", "intrastatPort": "ES004", "returnReason": "Product defect", "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, "billingSeriesInvoiceDraft": false, "invoiceNumber": "F-2024-000152", "customerCode": "CUST001", "customerBusinessName": "Clavei S.A.", "customerName": "John Doe", "iban": "ES4721000418401234567891", "referenceDocumentNumber": "REF-2024-0177", "hasReceipt": true, "customerEmail": "customer@example.com", "customerCountry": "Spain", "customerStateDescription": "Alicante", "customerAddressId": 7, "representatives": "Ana Torres, Juan Pérez", "salesAccountCode": 700, "quoteNumber": 15034, "quoteId": 320, "discount3AmountTotal": 12, "discount3AmountTotalCompanyCurrency": 12.47, "discount4AmountTotal": 10, "discount4AmountTotalCompanyCurrency": 10.39, "externalCode": "EXT-INV-2024-00123" }, "manualReceipts": false, "quoteNumber": 2001, "quoteId": 2001, "templateSaleInvoiceNumber": 3001, "templateSaleInvoiceId": 3001, "salesAccount": { "id": 1, "code": 1000, "description": "Cash account", "cif": "B12345678", "active": true, "color": "#FF5733", "parentCode": 100, "parentDescription": "Assets" }, "invoiceEditObservations": "Invoice reviewed and approved", "grossWeight": 125.5, "netWeight": 120, "volume": 2.35, "transportType": "Road transport", "agentDuty": "Agent duty paid", "creditLetter": "CL-2024-001", "administrativeCenterAccountingOffice": "ACC001", "administrativeCenterManagingBody": "MAN001", "administrativeCenterProcessingUnit": "PRO001", "administrativeCenterProposingBody": "PROP001", "correctiveReason": "INVOICE_NUMBER", "externalCode": "EXT-INV-2024-00123" }
Unique identifier of the accounting period. If not set, system will determine based on document date.
Internal billing observations for the invoice.
Administrative center accounting office code
Administrative center processing unit code
https://api.prana.software/api/v1/invoice
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.prana.software/api/v1/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,
"invoice": 100,
"billingSeries": 5,
"paymentMethod": 3,
"customerAddress": 10,
"representative": 2,
"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,
"daysUntilExpirationDate": 30,
"iban": "ES9121000418450200051332",
"totalWithoutExpenses": 1250,
"totalWithoutExpensesCompanyCurrency": 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",
"unpaidDate": "2024-02-15",
"unpaidReason": 1,
"receiptExpenses": {
"id": 1,
"header": 100,
"description": "Bank commission",
"percentage": 2.5,
"amount": 25,
"totalAmount": 25,
"type": "CATEGORY1"
},
"addExpenses": true
},
"deliveryNotes": {
"id": 2123,
"lines": {
"id": 1001,
"articleCombination": 200,
"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,
"assortedPackages": true,
"discount": 10.5,
"rsp": 25.99,
"reference": "REF-2024-001",
"picture": "product_image_001.jpg",
"warehouse": 3,
"noAccumulateWarehouse": false,
"brand": 5,
"returnReason": 1,
"received": true,
"accepted": true,
"freeDescription1": "Special handling required",
"freeDescription2": "Custom packaging",
"freeDescription3": "Priority delivery",
"freeDescription4": "Gift wrap",
"freeDescription5": "Express shipping",
"customCommission": false,
"representative1": 2,
"commissionType1": "PERCENTAGE",
"commission1": 5,
"representative2": 3,
"commissionType2": "PERCENTAGE",
"commission2": 3,
"representative3": 4,
"commissionType3": "FIXED",
"commission3": 25,
"articleVatType": "STANDARD",
"vatPercentage": 21,
"surchargePercentage": 5.2,
"grossAmount": 1000,
"grossAmountCompanyCurrency": 1000,
"netAmount": 900,
"netAmountCompanyCurrency": 900,
"totalLine": 1089,
"totalLineCompanyCurrency": 1089,
"batches": [
{
"id": 21,
"batch": 102,
"quantity": 40,
"packages": 3
}
],
"serialNumbers": [
{
"id": 8,
"serialNumber": 202
}
],
"concept": "Product delivery",
"disbursement": false
},
"billingSeries": 7,
"warehouse": 3,
"vatOperationType": 2
},
"taxes": {
"id": 1,
"invoice": 100,
"netAmountTotal": 1000,
"netAmountTotalCompanyCurrency": 1000,
"vatPercentage": 21,
"vatAmountTotal": 210,
"vatAmountTotalCompanyCurrency": 210,
"surchargePercentage": 5,
"surchargeAmountTotal": 50,
"surchargeAmountTotalCompanyCurrency": 50
},
"invoicePosPaymentTypes": {
"id": 1001,
"invoice": 100,
"paymentType": "CARD",
"amount": 1000
},
"salesAccount": 7001,
"manualReceipts": false,
"grossWeight": 125.5,
"netWeight": 120,
"volume": 2.35,
"creditLetter": "CL-2024-001",
"agentDuty": "Agent duty paid",
"transportType": "Road transport",
"ediInvoiceType": "COMMERCIAL_INVOICE",
"electronicInvoiceSent": "SENT",
"deliveryTerms": "FOB destination",
"intrastatNatureTransaction": 11,
"intrastatShippingTerm": "FOB",
"intrastatPort": "ES004",
"returnReason": "Product defect",
"paidCommissions": true,
"manualExpiration": false,
"iban": "ES9121000418450200051332",
"correctiveInvoice": 1050,
"customerAddress": 15,
"percentageIrpf": 15,
"invoiceEditObservations": "Invoice reviewed and approved",
"shippingVatType": "STANDARD",
"shippingAmount": 25.5,
"shippingVatPercentage": 21,
"shippingSurchargePercentage": 5.2,
"approved": true,
"quote": 2001,
"rateCode": 101,
"administrativeCenterAccountingOffice": "ACC001",
"administrativeCenterManagingBody": "MAN001",
"administrativeCenterProcessingUnit": "PRO001",
"administrativeCenterProposingBody": "PROP001",
"correctiveReason": "INVOICE_NUMBER",
"externalCode": "EXT-INV-2024-00123"
}'OK
Total amount of first discount in company currency
Total amount of second discount in company currency
Total disbursement amount in company currency
Total amount of third discount in company currency
Total amount of fourth discount in company currency
Administrative center accounting office code
Administrative center processing unit code
{ "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, "taxes": { "id": 1, "netAmountTotal": 1000, "netAmountTotalCompanyCurrency": 1000, "vatPercentage": 21, "vatAmountTotal": 210, "vatAmountTotalCompanyCurrency": 210, "surchargePercentage": 5, "surchargeAmountTotal": 50, "surchargeAmountTotalCompanyCurrency": 50, "grossAmountTotal": 1260, "grossAmountTotalCompanyCurrency": 1260, "discountsAmountTotal": 100, "withholdingAmountTotal": 15, "withholdingAmountTotalCompanyCurrency": 15, "withholdingPercentage": 1.5 }, "invoicePosPaymentTypes": { "id": 1, "paymentType": "CARD", "amount": 1000 }, "receipts": { "id": 1, "receiptCollectionLines": { … }, "receiptNumber": 1001, "expirationDate": "2024-12-31", "total": 1500.75, "totalCompanyCurrency": 1500.75, "collectedAmount": 750, "collectedAmountCompanyCurrency": 750, "pendingAmount": 750.75, "pendingAmountCompanyCurrency": 750.75, "remittable": true, "situation": "CO" }, "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": { … }, "valueDate": "2024-01-20", "customerAddress": { … }, "warehouse": { … }, "reference": "ALB-2024-001", "rateCode": { … }, "agency": { … }, "locked": false, "paymentMethod": { … }, "firstTerm": 30, "daysTerm": 30, "terms": 3, "proximityType": "NEARBY", "discount3": 3, "discount4": 2, "currency": { … }, "iban": "ES9121000418450200051332", "customerVatType": { … }, "phytosanitaryAuthorizedPerson": { … }, "representative1": { … }, "commissionType1": "PERCENTAGE", "commission1": 5, "representative2": { … }, "commissionType2": "PERCENTAGE", "commission2": 100, "representative3": { … }, "commissionType3": "PERCENTAGE", "commission3": 2.5, "noAccumulateRisk": false, "packages": 5, "grossWeight": 25.5, "netWeight": 23, "volume": 0.5, "billingObservations": "Handle with care", "shippingTerm": { … }, "shippingAmount": 25.5, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5, "tags": [ … ], "invoiceEditObservations": "Special handling required", "collectedAmount": 1500, "collectedAmountCompanyCurrency": 1500 }, "customerAddress": { "id": 1, "code": 101, "customerCode": "C10001", "customerName": "Acme S.A.", "customerPostalCode": "03001", "customerAddress": "Avenida de la Estación, 5", "customerCity": "Alicante", "customerState": "A", "customerStateDescription": "Alicante", "customerCountry": "ES", "customerCountryDescription": "Spain", "customerFirstPhoneNumber": "+34965123456", "customerSecondPhoneNumber": "+34965111111", "customerEmail": "cliente@acme.es", "customerCif": "B12345678", "customerId": 10001, "customerCommercialName": "Acme España", "name": "Warehourse", "city": "Alicante", "state": "A", "stateDescription": "Alicante", "postalCode": "03001", "country": "ES", "countryDescription": "Spain", "address": "Street Example, 14", "firstPhoneNumber": "+34965123456", "secondPhoneNumber": "+34965111111", "email": "direccion@acme.es", "cif": "B12345678", "activity": "Wholesale", "brand": "Acme Main Brand", "brandId": 5010, "customerIsActive": true, "isActive": true }, "rateCode": { "id": 1, "code": "string", "taxesIncluded": true }, "discount3": 2, "discount4": 1, "discount3AmountTotal": 20, "discount3AmountTotalCompanyCurrency": 20, "discount4AmountTotal": 10, "discount4AmountTotalCompanyCurrency": 10, "discountPpAmountTotal": 30, "percentageIrpf": 15, "shippingAmount": 25.5, "shippingAmountCompanyCurrency": 25.5, "manualExpiration": false, "commissions": { "id": 1, "representative": { … }, "commissionType": "PERCENTAGE", "percentage": 5, "total": 250, "totalCompanyCurrency": 250, "counter": 10 }, "ediInvoiceType": "COMMERCIAL_INVOICE", "electronicInvoiceSent": "SENT", "deliveryTerms": "FOB destination", "intrastatNatureTransaction": 11, "intrastatShippingTerm": "FOB", "intrastatPort": "ES004", "returnReason": "Product defect", "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, "billingSeriesInvoiceDraft": false, "invoiceNumber": "F-2024-000152", "customerCode": "CUST001", "customerBusinessName": "Clavei S.A.", "customerName": "John Doe", "iban": "ES4721000418401234567891", "referenceDocumentNumber": "REF-2024-0177", "hasReceipt": true, "customerEmail": "customer@example.com", "customerCountry": "Spain", "customerStateDescription": "Alicante", "customerAddressId": 7, "representatives": "Ana Torres, Juan Pérez", "salesAccountCode": 700, "quoteNumber": 15034, "quoteId": 320, "discount3AmountTotal": 12, "discount3AmountTotalCompanyCurrency": 12.47, "discount4AmountTotal": 10, "discount4AmountTotalCompanyCurrency": 10.39, "externalCode": "EXT-INV-2024-00123" }, "manualReceipts": false, "quoteNumber": 2001, "quoteId": 2001, "templateSaleInvoiceNumber": 3001, "templateSaleInvoiceId": 3001, "salesAccount": { "id": 1, "code": 1000, "description": "Cash account", "cif": "B12345678", "active": true, "color": "#FF5733", "parentCode": 100, "parentDescription": "Assets" }, "invoiceEditObservations": "Invoice reviewed and approved", "grossWeight": 125.5, "netWeight": 120, "volume": 2.35, "transportType": "Road transport", "agentDuty": "Agent duty paid", "creditLetter": "CL-2024-001", "administrativeCenterAccountingOffice": "ACC001", "administrativeCenterManagingBody": "MAN001", "administrativeCenterProcessingUnit": "PRO001", "administrativeCenterProposingBody": "PROP001", "correctiveReason": "INVOICE_NUMBER", "externalCode": "EXT-INV-2024-00123" }
https://api.prana.software/api/v1/invoice/send
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.prana.software/api/v1/invoice/send \
-H 'Content-Type: application/json' \
-d '{
"to": "customer@example.com",
"cc": "manager@example.com",
"subject": "Invoice #1001 - Payment Due",
"ids": [
10,
20,
30
]
}'https://api.prana.software/api/v1/invoice/search
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://api.prana.software/api/v1/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.
Indicates if the invoice is a draft of the billing series.
Reference document number linked to the invoice.
State or province description of the customer.
Names of representatives associated with the invoice.
Total amount of third discount in company currency.
Total amount of fourth discount in company currency.
{ "data": [ { … } ], "page": 0, "total": 150, "pages": 14, "size": 10 }