Skip to content

Prana API (1.0)

API Definition to interact with Prana platform

Download OpenAPI description
Languages
Servers

https://api.prana.software/

Stock Regularization

Manage your Stock Regularizations

Operations
Operations
Operations
Operations
Operations
Operations
Operations
Operations

Stock Transfer

Manage your Stock Transfers

Operations
Operations

Warehouse Movement

Manage your warehouse movements

Operations
Operations
Operations

DeliveryNote

Manage your DeliveryNotes

Operations

Warehouse Accumulate

Manage your warehouse accumulates

Operations
Operations
Operations
Operations
Operations

Purchase Invoice

Manage your Purchase Invoices

Operations

Request

Get a specific purchase invoice.

Path
idinteger(int32)required
curl -i -X GET \
  'https://api.prana.software/api/v1/purchase-invoice/{id}'

Responses

OK

Bodyapplication/json
idinteger(int32)required

Unique identifier of the entity

Example: 1
observationsstring

General observations

Example: "Special handling required"
numberinteger

Invoice number

Example: 1001
documentDatestring(date)

Document date

Example: "2024-01-15"
quantityTotalnumber

Total quantity

Example: 10
billingSeriesobject(ApiBillingSeriesListReadDto)
lockedboolean

Flag indicating if the invoice is locked

Example: false
accountedboolean

Flag indicating if the invoice is accounted

Example: true
grossAmountTotalnumber

Total gross amount

Example: 1000
grossAmountTotalCompanyCurrencynumber

Total gross amount in company currency

Example: 1000
discount1AmountTotalnumber

Total amount of first discount

Example: 150
discount1AmountTotalCompanyCurrencynumber

Total amount of first discount in company currency

Example: 150
discount2AmountTotalnumber

Total amount of second discount

Example: 75
discount2AmountTotalCompanyCurrencynumber

Total amount of second discount in company currency

Example: 75
discountPpnumber

PP discount percentage

Example: 5
discountPpAmountTotalCompanyCurrencynumber

PP discount amount in company currency

Example: 50
netAmountTotalnumber

Total net amount

Example: 900
netAmountTotalCompanyCurrencynumber

Total net amount in company currency

Example: 900
vatAmountTotalnumber

Total VAT amount

Example: 189
vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency

Example: 189
totalnumber

Total amount

Example: 1114.5
totalCompanyCurrencynumber

Total amount in company currency

Example: 1114.5
paymentMethodobject(ApiPaymentMethodListReadDto)
firstTerminteger(int32)

First payment term in days

Example: 30
daysTerminteger(int32)

Payment term in days

Example: 30
termsinteger(int32)

Number of payment terms

Example: 3
proximityTypestring(ApiProximityTypeEnum)
Enum"NEARBY""PREVIOUS""LATER"
Example: "LOCAL"
discount1number

First discount percentage

Example: 10
discount2number

Second discount percentage

Example: 5
currencyobject(ApiCurrencyListReadDto)
changenumber

Exchange rate

Example: 1
ibanstring

IBAN for payments

Example: "ES9121000418450200051332"
withholdingnumber

Withholding percentage

Example: 15
customerVatTypeobject(ApiCustomerVatTypeListReadDto)
billingObservationsstring

Billing observations

Example: "Handle with care"
paidCommissionsboolean

Flag indicating if commissions are paid

Example: true
packagesinteger(int32)

Number of packages

Example: 5
tagsArray of strings

Tags associated with the invoice

Example: ["urgent","priority"]
statusstring(ApiStatusInvoiceEnum)
Enum"PENDING""PAID""PARTIALLY_PAID""DRAFT"
Example: "PAID"
referencestring

Reference number

Example: "FAC-2024-001"
valueDatestring(date)

Value date

Example: "2024-01-20"
shippingTermobject(ApiShippingTermListReadDto)
irpfAmountTotalnumber

Total IRPF amount

Example: 15
withholdingAmountTotalnumber

Total withholding amount

Example: 15
disbursementAmountTotalnumber

