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

Request

Get a specific invoice.

Path
idinteger(int32)required
curl -i -X GET \
  'https://api.prana.software/api/v1/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
taxesobject(ApiTaxesListReadDto)
invoicePosPaymentTypesobject(ApiInvoicePosPaymentTypeListReadDto)
receiptsobject(ApiInvoiceReceiptReadDto)
deliveryNotesobject(ApiDeliveryNoteReadDto)
customerAddressobject(ApiCustomerAddressViewReadDto)
rateCodeobject(ApiRateCodeListReadDto)
discount3number

Third discount percentage

Example: 2
discount4number

Fourth discount percentage

Example: 1
discount3AmountTotalnumber

Total amount of third discount

Example: 20
discount3AmountTotalCompanyCurrencynumber

Total amount of third discount in company currency

Example: 20
discount4AmountTotalnumber

Total amount of fourth discount

Example: 10
discount4AmountTotalCompanyCurrencynumber

Total amount of fourth discount in company currency

Example: 10
discountPpAmountTotalnumber

Total amount of prompt payment discount

Example: 30
percentageIrpfnumber

IRPF (Personal Income Tax) percentage

Example: 15
shippingAmountnumber

Shipping amount

Example: 25.5
shippingAmountCompanyCurrencynumber

Shipping amount in company currency

Example: 25.5
manualExpirationboolean

Indicates if expiration date is set manually

Example: false
commissionsobject(ApiCommissionInvoiceListReadDto)
ediInvoiceTypestring(ApiEdiInvoiceTypeEnum)
Enum"COMMERCIAL_INVOICE""CREDIT_NOTE""CHARGE_NOTE""SUMMARY_INVOICE""PROFORMA_INVOICE""AUTO_INVOICE"
Example: "COMMERCIAL_INVOICE"
electronicInvoiceSentstring

Status of electronic invoice transmission

Example: "SENT"
deliveryTermsstring

Delivery terms and conditions

Example: "FOB destination"
intrastatNatureTransactionstring

Intrastat nature of transaction code

Example: 11
intrastatShippingTermstring

Intrastat shipping term code

Example: "FOB"
intrastatPortstring

Intrastat port of entry/exit

Example: "ES004"
returnReasonstring

Reason for return if applicable

Example: "Product defect"
correctiveInvoiceobject(ApiInvoiceListReadDto)
manualReceiptsboolean

Indicates if receipts are created manually

Example: false
quoteNumberinteger

Quote number if invoice is generated from a quote

Example: 2001
quoteIdinteger(int32)

Quote identifier if invoice is generated from a quote

Example: 2001
templateSaleInvoiceNumberinteger

Template sale invoice number if applicable

Example: 3001
templateSaleInvoiceIdinteger(int32)

Template sale invoice identifier if applicable

Example: 3001
salesAccountobject(ApiChartAccountListReadDto)
invoiceEditObservationsstring

Invoice editing observations

Example: "Invoice reviewed and approved"
grossWeightnumber

Total gross weight of the shipment

Example: 125.5
netWeightnumber

Total net weight of the shipment

Example: 120
volumenumber

Total volume of the shipment

Example: 2.35
transportTypestring

Type of transport used

Example: "Road transport"
agentDutystring

Agent duty information

Example: "Agent duty paid"
creditLetterstring

Credit letter reference

Example: "CL-2024-001"
administrativeCenterAccountingOfficestring

Administrative center accounting office code

Example: "ACC001"
administrativeCenterManagingBodystring

Administrative center managing body code

Example: "MAN001"
administrativeCenterProcessingUnitstring

Administrative center processing unit code

Example: "PRO001"
administrativeCenterProposingBodystring

Administrative center proposing body code

Example: "PROP001"
correctiveReasonstring(ApiCorrectiveReasonEnum)
Enum"INVOICE_NUMBER""INVOICE_SERIES""EXPEDITION_DATE""ISSUER_NAME""RECEIVER_NAME""ISSUER_TAX_ID""RECIPIENT_TAX_ID""ISSUING_ADDRESS""RECEIVING_ADDRESS""OPERATION_DETAIL"
Example: "INVOICE_NUMBER"
externalCodestring

External identifier of the invoice, typically used to reference the invoice in external systems.

Example: "EXT-INV-2024-00123"
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, "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" }

Request

Update a specific 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(ApiReceiptWriteDto)
deliveryNotesobject(ApiInvoiceDeliveryNoteWriteDto)
taxesobject(ApiTaxesWriteDto)
invoicePosPaymentTypesobject(ApiInvoicePosPaymentTypeWriteDto)
salesAccountinteger(int32)

Sales account identifier for the invoice

Example: 7001
manualReceiptsboolean

Indicates if receipts are created manually

Example: false
grossWeightnumber

Total gross weight of the shipment

Example: 125.5
netWeightnumber

Total net weight of the shipment

Example: 120
volumenumber

Total volume of the shipment

Example: 2.35
creditLetterstring

Credit letter reference

Example: "CL-2024-001"
agentDutystring

Agent duty information

Example: "Agent duty paid"
transportTypestring

Type of transport used

Example: "Road transport"
ediInvoiceTypestring(ApiEdiInvoiceTypeEnum)
Enum"COMMERCIAL_INVOICE""CREDIT_NOTE""CHARGE_NOTE""SUMMARY_INVOICE""PROFORMA_INVOICE""AUTO_INVOICE"
Example: "COMMERCIAL_INVOICE"
electronicInvoiceSentstring

Status of electronic invoice transmission

Example: "SENT"
deliveryTermsstring

Delivery terms and conditions

Example: "FOB destination"
intrastatNatureTransactionstring

Intrastat nature of transaction code

Example: 11
intrastatShippingTermstring

Intrastat shipping term code

Example: "FOB"
intrastatPortstring

Intrastat port of entry/exit

Example: "ES004"
returnReasonstring

Reason for return if applicable

Example: "Product defect"
paidCommissionsboolean

Indicates if commissions have been paid

Example: true
manualExpirationboolean

Indicates if expiration date is set manually

Example: false
ibanstring

International Bank Account Number

Example: "ES9121000418450200051332"
correctiveInvoiceinteger(int32)

Corrective invoice identifier if this is a correction

Example: 1050
customerAddressinteger(int32)

Customer address identifier

Example: 15
percentageIrpfnumber

IRPF (Personal Income Tax) percentage

Example: 15
invoiceEditObservationsstring

Invoice editing observations

Example: "Invoice reviewed and approved"
shippingVatTypestring(ApiArticleVatTypeEnum)
Enum"SUPER_REDUCED""REDUCED""GENERAL""EXEMPT"
Example: "GENERAL"
shippingAmountnumber

Shipping amount

Example: 25.5
shippingVatPercentagenumber

VAT percentage applied to shipping

Example: 21
shippingSurchargePercentagenumber

Surcharge percentage applied to shipping

Example: 5.2
approvedboolean

Indicates if the invoice has been approved

Example: true
quoteinteger(int32)

Quote identifier associated with the invoice

Example: 2001
rateCodeinteger(int32)

Rate code applied to the invoice

Example: 101
administrativeCenterAccountingOfficestring

Administrative center accounting office code

Example: "ACC001"
administrativeCenterManagingBodystring

Administrative center managing body code

Example: "MAN001"
administrativeCenterProcessingUnitstring

Administrative center processing unit code

Example: "PRO001"
administrativeCenterProposingBodystring

Administrative center proposing body code

Example: "PROP001"
correctiveReasonstring(ApiCorrectiveReasonEnum)
Enum"INVOICE_NUMBER""INVOICE_SERIES""EXPEDITION_DATE""ISSUER_NAME""RECEIVER_NAME""ISSUER_TAX_ID""RECIPIENT_TAX_ID""ISSUING_ADDRESS""RECEIVING_ADDRESS""OPERATION_DETAIL"
Example: "INVOICE_NUMBER"
externalCodestring

External identifier of the invoice, typically used to reference the invoice in external systems.

Example: "EXT-INV-2024-00123"
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"
  }'

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
taxesobject(ApiTaxesListReadDto)
invoicePosPaymentTypesobject(ApiInvoicePosPaymentTypeListReadDto)
receiptsobject(ApiInvoiceReceiptReadDto)
deliveryNotesobject(ApiDeliveryNoteReadDto)
customerAddressobject(ApiCustomerAddressViewReadDto)
rateCodeobject(ApiRateCodeListReadDto)
discount3number

Third discount percentage

Example: 2
discount4number

Fourth discount percentage

Example: 1
discount3AmountTotalnumber

Total amount of third discount

Example: 20
discount3AmountTotalCompanyCurrencynumber

Total amount of third discount in company currency

Example: 20
discount4AmountTotalnumber

Total amount of fourth discount

Example: 10
discount4AmountTotalCompanyCurrencynumber

Total amount of fourth discount in company currency

Example: 10
discountPpAmountTotalnumber

Total amount of prompt payment discount

Example: 30
percentageIrpfnumber

IRPF (Personal Income Tax) percentage