Total disbursement amount

Example: 25.5
disbursementAmountTotalCompanyCurrencynumber

Total disbursement amount in company currency

Example: 25.5
collectedAmountnumber

Collected amount

Example: 1114.5
collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1114.5
expirationDatestring(date)

Expiration date

Example: "2024-02-15"
manualboolean

Flag indicating if the invoice is manual

Example: false
amountReconciliationnumber

Amount for reconciliation

Example: 0
amountReconciliationCompanyCurrencynumber

Amount for reconciliation in company currency

Example: 0
linesobject(ApiPurchaseDeliveryNoteLineReadDto)
taxesobject(ApiPurchaseTaxesListReadDto)
receiptsobject(ApiPurchaseInvoicePurchaseReceiptListReadDto)
deliveryNotesobject(ApiPurchaseDeliveryNoteReadDto)
filesobject(ApiPurchaseInvoiceFileListReadDto)
supplierobject(ApiSupplierListReadDto)
purchasingAccountobject(ApiChartAccountListReadDto)
correctiveInvoiceobject(ApiPurchaseInvoiceListReadDto)
billCodestring

Bill code reference

Example: "BILL-2024-001"
receivedDatestring(date)

Date when the purchase invoice was received

Example: "2024-08-07"
irpfTypestring(ApiIRPFTypeEnum)
Enum"LEASES""PROFESIONAL_ACTIVITIES""AGRO"
Example: "GENERAL"
Response
application/json
{ "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" }

Request

Update a specific purchase invoice.

Path
idinteger(int32)required
Bodyapplication/jsonrequired
idinteger(int32)

Unique identifier of the invoice.

Example: 1001
valueDatestring(date)

Value date of the invoice.

Example: "2024-05-15"
lockedboolean

Indicates if the invoice is locked for modifications.

Example: false
periodIdinteger(int32)

Unique identifier of the accounting period. If not set, system will determine based on document date.

Example: 1
accountedboolean

Indicates if the invoice has been accounted.

Example: true
packagesinteger(int32)

Total number of packages associated with the invoice.

Example: 5
observationsstring

General observations for the invoice.

Example: "Deliver before noon."
billingObservationsstring

Internal billing observations for the invoice.

Example: "Special rate applied."
paymentMethodinteger(int32)

Payment method identifier.

Example: 3
firstTerminteger(int32)

First payment term in days.

Example: 30
daysTerminteger(int32)

Subsequent payment term in days.

Example: 30
termsinteger(int32)

Number of payment terms.

Example: 3
proximityTypestring(ApiProximityTypeEnum)
Enum"NEARBY""PREVIOUS""LATER"
Example: "LOCAL"
tagsArray of strings

Tags related to the invoice.

Example: ["urgent","international"]
accountingAccountinteger(int32)

Accounting account code for the invoice.

Example: 43000001
statusstring(ApiStatusInvoiceEnum)
Enum"PENDING""PAID""PARTIALLY_PAID""DRAFT"
Example: "ISSUED"
referencestring

Reference number or string for the invoice.

Example: "INV-2024-0123"
customerVatTypeinteger(int32)

Customer VAT type identifier.

Example: 1
billingSeriesinteger(int32)

Billing series identifier.

Example: 7
shippingTerminteger(int32)

Shipping term identifier.

Example: 2
currencyinteger(int32)

Currency identifier.

Example: 1
changenumber

Exchange rate for currency conversion.

Example: 1.1
discount1number

First discount percentage applied to the invoice.

Example: 10
discount2number

Second discount percentage applied to the invoice.

Example: 5
discount3number

Third discount percentage applied to the invoice.

Example: 2
discount4number

Fourth discount percentage applied to the invoice.

Example: 1
discountPpnumber

Prompt payment discount percentage.

Example: 3
withholdingnumber

Withholding percentage applied to the invoice.

Example: 15
numberinteger

Invoice document number.

Example: 10022
documentDatestring(date)

Document date for the invoice.

Example: "2024-05-01"
expirationDatestring(date)

Expiration date of the invoice.

Example: "2024-06-01"
manualboolean

Indicates if the invoice was created manually.

Example: false
receiptsobject(ApiPurchaseReceiptWriteDto)
taxesobject(ApiPurchaseTaxesWriteDto)
deliveryNotesobject(ApiPurchaseInvoiceDeliveryNoteWriteDto)
purchasingAccountinteger(int32)

Purchasing account identifier

Example: 6000001
supplierinteger(int32)

Supplier identifier

Example: 1001
receivedDatestring(date)

Date when the purchase invoice was received

Example: "2024-08-07"
billCodestring

Bill code reference

Example: "BILL-2024-001"
deliveryNotestring

Delivery note reference

Example: "DN-2024-001"
correctiveInvoiceinteger(int32)

Corrective invoice identifier if this invoice corrects another

Example: 1050
irpfTypestring(ApiIRPFTypeEnum)
Enum"LEASES""PROFESIONAL_ACTIVITIES""AGRO"
Example: "GENERAL"
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"
  }'

Responses

OK

Bodyapplication/json
idinteger(int32)required

Unique identifier of the entity

Example: 1
observationsstring

General observations

Example: "Special handling required"
numberinteger

Invoice number

Example: 1001
documentDatestring(date)

Document date

Example: "2024-01-15"
quantityTotalnumber

Total quantity

Example: 10
billingSeriesobject(ApiBillingSeriesListReadDto)
lockedboolean

Flag indicating if the invoice is locked

Example: false
accountedboolean

Flag indicating if the invoice is accounted

Example: true
grossAmountTotalnumber

Total gross amount

Example: 1000
grossAmountTotalCompanyCurrencynumber

Total gross amount in company currency

Example: 1000
discount1AmountTotalnumber

Total amount of first discount

Example: 150
discount1AmountTotalCompanyCurrencynumber

Total amount of first discount in company currency

Example: 150
discount2AmountTotalnumber

Total amount of second discount

Example: 75
discount2AmountTotalCompanyCurrencynumber

Total amount of second discount in company currency

Example: 75
discountPpnumber

PP discount percentage

Example: 5
discountPpAmountTotalCompanyCurrencynumber

PP discount amount in company currency

Example: 50
netAmountTotalnumber

Total net amount

Example: 900
netAmountTotalCompanyCurrencynumber

Total net amount in company currency

Example: 900
vatAmountTotalnumber

Total VAT amount

Example: 189
vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency

Example: 189
totalnumber

Total amount

Example: 1114.5
totalCompanyCurrencynumber

Total amount in company currency

Example: 1114.5
paymentMethodobject(ApiPaymentMethodListReadDto)
firstTerminteger(int32)

First payment term in days

Example: 30
daysTerminteger(int32)

Payment term in days

Example: 30
termsinteger(int32)

Number of payment terms

Example: 3
proximityTypestring(ApiProximityTypeEnum)
Enum"NEARBY""PREVIOUS""LATER"
Example: "LOCAL"
discount1number

First discount percentage

Example: 10
discount2number

Second discount percentage

Example: 5
currencyobject(ApiCurrencyListReadDto)
changenumber

Exchange rate

Example: 1
ibanstring

IBAN for payments

Example: "ES9121000418450200051332"
withholdingnumber

Withholding percentage

Example: 15
customerVatTypeobject(ApiCustomerVatTypeListReadDto)
billingObservationsstring

Billing observations

Example: "Handle with care"
paidCommissionsboolean

Flag indicating if commissions are paid

Example: true
packagesinteger(int32)

Number of packages

Example: 5
tagsArray of strings

Tags associated with the invoice

Example: ["urgent","priority"]
statusstring(ApiStatusInvoiceEnum)
Enum"PENDING""PAID""PARTIALLY_PAID""DRAFT"
Example: "PAID"
referencestring

Reference number

Example: "FAC-2024-001"
valueDatestring(date)

Value date