Example: 15
shippingAmountnumber

Shipping amount

Example: 25.5
shippingAmountCompanyCurrencynumber

Shipping amount in company currency

Example: 25.5
manualExpirationboolean

Indicates if expiration date is set manually

Example: false
commissionsobject(ApiCommissionInvoiceListReadDto)
ediInvoiceTypestring(ApiEdiInvoiceTypeEnum)
Enum"COMMERCIAL_INVOICE""CREDIT_NOTE""CHARGE_NOTE""SUMMARY_INVOICE""PROFORMA_INVOICE""AUTO_INVOICE"
Example: "COMMERCIAL_INVOICE"
electronicInvoiceSentstring

Status of electronic invoice transmission

Example: "SENT"
deliveryTermsstring

Delivery terms and conditions

Example: "FOB destination"
intrastatNatureTransactionstring

Intrastat nature of transaction code

Example: 11
intrastatShippingTermstring

Intrastat shipping term code

Example: "FOB"
intrastatPortstring

Intrastat port of entry/exit

Example: "ES004"
returnReasonstring

Reason for return if applicable

Example: "Product defect"
correctiveInvoiceobject(ApiInvoiceListReadDto)
manualReceiptsboolean

Indicates if receipts are created manually

Example: false
quoteNumberinteger

Quote number if invoice is generated from a quote

Example: 2001
quoteIdinteger(int32)

Quote identifier if invoice is generated from a quote

Example: 2001
templateSaleInvoiceNumberinteger

Template sale invoice number if applicable

Example: 3001
templateSaleInvoiceIdinteger(int32)

Template sale invoice identifier if applicable

Example: 3001
salesAccountobject(ApiChartAccountListReadDto)
invoiceEditObservationsstring

Invoice editing observations

Example: "Invoice reviewed and approved"
grossWeightnumber

Total gross weight of the shipment

Example: 125.5
netWeightnumber

Total net weight of the shipment

Example: 120
volumenumber

Total volume of the shipment

Example: 2.35
transportTypestring

Type of transport used

Example: "Road transport"
agentDutystring

Agent duty information

Example: "Agent duty paid"
creditLetterstring

Credit letter reference

Example: "CL-2024-001"
administrativeCenterAccountingOfficestring

Administrative center accounting office code

Example: "ACC001"
administrativeCenterManagingBodystring

Administrative center managing body code

Example: "MAN001"
administrativeCenterProcessingUnitstring

Administrative center processing unit code

Example: "PRO001"
administrativeCenterProposingBodystring

Administrative center proposing body code

Example: "PROP001"
correctiveReasonstring(ApiCorrectiveReasonEnum)
Enum"INVOICE_NUMBER""INVOICE_SERIES""EXPEDITION_DATE""ISSUER_NAME""RECEIVER_NAME""ISSUER_TAX_ID""RECIPIENT_TAX_ID""ISSUING_ADDRESS""RECEIVING_ADDRESS""OPERATION_DETAIL"
Example: "INVOICE_NUMBER"
externalCodestring

External identifier of the invoice, typically used to reference the invoice in external systems.

Example: "EXT-INV-2024-00123"
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, "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" }

Request

Delete specific invoice.

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

Responses

OK

Request

Create a new 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(ApiReceiptWriteDto)
deliveryNotesobject(ApiInvoiceDeliveryNoteWriteDto)
taxesobject(ApiTaxesWriteDto)
invoicePosPaymentTypesobject(ApiInvoicePosPaymentTypeWriteDto)
salesAccountinteger(int32)

Sales account identifier for the invoice

Example: 7001
manualReceiptsboolean

Indicates if receipts are created manually

Example: false
grossWeightnumber

Total gross weight of the shipment

Example: 125.5
netWeightnumber

Total net weight of the shipment

Example: 120
volumenumber

Total volume of the shipment

Example: 2.35
creditLetterstring

Credit letter reference

Example: "CL-2024-001"
agentDutystring

Agent duty information

Example: "Agent duty paid"
transportTypestring

Type of transport used

Example: "Road transport"
ediInvoiceTypestring(ApiEdiInvoiceTypeEnum)
Enum"COMMERCIAL_INVOICE""CREDIT_NOTE""CHARGE_NOTE""SUMMARY_INVOICE""PROFORMA_INVOICE""AUTO_INVOICE"
Example: "COMMERCIAL_INVOICE"
electronicInvoiceSentstring

Status of electronic invoice transmission

Example: "SENT"
deliveryTermsstring

Delivery terms and conditions

Example: "FOB destination"
intrastatNatureTransactionstring