Example: "2024-01-20"
shippingTermobject(ApiShippingTermListReadDto)
irpfAmountTotalnumber

Total IRPF amount

Example: 15
withholdingAmountTotalnumber

Total withholding amount

Example: 15
disbursementAmountTotalnumber

Total disbursement amount

Example: 25.5
disbursementAmountTotalCompanyCurrencynumber

Total disbursement amount in company currency

Example: 25.5
collectedAmountnumber

Collected amount

Example: 1114.5
collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1114.5
expirationDatestring(date)

Expiration date

Example: "2024-02-15"
manualboolean

Flag indicating if the invoice is manual

Example: false
amountReconciliationnumber

Amount for reconciliation

Example: 0
amountReconciliationCompanyCurrencynumber

Amount for reconciliation in company currency

Example: 0
linesobject(ApiPurchaseDeliveryNoteLineReadDto)
taxesobject(ApiPurchaseTaxesListReadDto)
receiptsobject(ApiPurchaseInvoicePurchaseReceiptListReadDto)
deliveryNotesobject(ApiPurchaseDeliveryNoteReadDto)
filesobject(ApiPurchaseInvoiceFileListReadDto)
supplierobject(ApiSupplierListReadDto)
purchasingAccountobject(ApiChartAccountListReadDto)
correctiveInvoiceobject(ApiPurchaseInvoiceListReadDto)
billCodestring

Bill code reference

Example: "BILL-2024-001"
receivedDatestring(date)

Date when the purchase invoice was received

Example: "2024-08-07"
irpfTypestring(ApiIRPFTypeEnum)
Enum"LEASES""PROFESIONAL_ACTIVITIES""AGRO"
Example: "GENERAL"
Response
application/json
{ "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" }

Request

Delete specific purchase invoice.

Path
idinteger(int32)required
curl -i -X DELETE \
  'https://api.prana.software/api/v1/purchase-invoice/{id}'

Responses

OK

Request

Create a new purchase invoice.

Bodyapplication/jsonrequired
idinteger(int32)

Unique identifier of the invoice.

Example: 1001
valueDatestring(date)

Value date of the invoice.

Example: "2024-05-15"
lockedboolean

Indicates if the invoice is locked for modifications.

Example: false
periodIdinteger(int32)

Unique identifier of the accounting period. If not set, system will determine based on document date.

Example: 1
accountedboolean

Indicates if the invoice has been accounted.

Example: true
packagesinteger(int32)

Total number of packages associated with the invoice.

Example: 5
observationsstring

General observations for the invoice.

Example: "Deliver before noon."
billingObservationsstring

Internal billing observations for the invoice.

Example: "Special rate applied."
paymentMethodinteger(int32)

Payment method identifier.

Example: 3
firstTerminteger(int32)

First payment term in days.

Example: 30
daysTerminteger(int32)

Subsequent payment term in days.

Example: 30
termsinteger(int32)

Number of payment terms.

Example: 3
proximityTypestring(ApiProximityTypeEnum)
Enum"NEARBY""PREVIOUS""LATER"
Example: "LOCAL"
tagsArray of strings

Tags related to the invoice.

Example: ["urgent","international"]
accountingAccountinteger(int32)

Accounting account code for the invoice.

Example: 43000001
statusstring(ApiStatusInvoiceEnum)
Enum"PENDING""PAID""PARTIALLY_PAID""DRAFT"
Example: "ISSUED"
referencestring

Reference number or string for the invoice.

Example: "INV-2024-0123"
customerVatTypeinteger(int32)

Customer VAT type identifier.

Example: 1
billingSeriesinteger(int32)

Billing series identifier.

Example: 7
shippingTerminteger(int32)

Shipping term identifier.

Example: 2
currencyinteger(int32)

Currency identifier.

Example: 1
changenumber

Exchange rate for currency conversion.

Example: 1.1
discount1number

First discount percentage applied to the invoice.

Example: 10
discount2number

Second discount percentage applied to the invoice.

Example: 5
discount3number

Third discount percentage applied to the invoice.

Example: 2
discount4number

Fourth discount percentage applied to the invoice.

Example: 1
discountPpnumber

Prompt payment discount percentage.

Example: 3
withholdingnumber

Withholding percentage applied to the invoice.

Example: 15
numberinteger

Invoice document number.

Example: 10022
documentDatestring(date)

Document date for the invoice.

Example: "2024-05-01"
expirationDatestring(date)

Expiration date of the invoice.

Example: "2024-06-01"
manualboolean

Indicates if the invoice was created manually.

Example: false
receiptsobject(ApiPurchaseReceiptWriteDto)
taxesobject(ApiPurchaseTaxesWriteDto)
deliveryNotesobject(ApiPurchaseInvoiceDeliveryNoteWriteDto)
purchasingAccountinteger(int32)

Purchasing account identifier

Example: 6000001
supplierinteger(int32)

Supplier identifier

Example: 1001
receivedDatestring(date)

Date when the purchase invoice was received

Example: "2024-08-07"
billCodestring

Bill code reference

Example: "BILL-2024-001"
deliveryNotestring

Delivery note reference

Example: "DN-2024-001"
correctiveInvoiceinteger(int32)

Corrective invoice identifier if this invoice corrects another

Example: 1050
irpfTypestring(ApiIRPFTypeEnum)
Enum"LEASES""PROFESIONAL_ACTIVITIES""AGRO"
Example: "GENERAL"
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"
  }'

Responses

OK

Bodyapplication/json
idinteger(int32)required

Unique identifier of the entity

Example: 1
observationsstring

General observations

Example: "Special handling required"
numberinteger

Invoice number

Example: 1001
documentDatestring(date)

Document date

Example: "2024-01-15"
quantityTotalnumber

Total quantity

Example: 10
billingSeriesobject(ApiBillingSeriesListReadDto)
lockedboolean

Flag indicating if the invoice is locked

Example: false
accountedboolean

Flag indicating if the invoice is accounted

Example: true
grossAmountTotalnumber

Total gross amount

Example: 1000
grossAmountTotalCompanyCurrencynumber

Total gross amount in company currency

Example: 1000
discount1AmountTotalnumber

Total amount of first discount

Example: 150
discount1AmountTotalCompanyCurrencynumber

Total amount of first discount in company currency

Example: 150
discount2AmountTotalnumber

Total amount of second discount

Example: 75
discount2AmountTotalCompanyCurrencynumber

Total amount of second discount in company currency

Example: 75
discountPpnumber

PP discount percentage

Example: 5
discountPpAmountTotalCompanyCurrencynumber

PP discount amount in company currency

Example: 50
netAmountTotalnumber

Total net amount

Example: 900
netAmountTotalCompanyCurrencynumber

Total net amount in company currency

Example: 900
vatAmountTotalnumber

Total VAT amount

Example: 189
vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency

Example: 189
totalnumber

Total amount

Example: 1114.5
totalCompanyCurrencynumber

Total amount in company currency

Example: 1114.5
paymentMethodobject(ApiPaymentMethodListReadDto)
firstTerminteger(int32)

First payment term in days

Example: 30
daysTerminteger(int32)

Payment term in days

Example: 30
termsinteger(int32)

Number of payment terms

Example: 3
proximityTypestring(ApiProximityTypeEnum)
Enum"NEARBY""PREVIOUS""LATER"
Example: "LOCAL"
discount1number

First discount percentage

Example: 10
discount2number

Second discount percentage

Example: 5
currencyobject(ApiCurrencyListReadDto)
changenumber

Exchange rate

Example: 1
ibanstring

IBAN for payments

Example: "ES9121000418450200051332"
withholdingnumber

Withholding percentage

Example: 15
customerVatTypeobject(ApiCustomerVatTypeListReadDto)
billingObservationsstring

Billing observations

Example: "Handle with care"
paidCommissionsboolean

Flag indicating if commissions are paid

Example: true
packagesinteger(int32)

Number of packages

Example: 5
tagsArray of strings