Intrastat nature of transaction code

Example: 11
intrastatShippingTermstring

Intrastat shipping term code

Example: "FOB"
intrastatPortstring

Intrastat port of entry/exit

Example: "ES004"
returnReasonstring

Reason for return if applicable

Example: "Product defect"
paidCommissionsboolean

Indicates if commissions have been paid

Example: true
manualExpirationboolean

Indicates if expiration date is set manually

Example: false
ibanstring

International Bank Account Number

Example: "ES9121000418450200051332"
correctiveInvoiceinteger(int32)

Corrective invoice identifier if this is a correction

Example: 1050
customerAddressinteger(int32)

Customer address identifier

Example: 15
percentageIrpfnumber

IRPF (Personal Income Tax) percentage

Example: 15
invoiceEditObservationsstring

Invoice editing observations

Example: "Invoice reviewed and approved"
shippingVatTypestring(ApiArticleVatTypeEnum)
Enum"SUPER_REDUCED""REDUCED""GENERAL""EXEMPT"
Example: "GENERAL"
shippingAmountnumber

Shipping amount

Example: 25.5
shippingVatPercentagenumber

VAT percentage applied to shipping

Example: 21
shippingSurchargePercentagenumber

Surcharge percentage applied to shipping

Example: 5.2
approvedboolean

Indicates if the invoice has been approved

Example: true
quoteinteger(int32)

Quote identifier associated with the invoice

Example: 2001
rateCodeinteger(int32)

Rate code applied to the invoice

Example: 101
administrativeCenterAccountingOfficestring

Administrative center accounting office code

Example: "ACC001"
administrativeCenterManagingBodystring

Administrative center managing body code

Example: "MAN001"
administrativeCenterProcessingUnitstring

Administrative center processing unit code

Example: "PRO001"
administrativeCenterProposingBodystring

Administrative center proposing body code

Example: "PROP001"
correctiveReasonstring(ApiCorrectiveReasonEnum)
Enum"INVOICE_NUMBER""INVOICE_SERIES""EXPEDITION_DATE""ISSUER_NAME""RECEIVER_NAME""ISSUER_TAX_ID""RECIPIENT_TAX_ID""ISSUING_ADDRESS""RECEIVING_ADDRESS""OPERATION_DETAIL"
Example: "INVOICE_NUMBER"
externalCodestring

External identifier of the invoice, typically used to reference the invoice in external systems.

Example: "EXT-INV-2024-00123"
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"
  }'

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
taxesobject(ApiTaxesListReadDto)
invoicePosPaymentTypesobject(ApiInvoicePosPaymentTypeListReadDto)
receiptsobject(ApiInvoiceReceiptReadDto)
deliveryNotesobject(ApiDeliveryNoteReadDto)
customerAddressobject(ApiCustomerAddressViewReadDto)
rateCodeobject(ApiRateCodeListReadDto)
discount3number

Third discount percentage

Example: 2
discount4number

Fourth discount percentage

Example: 1
discount3AmountTotalnumber

Total amount of third discount

Example: 20
discount3AmountTotalCompanyCurrencynumber

Total amount of third discount in company currency

Example: 20
discount4AmountTotalnumber

Total amount of fourth discount

Example: 10
discount4AmountTotalCompanyCurrencynumber

Total amount of fourth discount in company currency

Example: 10
discountPpAmountTotalnumber

Total amount of prompt payment discount

Example: 30
percentageIrpfnumber

IRPF (Personal Income Tax) percentage

Example: 15
shippingAmountnumber

Shipping amount

Example: 25.5
shippingAmountCompanyCurrencynumber

Shipping amount in company currency

Example: 25.5
manualExpirationboolean

Indicates if expiration date is set manually

Example: false
commissionsobject(ApiCommissionInvoiceListReadDto)
ediInvoiceTypestring(ApiEdiInvoiceTypeEnum)
Enum"COMMERCIAL_INVOICE""CREDIT_NOTE""CHARGE_NOTE""SUMMARY_INVOICE""PROFORMA_INVOICE""AUTO_INVOICE"
Example: "COMMERCIAL_INVOICE"
electronicInvoiceSentstring

Status of electronic invoice transmission

Example: "SENT"
deliveryTermsstring

Delivery terms and conditions

Example: "FOB destination"
intrastatNatureTransactionstring

Intrastat nature of transaction code

Example: 11
intrastatShippingTermstring

Intrastat shipping term code

Example: "FOB"
intrastatPortstring

Intrastat port of entry/exit

Example: "ES004"
returnReasonstring

Reason for return if applicable