Tags associated with the invoice

Example: ["urgent","priority"]
statusstring(ApiStatusInvoiceEnum)
Enum"PENDING""PAID""PARTIALLY_PAID""DRAFT"
Example: "PAID"
referencestring

Reference number

Example: "FAC-2024-001"
valueDatestring(date)

Value date

Example: "2024-01-20"
shippingTermobject(ApiShippingTermListReadDto)
irpfAmountTotalnumber

Total IRPF amount

Example: 15
withholdingAmountTotalnumber

Total withholding amount

Example: 15
disbursementAmountTotalnumber

Total disbursement amount

Example: 25.5
disbursementAmountTotalCompanyCurrencynumber

Total disbursement amount in company currency

Example: 25.5
collectedAmountnumber

Collected amount

Example: 1114.5
collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1114.5
expirationDatestring(date)

Expiration date

Example: "2024-02-15"
manualboolean

Flag indicating if the invoice is manual

Example: false
amountReconciliationnumber

Amount for reconciliation

Example: 0
amountReconciliationCompanyCurrencynumber

Amount for reconciliation in company currency

Example: 0
linesobject(ApiPurchaseDeliveryNoteLineReadDto)
taxesobject(ApiPurchaseTaxesListReadDto)
receiptsobject(ApiPurchaseInvoicePurchaseReceiptListReadDto)
deliveryNotesobject(ApiPurchaseDeliveryNoteReadDto)
filesobject(ApiPurchaseInvoiceFileListReadDto)
supplierobject(ApiSupplierListReadDto)
purchasingAccountobject(ApiChartAccountListReadDto)
correctiveInvoiceobject(ApiPurchaseInvoiceListReadDto)
billCodestring

Bill code reference

Example: "BILL-2024-001"
receivedDatestring(date)

Date when the purchase invoice was received

Example: "2024-08-07"
irpfTypestring(ApiIRPFTypeEnum)
Enum"LEASES""PROFESIONAL_ACTIVITIES""AGRO"
Example: "GENERAL"
Response
application/json
{ "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" }

Request

Get all your purchase invoices.

Bodyapplication/jsonrequired
conditionobject(ApiCondition)
sortCriteriaArray of objects(ApiSortDto)

List of sorting criteria to apply

pageNumberinteger(int32)required

Page number to retrieve (0-based)

Example: 0
pageSizeinteger(int32)required

Number of items per page

Example: 20
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
  }'

Responses

OK

Bodyapplication/json
dataArray of objects(ApiPurchaseInvoiceListReadDto)required

List of data items for the current page

data[].​idinteger(int32)required

Unique identifier of the entity

Example: 1
data[].​billingSeriesCodestring

Billing series code associated with the invoice.

Example: "A"
data[].​numberinteger

Invoice number.

Example: 10023
data[].​documentDatestring(date)

Document date of the invoice.

Example: "2024-04-20"
data[].​valueDatestring(date)

Value date of the invoice.

Example: "2024-04-22"
data[].​commercialNamestring

Commercial name of the customer.

Example: "Company ABC S.A."
data[].​grossAmountTotalnumber

Total gross amount of the invoice.

Example: 800
data[].​grossAmountTotalCompanyCurrencynumber

Total gross amount in company currency.

Example: 820
data[].​discount1AmountTotalnumber

Total amount of first discount applied.

Example: 10
data[].​discount1AmountTotalCompanyCurrencynumber

Total amount of first discount in company currency.

Example: 10.25
data[].​discount2AmountTotalnumber

Total amount of second discount applied.

Example: 5
data[].​discount2AmountTotalCompanyCurrencynumber

Total amount of second discount in company currency.

Example: 5.1
data[].​discountPpAmountTotalnumber

Total amount of prompt payment discount.

Example: 3
data[].​discountPpAmountTotalCompanyCurrencynumber

Total amount of prompt payment discount in company currency.

Example: 3.06
data[].​discountAmountTotalnumber

Total amount of all discounts.

Example: 18
data[].​discountAmountTotalCompanyCurrencynumber