Example: "Product defect"
correctiveInvoiceobject(ApiInvoiceListReadDto)
manualReceiptsboolean

Indicates if receipts are created manually

Example: false
quoteNumberinteger

Quote number if invoice is generated from a quote

Example: 2001
quoteIdinteger(int32)

Quote identifier if invoice is generated from a quote

Example: 2001
templateSaleInvoiceNumberinteger

Template sale invoice number if applicable

Example: 3001
templateSaleInvoiceIdinteger(int32)

Template sale invoice identifier if applicable

Example: 3001
salesAccountobject(ApiChartAccountListReadDto)
invoiceEditObservationsstring

Invoice editing observations

Example: "Invoice reviewed and approved"
grossWeightnumber

Total gross weight of the shipment

Example: 125.5
netWeightnumber

Total net weight of the shipment

Example: 120
volumenumber

Total volume of the shipment

Example: 2.35
transportTypestring

Type of transport used

Example: "Road transport"
agentDutystring

Agent duty information

Example: "Agent duty paid"
creditLetterstring

Credit letter reference

Example: "CL-2024-001"
administrativeCenterAccountingOfficestring

Administrative center accounting office code

Example: "ACC001"
administrativeCenterManagingBodystring

Administrative center managing body code

Example: "MAN001"
administrativeCenterProcessingUnitstring

Administrative center processing unit code

Example: "PRO001"
administrativeCenterProposingBodystring

Administrative center proposing body code

Example: "PROP001"
correctiveReasonstring(ApiCorrectiveReasonEnum)
Enum"INVOICE_NUMBER""INVOICE_SERIES""EXPEDITION_DATE""ISSUER_NAME""RECEIVER_NAME""ISSUER_TAX_ID""RECIPIENT_TAX_ID""ISSUING_ADDRESS""RECEIVING_ADDRESS""OPERATION_DETAIL"
Example: "INVOICE_NUMBER"
externalCodestring

External identifier of the invoice, typically used to reference the invoice in external systems.

Example: "EXT-INV-2024-00123"
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, "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" }

Request

Send a list of invoices.

Bodyapplication/jsonrequired
tostringrequired

Primary recipient email address

Example: "customer@example.com"
ccstring

Carbon copy recipient email addresses

Example: "manager@example.com"
subjectstring

Email subject line

Example: "Invoice #1001 - Payment Due"
idsArray of integers(int32)

List of additional identifiers

Example: [10,20,30]
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
    ]
  }'

Responses

OK

Request

Get all your 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/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(ApiInvoiceListReadDto)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[].​billingSeriesInvoiceDraftboolean

Indicates if the invoice is a draft of the billing series.

Example: false
data[].​invoiceNumberstring

Formatted invoice number.

Example: "F-2024-000152"
data[].​customerCodestring

Code of the customer associated with the invoice.

Example: "CUST001"
data[].​customerBusinessNamestring

Business name of the customer.

Example: "Clavei S.A."
data[].​customerNamestring

Name of the customer contact.

Example: "John Doe"
data[].​ibanstring

IBAN associated with the invoice.

Example: "ES4721000418401234567891"
data[].​referenceDocumentNumberstring

Reference document number linked to the invoice.

Example: "REF-2024-0177"
data[].​hasReceiptboolean

Indicates if the invoice has an associated receipt.

Example: true
data[].​customerEmailstring

Customer email address.

Example: "customer@example.com"
data[].​customerCountrystring

Country of the customer.

Example: "Spain"
data[].​customerStateDescriptionstring

State or province description of the customer.

Example: "Alicante"
data[].​customerAddressIdinteger(int32)

Identifier of the customer's address.

Example: 7
data[].​representativesstring

Names of representatives associated with the invoice.

Example: "Ana Torres, Juan Pérez"
data[].​salesAccountCodestring

Sales account code associated with the invoice.

Example: 700
data[].​quoteNumberinteger

Related quote number if exists.

Example: 15034
data[].​quoteIdinteger(int32)

Unique identifier for the related quote.

Example: 320
data[].​discount3AmountTotalnumber

Total amount of third discount.

Example: 12
data[].​discount3AmountTotalCompanyCurrencynumber

Total amount of third discount in company currency.

Example: 12.47
data[].​discount4AmountTotalnumber

Total amount of fourth discount.

Example: 10
data[].​discount4AmountTotalCompanyCurrencynumber

Total amount of fourth discount in company currency.

Example: 10.39
data[].​externalCodestring

External identifier of the invoice, typically used to reference the invoice in external systems.

Example: "EXT-INV-2024-00123"
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
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
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