Total amount of all discounts in company currency.

Example: 18.41
data[].​netAmountTotalnumber

Total net amount (after discounts, before VAT) of the invoice.

Example: 700
data[].​netAmountTotalCompanyCurrencynumber

Total net amount in company currency.

Example: 715
data[].​vatAmountTotalnumber

Total VAT amount of the invoice.

Example: 147
data[].​vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency.

Example: 150
data[].​totalnumber

Total amount of the invoice (final amount).

Example: 847
data[].​totalCompanyCurrencynumber

Total amount of the invoice in company currency.

Example: 865
data[].​paymentMethodDescriptionstring

Description of payment method.

Example: "Bank transfer"
data[].​currencyNomenclaturestring

Nomenclature of the currency.

Example: "EUR"
data[].​documentTypestring

Type of the document.

Example: "INVOICE"
data[].​quantityTotalnumber

Total quantity associated with the invoice.

Example: 25
data[].​tagsArray of strings

Tags associated with the invoice.

Example: ["urgent","priority"]
data[].​statusstring(ApiStatusInvoiceEnum)
Enum"PENDING""PAID""PARTIALLY_PAID""DRAFT"
Example: "ISSUED"
data[].​collectedAmountnumber

Total amount collected for the invoice.

Example: 400
data[].​collectedAmountCompanyCurrencynumber

Total amount collected in company currency.

Example: 420
data[].​currencySignificantDecimalsDocumentsinteger(int32)

Number of significant decimals for documents in the invoice currency.

Example: 2
data[].​currencyIntermediateDecimalsDocumentsinteger(int32)

Number of intermediate decimals for documents in the invoice currency.

Example: 2
data[].​currencyDecimalsCalculatePricesinteger(int32)

Number of decimals for calculating prices.

Example: 4
data[].​currencyDecimalsCalculateCostsinteger(int32)

Number of decimals for calculating costs.

Example: 4
data[].​referencestring

Reference number or code for the invoice.

Example: "INV-2024-1001"
data[].​disbursementAmountTotalnumber

Total disbursement amount of the invoice.

Example: 50
data[].​disbursementAmountTotalCompanyCurrencynumber

Total disbursement amount of the invoice in company currency.

Example: 50
data[].​expirationDatestring(date)

Expiration date of the invoice.

Example: "2024-05-29"
data[].​withholdingAmountTotalnumber

Total withholding amount applied to the invoice.

Example: 30
data[].​manualboolean

Indicates if the invoice was generated manually.

Example: false
data[].​amountReconciliationnumber
data[].​amountReconciliationCompanyCurrencynumber
data[].​supplierIdstring

Unique identifier of the supplier

Example: 1001
data[].​supplierCodestring

Supplier code

Example: "SUPP001"
data[].​supplierNamestring

Name of the supplier

Example: "ABC Suppliers Ltd."
data[].​purchasingAccountCodestring

Purchasing account code

Example: 6000001
data[].​billCodestring

Bill code reference

Example: "BILL-2024-001"
data[].​receivedDatestring(date)

Date when the purchase invoice was received

Example: "2024-08-07"
data[].​irpfTypestring(ApiIRPFTypeEnum)
Enum"LEASES""PROFESIONAL_ACTIVITIES""AGRO"
Example: "GENERAL"
pageinteger(int32)required

Current page number (0-based)

Example: 0
totalinteger(int32)required

Total number of items across all pages

Example: 150
pagesinteger(int64)required

Last page number (0-based)

Example: 14
sizeinteger(int32)required

Number of items per page

Example: 10
Response
application/json
{ "data": [ { … } ], "page": 0, "total": 150, "pages": 14, "size": 10 }
Operations

Payment Method

Manage your Payment Methods

Operations
Operations

Recurring Billing Templates

Manage your recurring billing templates

Operations
Operations

Billing Series

Manage your Billing Series

Operations
Operations
Operations

PurchaseDeliveryNote

Manage your PurchaseDeliveryNotes

Operations