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
Operations

Payment Method

Manage your Payment Methods

Operations
Operations

Recurring Billing Templates

Manage your recurring billing templates

Operations

Request

Get a specific periodic recurring billing template.

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

Responses

OK

Bodyapplication/json
idinteger(int32)required

Unique identifier of the entity

Example: 1
numberintegerrequired

Unique serial number of the document header.

Example: 1001
documentDatestring(date)required

Date of the document in ISO format (yyyy-MM-dd).

Example: "2024-08-07"
quantityTotalnumber

Total quantity for all document lines.

Example: 200.5
observationsstring

Free text field for any observations related to the document.

Example: "Customer requested urgent delivery"
linesArray of objects(ApiTemplateSaleInvoiceLineReadDto)

List of detail lines for the document. For structure see: ApiBaseLineReadDto.java

changenumber

Change applied to the invoice or document

Example: 0.5
discount1number

First discount percentage

Example: 5
discount2number

Second discount percentage

Example: 2
discountAmountTotalnumber

Total discount amount

Example: 100
discountAmountTotalCompanyCurrencynumber

Total discount amount in company currency

Example: 95
discountPpnumber

Prompt payment discount percentage

Example: 3
discountPpAmountTotalnumber

Total prompt payment discount amount

Example: 15
discountPpAmountTotalCompanyCurrencynumber

Total prompt payment discount amount in company currency

Example: 14
grossAmountTotalnumber

Gross total amount

Example: 1200
grossAmountTotalCompanyCurrencynumber

Gross total amount in company currency

Example: 1150
netAmountTotalnumber

Net total amount

Example: 1100
netAmountTotalCompanyCurrencynumber

Net total amount in company currency

Example: 1080
vatAmountTotalnumber

Total VAT amount

Example: 230
vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency

Example: 225
surchargeAmountTotalnumber

Total surcharge amount

Example: 20
surchargeAmountTotalCompanyCurrencynumber

Total surcharge amount in company currency

Example: 18
withholdingnumber

Withholding percentage

Example: 2
withholdingAmountTotalnumber

Total withholding amount

Example: 22
withholdingAmountTotalCompanyCurrencynumber

Total withholding amount in company currency

Example: 21
totalnumber

Total document amount

Example: 1300
totalCompanyCurrencynumber

Total document amount in company currency

Example: 1280
disbursementAmountTotalnumber

Total disbursement amount

Example: 50
disbursementAmountTotalCompanyCurrencynumber

Total disbursement amount in company currency

Example: 48
customerVatTypeobject(ApiCustomerVatTypeListReadDto)
billingSeriesobject(ApiBillingSeriesListReadDto)
shippingTermobject(ApiShippingTermListReadDto)
shippingVatTypestring(ApiArticleVatTypeEnum)
Enum"SUPER_REDUCED""REDUCED""GENERAL""EXEMPT"
Example: "GENERAL"
shippingVatPercentagenumber

VAT percentage for shipping

Example: 21
shippingSurchargePercentagenumber

Surcharge percentage for shipping

Example: 5
shippingAmountnumber

Shipping amount

Example: 25.5
currencyobject(ApiCurrencyListReadDto)
rateCodeobject(ApiRateCodeListReadDto)
customerAddressobject(ApiCustomerAddressViewReadDto)required
customerAddress.​idinteger(int32)required

Unique identifier of the entity

Example: 1
customerAddress.​codeinteger(int32)required

Address code.

Example: 101
customerAddress.​customerCodestring

Customer string code.

Example: "C10001"
customerAddress.​customerNamestring

Name of the customer.

Example: "Acme S.A."
customerAddress.​customerPostalCodestring

Postal code of the customer.

Example: "03001"
customerAddress.​customerAddressstring

Street address of the customer.

Example: "Avenida de la Estación, 5"
customerAddress.​customerCitystring

City of the customer.

Example: "Alicante"
customerAddress.​customerStatestring

Customer state code.

Example: "A"
customerAddress.​customerStateDescriptionstring

Description of the customer state.

Example: "Alicante"
customerAddress.​customerCountrystring

Country code of the customer.

Example: "ES"
customerAddress.​customerCountryDescriptionstring

Country description of the customer.

Example: "Spain"
customerAddress.​customerFirstPhoneNumberstring

First customer phone number.

Example: "+34965123456"
customerAddress.​customerSecondPhoneNumberstring

Second customer phone number.

Example: "+34965111111"
customerAddress.​customerEmailstring

Customer email address.

Example: "cliente@acme.es"
customerAddress.​customerCifstring

Customer CIF or NIF.

Example: "B12345678"
customerAddress.​customerIdinteger(int32)

Customer identifier (numeric).

Example: 10001
customerAddress.​customerCommercialNamestring

Customer commercial name.

Example: "Acme España"
customerAddress.​namestring

Address name or label.

Example: "Warehourse"
customerAddress.​citystring

City for this address.

Example: "Alicante"
customerAddress.​statestring

State (code).

Example: "A"
customerAddress.​stateDescriptionstring

State description.

Example: "Alicante"
customerAddress.​postalCodestring

Postal code for the address.

Example: "03001"
customerAddress.​countrystring

Country code for this address.

Example: "ES"
customerAddress.​countryDescriptionstring

Country description for this address.

Example: "Spain"
customerAddress.​addressstring

Street address.

Example: "Street Example, 14"
customerAddress.​firstPhoneNumberstring

First phone number.

Example: "+34965123456"
customerAddress.​secondPhoneNumberstring

Second phone number.

Example: "+34965111111"
customerAddress.​emailstring

Email for this address.

Example: "direccion@acme.es"
customerAddress.​cifstring

CIF/NIF for this address.

Example: "B12345678"
customerAddress.​activitystring

Activity for this address.

Example: "Wholesale"
customerAddress.​brandstring

Brand associated to this address.

Example: "Acme Main Brand"
customerAddress.​brandIdstring

Brand id for this address.

Example: 5010
customerAddress.​customerIsActiveboolean

True if the customer is active.

Example: true
customerAddress.​isActiveboolean

True if this address is active.

Example: true
statusstring(ApiTemplateSaleInvoiceStatusEnum)
Enum"PENDING""CURRENT"
Example: "ACTIVE"
validityDatestring(date)

Date until which the template is valid

Example: "2024-12-31"
serviceDatestring(date)

Service date

Example: "2024-01-15"
manufacturingDatestring(date)

Manufacturing date

Example: "2024-01-10"
valueDatestring(date)

Value date

Example: "2024-01-20"
seasonobject(ApiSeasonListReadDto)
warehouseobject(ApiWarehouseListReadDto)
representative1object(ApiRepresentativeListReadDto)
commissionType1string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission1number

Commission amount for primary representative

Example: 5
representative2object(ApiRepresentativeListReadDto)
commissionType2string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "FIXED"
commission2number

Commission amount for secondary representative

Example: 100
representative3object(ApiRepresentativeListReadDto)
commissionType3string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission3number

Commission amount for tertiary representative

Example: 2.5
referencestring

Reference number for the template

Example: "TEMP-2024-001"
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"
ibanstring

IBAN for payments

Example: "ES9121000418450200051332"
discount3number

Third discount percentage

Example: 3
discount4number

Fourth discount percentage

Example: 2
billingCompanyobject(ApiCompanyInfoListReadDto)
packagesinteger(int32)

Number of packages

Example: 5
grossWeightnumber

Gross weight in kilograms

Example: 25.5
netWeightnumber

Net weight in kilograms

Example: 23
volumenumber

Volume in cubic meters

Example: 0.5
invoiceEditObservationsstring

Observations for invoice editing

Example: "Special packaging required"
collectedAmountnumber

Collected amount

Example: 1500
collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1500
tagsArray of strings

Tags associated with the template

Example: ["recurring","monthly"]
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
discount3AmountTotalnumber

Total amount of third discount

Example: 45
discount3AmountTotalCompanyCurrencynumber

Total amount of third discount in company currency

Example: 45
discount4AmountTotalnumber

Total amount of fourth discount

Example: 30
discount4AmountTotalCompanyCurrencynumber

Total amount of fourth discount in company currency

Example: 30
activeboolean

Flag indicating if the template is active

Example: true
automaticGenerationboolean

Flag indicating if generation is automatic

Example: true
automaticSendingboolean

Flag indicating if sending is automatic

Example: false
startDatestring(date)

Start date for the template

Example: "2024-01-01"
endDatestring(date)

End date for the template

Example: "2024-12-31"
nextInvoicestring(date)

Next invoice date

Example: "2024-02-01"
periodicInvoicestring(ApiPeriodicInvoiceEnum)
Enum"DAILY""WEEKLY""BIWEEKLY""MONTHLY""BIMONTHLY""QUARTERLY""SEMIANNUAL""ANNUAL"
Example: "MONTHLY"
Response
application/json
{ "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, "customerVatType": { "id": 1, "code": "GENERAL", "description": "General VAT type" }, "billingSeries": { "id": 1, "type": "SALE", "code": "SER2025", "description": "Main invoice series", "deposit": true, "corrective": true }, "shippingTerm": { "id": 1, "code": "string", "customerPays": true, "intrastatCode": "string" }, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5, "shippingAmount": 25.5, "currency": { "id": 1, "code": "strin", "description": "string", "nomenclature": "strin", "isoCode": "USD", "changeValue": 0, "significantDecimalsDocuments": 0, "intermediateDecimalsDocuments": 0, "decimalsCalculatePrices": 0, "decimalsCalculateCosts": 0 }, "rateCode": { "id": 1, "code": "string", "taxesIncluded": true }, "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 }, "status": "PENDING", "validityDate": "2024-12-31", "serviceDate": "2024-01-15", "manufacturingDate": "2024-01-10", "valueDate": "2024-01-20", "season": { "id": 1, "code": "string", "description": "string", "isCurrent": true, "startDate": "2019-08-24", "endDate": "2019-08-24" }, "warehouse": { "id": 1, "code": "ALM01", "description": "Central warehouse" }, "representative1": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType1": "PERCENTAGE", "commission1": 5, "representative2": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType2": "PERCENTAGE", "commission2": 100, "representative3": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType3": "PERCENTAGE", "commission3": 2.5, "reference": "TEMP-2024-001", "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", "iban": "ES9121000418450200051332", "discount3": 3, "discount4": 2, "billingCompany": { "id": 1, "code": "C100", "cif": "B12345678", "name": "Clavei S.L.", "phone1": true, "email": "string", "logo": "string", "logoToken": "string" }, "packages": 5, "grossWeight": 25.5, "netWeight": 23, "volume": 0.5, "invoiceEditObservations": "Special packaging required", "collectedAmount": 1500, "collectedAmountCompanyCurrency": 1500, "tags": [ "recurring", "monthly" ], "discount1AmountTotal": 150, "discount1AmountTotalCompanyCurrency": 150, "discount2AmountTotal": 75, "discount2AmountTotalCompanyCurrency": 75, "discount3AmountTotal": 45, "discount3AmountTotalCompanyCurrency": 45, "discount4AmountTotal": 30, "discount4AmountTotalCompanyCurrency": 30, "active": true, "automaticGeneration": true, "automaticSending": false, "startDate": "2024-01-01", "endDate": "2024-12-31", "nextInvoice": "2024-02-01", "periodicInvoice": "DAILY" }

Request

Update a specific recurring billing template.

Path
idinteger(int32)required
Bodyapplication/jsonrequired
numberinteger

Unique serial number of the document header.

Example: 1050
documentDatestring(date)

Date of the document in ISO format (yyyy-MM-dd).

Example: "2025-08-07"
quantityTotalnumber

Total quantity of all document lines.

Example: 120.5
observationsstring

Free text for header observations.

Example: "Deliver to warehouse B"
linesArray of objects(ApiTemplateSaleInvoiceLineWriteDto)

List of document lines. For structure, see ApiBaseLineWriteDto.java

idinteger(int32)
customerVatTypeinteger(int32)
billingSeriesinteger(int32)
shippingTerminteger(int32)
shippingAmountnumber
shippingVatTypestring(ApiArticleVatTypeEnum)
Enum"SUPER_REDUCED""REDUCED""GENERAL""EXEMPT"
shippingVatPercentagenumber
shippingSurchargePercentagenumber
currencyinteger(int32)
changenumber
rateCodeinteger(int32)
customerAddressinteger(int32)required
statusstring(ApiTemplateSaleInvoiceStatusEnum)
Enum"PENDING""CURRENT"
validityDatestring(date)
serviceDatestring(date)
manufacturingDatestring(date)
valueDatestring(date)
seasoninteger(int32)
warehouseinteger(int32)
representative1integer(int32)
commissionType1string[ 0 .. 20 ] characters
commission1number
representative2integer(int32)
commissionType2string[ 0 .. 20 ] characters
commission2number
representative3integer(int32)
commissionType3string[ 0 .. 20 ] characters
commission3number
referencestring[ 0 .. 50 ] characters
paymentMethodinteger(int32)
firstTerminteger(int32)
daysTerminteger(int32)
termsinteger(int32)
proximityTypestring(ApiProximityTypeEnum)
Enum"NEARBY""PREVIOUS""LATER"
ibanstring[ 0 .. 50 ] characters
discount1number
discount2number
discount3number
discount4number
discountPpnumber
billingCompanyinteger(int32)
withholdingnumber
packagesinteger(int32)
grossWeightnumber
netWeightnumber
volumenumber
invoiceEditObservationsstring
tagsArray of strings
activeboolean
automaticGenerationboolean
automaticSendingboolean
startDatestring(date)
endDatestring(date)
nextInvoicestring(date)
periodicInvoicestring(ApiPeriodicInvoiceEnum)required
Enum"DAILY""WEEKLY""BIWEEKLY""MONTHLY""BIMONTHLY""QUARTERLY""SEMIANNUAL""ANNUAL"
curl -i -X PUT \
  'https://api.prana.software/api/v1/template-sale-invoice/{id}' \
  -H 'Content-Type: application/json' \
  -d '{
    "number": 1050,
    "documentDate": "2025-08-07",
    "quantityTotal": 120.5,
    "observations": "Deliver to warehouse B",
    "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
          }
        ],
        "concept": "string",
        "assortedPackages": true,
        "packaging": 0,
        "discount": 0,
        "rsp": 0,
        "reference": "string",
        "serviceDate": "2019-08-24",
        "noAccumulateWarehouse": true,
        "warehouse": 0,
        "brand": 0,
        "customCommission": true,
        "representative1": 0,
        "commissionType1": "PERCENTAGE",
        "commission1": 0,
        "representative2": 0,
        "commissionType2": "PERCENTAGE",
        "commission2": 0,
        "representative3": 0,
        "commissionType3": "PERCENTAGE",
        "commission3": 0,
        "freeDescription1": "string",
        "freeDescription2": "string",
        "freeDescription3": "string",
        "freeDescription4": "string",
        "freeDescription5": "string",
        "articleVatType": "STANDARD",
        "vatPercentage": 0,
        "surchargePercentage": 0,
        "disbursement": true
      }
    ],
    "id": 0,
    "customerVatType": 0,
    "billingSeries": 0,
    "shippingTerm": 0,
    "shippingAmount": 0,
    "shippingVatType": "STANDARD",
    "shippingVatPercentage": 0,
    "shippingSurchargePercentage": 0,
    "currency": 0,
    "change": 0,
    "rateCode": 0,
    "customerAddress": 0,
    "status": "PENDING",
    "validityDate": "2019-08-24",
    "serviceDate": "2019-08-24",
    "manufacturingDate": "2019-08-24",
    "valueDate": "2019-08-24",
    "season": 0,
    "warehouse": 0,
    "representative1": 0,
    "commissionType1": "string",
    "commission1": 0,
    "representative2": 0,
    "commissionType2": "string",
    "commission2": 0,
    "representative3": 0,
    "commissionType3": "string",
    "commission3": 0,
    "reference": "string",
    "paymentMethod": 0,
    "firstTerm": 0,
    "daysTerm": 0,
    "terms": 0,
    "proximityType": "NEARBY",
    "iban": "string",
    "discount1": 0,
    "discount2": 0,
    "discount3": 0,
    "discount4": 0,
    "discountPp": 0,
    "billingCompany": 0,
    "withholding": 0,
    "packages": 0,
    "grossWeight": 0,
    "netWeight": 0,
    "volume": 0,
    "invoiceEditObservations": "string",
    "tags": [
      "string"
    ],
    "active": true,
    "automaticGeneration": true,
    "automaticSending": true,
    "startDate": "2019-08-24",
    "endDate": "2019-08-24",
    "nextInvoice": "2019-08-24",
    "periodicInvoice": "DAILY"
  }'

Responses

OK

Bodyapplication/json
idinteger(int32)required

Unique identifier of the entity

Example: 1
numberintegerrequired

Unique serial number of the document header.

Example: 1001
documentDatestring(date)required

Date of the document in ISO format (yyyy-MM-dd).

Example: "2024-08-07"
quantityTotalnumber

Total quantity for all document lines.

Example: 200.5
observationsstring

Free text field for any observations related to the document.

Example: "Customer requested urgent delivery"
linesArray of objects(ApiTemplateSaleInvoiceLineReadDto)

List of detail lines for the document. For structure see: ApiBaseLineReadDto.java

changenumber

Change applied to the invoice or document

Example: 0.5
discount1number

First discount percentage

Example: 5
discount2number

Second discount percentage

Example: 2
discountAmountTotalnumber

Total discount amount

Example: 100
discountAmountTotalCompanyCurrencynumber

Total discount amount in company currency

Example: 95
discountPpnumber

Prompt payment discount percentage

Example: 3
discountPpAmountTotalnumber

Total prompt payment discount amount

Example: 15
discountPpAmountTotalCompanyCurrencynumber

Total prompt payment discount amount in company currency

Example: 14
grossAmountTotalnumber

Gross total amount

Example: 1200
grossAmountTotalCompanyCurrencynumber

Gross total amount in company currency

Example: 1150
netAmountTotalnumber

Net total amount

Example: 1100
netAmountTotalCompanyCurrencynumber

Net total amount in company currency

Example: 1080
vatAmountTotalnumber

Total VAT amount

Example: 230
vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency

Example: 225
surchargeAmountTotalnumber

Total surcharge amount

Example: 20
surchargeAmountTotalCompanyCurrencynumber

Total surcharge amount in company currency

Example: 18
withholdingnumber

Withholding percentage

Example: 2
withholdingAmountTotalnumber

Total withholding amount

Example: 22
withholdingAmountTotalCompanyCurrencynumber

Total withholding amount in company currency

Example: 21
totalnumber

Total document amount

Example: 1300
totalCompanyCurrencynumber

Total document amount in company currency

Example: 1280
disbursementAmountTotalnumber

Total disbursement amount

Example: 50
disbursementAmountTotalCompanyCurrencynumber

Total disbursement amount in company currency

Example: 48
customerVatTypeobject(ApiCustomerVatTypeListReadDto)
billingSeriesobject(ApiBillingSeriesListReadDto)
shippingTermobject(ApiShippingTermListReadDto)
shippingVatTypestring(ApiArticleVatTypeEnum)
Enum"SUPER_REDUCED""REDUCED""GENERAL""EXEMPT"
Example: "GENERAL"
shippingVatPercentagenumber

VAT percentage for shipping

Example: 21
shippingSurchargePercentagenumber

Surcharge percentage for shipping

Example: 5
shippingAmountnumber

Shipping amount

Example: 25.5
currencyobject(ApiCurrencyListReadDto)
rateCodeobject(ApiRateCodeListReadDto)
customerAddressobject(ApiCustomerAddressViewReadDto)required
customerAddress.​idinteger(int32)required

Unique identifier of the entity

Example: 1
customerAddress.​codeinteger(int32)required

Address code.

Example: 101
customerAddress.​customerCodestring

Customer string code.

Example: "C10001"
customerAddress.​customerNamestring

Name of the customer.

Example: "Acme S.A."
customerAddress.​customerPostalCodestring

Postal code of the customer.

Example: "03001"
customerAddress.​customerAddressstring

Street address of the customer.

Example: "Avenida de la Estación, 5"
customerAddress.​customerCitystring

City of the customer.

Example: "Alicante"
customerAddress.​customerStatestring

Customer state code.

Example: "A"
customerAddress.​customerStateDescriptionstring

Description of the customer state.

Example: "Alicante"
customerAddress.​customerCountrystring

Country code of the customer.

Example: "ES"
customerAddress.​customerCountryDescriptionstring

Country description of the customer.

Example: "Spain"
customerAddress.​customerFirstPhoneNumberstring

First customer phone number.

Example: "+34965123456"
customerAddress.​customerSecondPhoneNumberstring

Second customer phone number.

Example: "+34965111111"
customerAddress.​customerEmailstring

Customer email address.

Example: "cliente@acme.es"
customerAddress.​customerCifstring

Customer CIF or NIF.

Example: "B12345678"
customerAddress.​customerIdinteger(int32)

Customer identifier (numeric).

Example: 10001
customerAddress.​customerCommercialNamestring

Customer commercial name.

Example: "Acme España"
customerAddress.​namestring

Address name or label.

Example: "Warehourse"
customerAddress.​citystring

City for this address.

Example: "Alicante"
customerAddress.​statestring

State (code).

Example: "A"
customerAddress.​stateDescriptionstring

State description.

Example: "Alicante"
customerAddress.​postalCodestring

Postal code for the address.

Example: "03001"
customerAddress.​countrystring

Country code for this address.

Example: "ES"
customerAddress.​countryDescriptionstring

Country description for this address.

Example: "Spain"
customerAddress.​addressstring

Street address.

Example: "Street Example, 14"
customerAddress.​firstPhoneNumberstring

First phone number.

Example: "+34965123456"
customerAddress.​secondPhoneNumberstring

Second phone number.

Example: "+34965111111"
customerAddress.​emailstring

Email for this address.

Example: "direccion@acme.es"
customerAddress.​cifstring

CIF/NIF for this address.

Example: "B12345678"
customerAddress.​activitystring

Activity for this address.

Example: "Wholesale"
customerAddress.​brandstring

Brand associated to this address.

Example: "Acme Main Brand"
customerAddress.​brandIdstring

Brand id for this address.

Example: 5010
customerAddress.​customerIsActiveboolean

True if the customer is active.

Example: true
customerAddress.​isActiveboolean

True if this address is active.

Example: true
statusstring(ApiTemplateSaleInvoiceStatusEnum)
Enum"PENDING""CURRENT"
Example: "ACTIVE"
validityDatestring(date)

Date until which the template is valid

Example: "2024-12-31"
serviceDatestring(date)

Service date

Example: "2024-01-15"
manufacturingDatestring(date)

Manufacturing date

Example: "2024-01-10"
valueDatestring(date)

Value date

Example: "2024-01-20"
seasonobject(ApiSeasonListReadDto)
warehouseobject(ApiWarehouseListReadDto)
representative1object(ApiRepresentativeListReadDto)
commissionType1string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission1number

Commission amount for primary representative

Example: 5
representative2object(ApiRepresentativeListReadDto)
commissionType2string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "FIXED"
commission2number

Commission amount for secondary representative

Example: 100
representative3object(ApiRepresentativeListReadDto)
commissionType3string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission3number

Commission amount for tertiary representative

Example: 2.5
referencestring

Reference number for the template

Example: "TEMP-2024-001"
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"
ibanstring

IBAN for payments

Example: "ES9121000418450200051332"
discount3number

Third discount percentage

Example: 3
discount4number

Fourth discount percentage

Example: 2
billingCompanyobject(ApiCompanyInfoListReadDto)
packagesinteger(int32)

Number of packages

Example: 5
grossWeightnumber

Gross weight in kilograms

Example: 25.5
netWeightnumber

Net weight in kilograms

Example: 23
volumenumber

Volume in cubic meters

Example: 0.5
invoiceEditObservationsstring

Observations for invoice editing

Example: "Special packaging required"
collectedAmountnumber

Collected amount

Example: 1500
collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1500
tagsArray of strings

Tags associated with the template

Example: ["recurring","monthly"]
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
discount3AmountTotalnumber

Total amount of third discount

Example: 45
discount3AmountTotalCompanyCurrencynumber

Total amount of third discount in company currency

Example: 45
discount4AmountTotalnumber

Total amount of fourth discount

Example: 30
discount4AmountTotalCompanyCurrencynumber

Total amount of fourth discount in company currency

Example: 30
activeboolean

Flag indicating if the template is active

Example: true
automaticGenerationboolean

Flag indicating if generation is automatic

Example: true
automaticSendingboolean

Flag indicating if sending is automatic

Example: false
startDatestring(date)

Start date for the template

Example: "2024-01-01"
endDatestring(date)

End date for the template

Example: "2024-12-31"
nextInvoicestring(date)

Next invoice date

Example: "2024-02-01"
periodicInvoicestring(ApiPeriodicInvoiceEnum)
Enum"DAILY""WEEKLY""BIWEEKLY""MONTHLY""BIMONTHLY""QUARTERLY""SEMIANNUAL""ANNUAL"
Example: "MONTHLY"
Response
application/json
{ "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, "customerVatType": { "id": 1, "code": "GENERAL", "description": "General VAT type" }, "billingSeries": { "id": 1, "type": "SALE", "code": "SER2025", "description": "Main invoice series", "deposit": true, "corrective": true }, "shippingTerm": { "id": 1, "code": "string", "customerPays": true, "intrastatCode": "string" }, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5, "shippingAmount": 25.5, "currency": { "id": 1, "code": "strin", "description": "string", "nomenclature": "strin", "isoCode": "USD", "changeValue": 0, "significantDecimalsDocuments": 0, "intermediateDecimalsDocuments": 0, "decimalsCalculatePrices": 0, "decimalsCalculateCosts": 0 }, "rateCode": { "id": 1, "code": "string", "taxesIncluded": true }, "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 }, "status": "PENDING", "validityDate": "2024-12-31", "serviceDate": "2024-01-15", "manufacturingDate": "2024-01-10", "valueDate": "2024-01-20", "season": { "id": 1, "code": "string", "description": "string", "isCurrent": true, "startDate": "2019-08-24", "endDate": "2019-08-24" }, "warehouse": { "id": 1, "code": "ALM01", "description": "Central warehouse" }, "representative1": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType1": "PERCENTAGE", "commission1": 5, "representative2": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType2": "PERCENTAGE", "commission2": 100, "representative3": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType3": "PERCENTAGE", "commission3": 2.5, "reference": "TEMP-2024-001", "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", "iban": "ES9121000418450200051332", "discount3": 3, "discount4": 2, "billingCompany": { "id": 1, "code": "C100", "cif": "B12345678", "name": "Clavei S.L.", "phone1": true, "email": "string", "logo": "string", "logoToken": "string" }, "packages": 5, "grossWeight": 25.5, "netWeight": 23, "volume": 0.5, "invoiceEditObservations": "Special packaging required", "collectedAmount": 1500, "collectedAmountCompanyCurrency": 1500, "tags": [ "recurring", "monthly" ], "discount1AmountTotal": 150, "discount1AmountTotalCompanyCurrency": 150, "discount2AmountTotal": 75, "discount2AmountTotalCompanyCurrency": 75, "discount3AmountTotal": 45, "discount3AmountTotalCompanyCurrency": 45, "discount4AmountTotal": 30, "discount4AmountTotalCompanyCurrency": 30, "active": true, "automaticGeneration": true, "automaticSending": false, "startDate": "2024-01-01", "endDate": "2024-12-31", "nextInvoice": "2024-02-01", "periodicInvoice": "DAILY" }

Request

Delete specific recurring billing template.

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

Responses

OK

Request

Create a new recurring billing template.

Bodyapplication/jsonrequired
numberinteger

Unique serial number of the document header.

Example: 1050
documentDatestring(date)

Date of the document in ISO format (yyyy-MM-dd).

Example: "2025-08-07"
quantityTotalnumber

Total quantity of all document lines.

Example: 120.5
observationsstring

Free text for header observations.

Example: "Deliver to warehouse B"
linesArray of objects(ApiTemplateSaleInvoiceLineWriteDto)

List of document lines. For structure, see ApiBaseLineWriteDto.java

idinteger(int32)
customerVatTypeinteger(int32)
billingSeriesinteger(int32)
shippingTerminteger(int32)
shippingAmountnumber
shippingVatTypestring(ApiArticleVatTypeEnum)
Enum"SUPER_REDUCED""REDUCED""GENERAL""EXEMPT"
shippingVatPercentagenumber
shippingSurchargePercentagenumber
currencyinteger(int32)
changenumber
rateCodeinteger(int32)
customerAddressinteger(int32)required
statusstring(ApiTemplateSaleInvoiceStatusEnum)
Enum"PENDING""CURRENT"
validityDatestring(date)
serviceDatestring(date)
manufacturingDatestring(date)
valueDatestring(date)
seasoninteger(int32)
warehouseinteger(int32)
representative1integer(int32)
commissionType1string[ 0 .. 20 ] characters
commission1number
representative2integer(int32)
commissionType2string[ 0 .. 20 ] characters
commission2number
representative3integer(int32)
commissionType3string[ 0 .. 20 ] characters
commission3number
referencestring[ 0 .. 50 ] characters
paymentMethodinteger(int32)
firstTerminteger(int32)
daysTerminteger(int32)
termsinteger(int32)
proximityTypestring(ApiProximityTypeEnum)
Enum"NEARBY""PREVIOUS""LATER"
ibanstring[ 0 .. 50 ] characters
discount1number
discount2number
discount3number
discount4number
discountPpnumber
billingCompanyinteger(int32)
withholdingnumber
packagesinteger(int32)
grossWeightnumber
netWeightnumber
volumenumber
invoiceEditObservationsstring
tagsArray of strings
activeboolean
automaticGenerationboolean
automaticSendingboolean
startDatestring(date)
endDatestring(date)
nextInvoicestring(date)
periodicInvoicestring(ApiPeriodicInvoiceEnum)required
Enum"DAILY""WEEKLY""BIWEEKLY""MONTHLY""BIMONTHLY""QUARTERLY""SEMIANNUAL""ANNUAL"
curl -i -X POST \
  https://api.prana.software/api/v1/template-sale-invoice \
  -H 'Content-Type: application/json' \
  -d '{
    "number": 1050,
    "documentDate": "2025-08-07",
    "quantityTotal": 120.5,
    "observations": "Deliver to warehouse B",
    "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
          }
        ],
        "concept": "string",
        "assortedPackages": true,
        "packaging": 0,
        "discount": 0,
        "rsp": 0,
        "reference": "string",
        "serviceDate": "2019-08-24",
        "noAccumulateWarehouse": true,
        "warehouse": 0,
        "brand": 0,
        "customCommission": true,
        "representative1": 0,
        "commissionType1": "PERCENTAGE",
        "commission1": 0,
        "representative2": 0,
        "commissionType2": "PERCENTAGE",
        "commission2": 0,
        "representative3": 0,
        "commissionType3": "PERCENTAGE",
        "commission3": 0,
        "freeDescription1": "string",
        "freeDescription2": "string",
        "freeDescription3": "string",
        "freeDescription4": "string",
        "freeDescription5": "string",
        "articleVatType": "STANDARD",
        "vatPercentage": 0,
        "surchargePercentage": 0,
        "disbursement": true
      }
    ],
    "id": 0,
    "customerVatType": 0,
    "billingSeries": 0,
    "shippingTerm": 0,
    "shippingAmount": 0,
    "shippingVatType": "STANDARD",
    "shippingVatPercentage": 0,
    "shippingSurchargePercentage": 0,
    "currency": 0,
    "change": 0,
    "rateCode": 0,
    "customerAddress": 0,
    "status": "PENDING",
    "validityDate": "2019-08-24",
    "serviceDate": "2019-08-24",
    "manufacturingDate": "2019-08-24",
    "valueDate": "2019-08-24",
    "season": 0,
    "warehouse": 0,
    "representative1": 0,
    "commissionType1": "string",
    "commission1": 0,
    "representative2": 0,
    "commissionType2": "string",
    "commission2": 0,
    "representative3": 0,
    "commissionType3": "string",
    "commission3": 0,
    "reference": "string",
    "paymentMethod": 0,
    "firstTerm": 0,
    "daysTerm": 0,
    "terms": 0,
    "proximityType": "NEARBY",
    "iban": "string",
    "discount1": 0,
    "discount2": 0,
    "discount3": 0,
    "discount4": 0,
    "discountPp": 0,
    "billingCompany": 0,
    "withholding": 0,
    "packages": 0,
    "grossWeight": 0,
    "netWeight": 0,
    "volume": 0,
    "invoiceEditObservations": "string",
    "tags": [
      "string"
    ],
    "active": true,
    "automaticGeneration": true,
    "automaticSending": true,
    "startDate": "2019-08-24",
    "endDate": "2019-08-24",
    "nextInvoice": "2019-08-24",
    "periodicInvoice": "DAILY"
  }'

Responses

OK

Bodyapplication/json
idinteger(int32)required

Unique identifier of the entity

Example: 1
numberintegerrequired

Unique serial number of the document header.

Example: 1001
documentDatestring(date)required

Date of the document in ISO format (yyyy-MM-dd).

Example: "2024-08-07"
quantityTotalnumber

Total quantity for all document lines.

Example: 200.5
observationsstring

Free text field for any observations related to the document.

Example: "Customer requested urgent delivery"
linesArray of objects(ApiTemplateSaleInvoiceLineReadDto)

List of detail lines for the document. For structure see: ApiBaseLineReadDto.java

changenumber

Change applied to the invoice or document

Example: 0.5
discount1number

First discount percentage

Example: 5
discount2number

Second discount percentage

Example: 2
discountAmountTotalnumber

Total discount amount

Example: 100
discountAmountTotalCompanyCurrencynumber

Total discount amount in company currency

Example: 95
discountPpnumber

Prompt payment discount percentage

Example: 3
discountPpAmountTotalnumber

Total prompt payment discount amount

Example: 15
discountPpAmountTotalCompanyCurrencynumber

Total prompt payment discount amount in company currency

Example: 14
grossAmountTotalnumber

Gross total amount

Example: 1200
grossAmountTotalCompanyCurrencynumber

Gross total amount in company currency

Example: 1150
netAmountTotalnumber

Net total amount

Example: 1100
netAmountTotalCompanyCurrencynumber

Net total amount in company currency

Example: 1080
vatAmountTotalnumber

Total VAT amount

Example: 230
vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency

Example: 225
surchargeAmountTotalnumber

Total surcharge amount

Example: 20
surchargeAmountTotalCompanyCurrencynumber

Total surcharge amount in company currency

Example: 18
withholdingnumber

Withholding percentage

Example: 2
withholdingAmountTotalnumber

Total withholding amount

Example: 22
withholdingAmountTotalCompanyCurrencynumber

Total withholding amount in company currency

Example: 21
totalnumber

Total document amount

Example: 1300
totalCompanyCurrencynumber

Total document amount in company currency

Example: 1280
disbursementAmountTotalnumber

Total disbursement amount

Example: 50
disbursementAmountTotalCompanyCurrencynumber

Total disbursement amount in company currency

Example: 48
customerVatTypeobject(ApiCustomerVatTypeListReadDto)
billingSeriesobject(ApiBillingSeriesListReadDto)
shippingTermobject(ApiShippingTermListReadDto)
shippingVatTypestring(ApiArticleVatTypeEnum)
Enum"SUPER_REDUCED""REDUCED""GENERAL""EXEMPT"
Example: "GENERAL"
shippingVatPercentagenumber

VAT percentage for shipping

Example: 21
shippingSurchargePercentagenumber

Surcharge percentage for shipping

Example: 5
shippingAmountnumber

Shipping amount

Example: 25.5
currencyobject(ApiCurrencyListReadDto)
rateCodeobject(ApiRateCodeListReadDto)
customerAddressobject(ApiCustomerAddressViewReadDto)required
customerAddress.​idinteger(int32)required

Unique identifier of the entity

Example: 1
customerAddress.​codeinteger(int32)required

Address code.

Example: 101
customerAddress.​customerCodestring

Customer string code.

Example: "C10001"
customerAddress.​customerNamestring

Name of the customer.

Example: "Acme S.A."
customerAddress.​customerPostalCodestring

Postal code of the customer.

Example: "03001"
customerAddress.​customerAddressstring

Street address of the customer.

Example: "Avenida de la Estación, 5"
customerAddress.​customerCitystring

City of the customer.

Example: "Alicante"
customerAddress.​customerStatestring

Customer state code.

Example: "A"
customerAddress.​customerStateDescriptionstring

Description of the customer state.

Example: "Alicante"
customerAddress.​customerCountrystring

Country code of the customer.

Example: "ES"
customerAddress.​customerCountryDescriptionstring

Country description of the customer.

Example: "Spain"
customerAddress.​customerFirstPhoneNumberstring

First customer phone number.

Example: "+34965123456"
customerAddress.​customerSecondPhoneNumberstring

Second customer phone number.

Example: "+34965111111"
customerAddress.​customerEmailstring

Customer email address.

Example: "cliente@acme.es"
customerAddress.​customerCifstring

Customer CIF or NIF.

Example: "B12345678"
customerAddress.​customerIdinteger(int32)

Customer identifier (numeric).

Example: 10001
customerAddress.​customerCommercialNamestring

Customer commercial name.

Example: "Acme España"
customerAddress.​namestring

Address name or label.

Example: "Warehourse"
customerAddress.​citystring

City for this address.

Example: "Alicante"
customerAddress.​statestring

State (code).

Example: "A"
customerAddress.​stateDescriptionstring

State description.

Example: "Alicante"
customerAddress.​postalCodestring

Postal code for the address.

Example: "03001"
customerAddress.​countrystring

Country code for this address.

Example: "ES"
customerAddress.​countryDescriptionstring

Country description for this address.

Example: "Spain"
customerAddress.​addressstring

Street address.

Example: "Street Example, 14"
customerAddress.​firstPhoneNumberstring

First phone number.

Example: "+34965123456"
customerAddress.​secondPhoneNumberstring

Second phone number.

Example: "+34965111111"
customerAddress.​emailstring

Email for this address.

Example: "direccion@acme.es"
customerAddress.​cifstring

CIF/NIF for this address.

Example: "B12345678"
customerAddress.​activitystring

Activity for this address.

Example: "Wholesale"
customerAddress.​brandstring

Brand associated to this address.

Example: "Acme Main Brand"
customerAddress.​brandIdstring

Brand id for this address.

Example: 5010
customerAddress.​customerIsActiveboolean

True if the customer is active.

Example: true
customerAddress.​isActiveboolean

True if this address is active.

Example: true
statusstring(ApiTemplateSaleInvoiceStatusEnum)
Enum"PENDING""CURRENT"
Example: "ACTIVE"
validityDatestring(date)

Date until which the template is valid

Example: "2024-12-31"
serviceDatestring(date)

Service date

Example: "2024-01-15"
manufacturingDatestring(date)

Manufacturing date

Example: "2024-01-10"
valueDatestring(date)

Value date

Example: "2024-01-20"
seasonobject(ApiSeasonListReadDto)
warehouseobject(ApiWarehouseListReadDto)
representative1object(ApiRepresentativeListReadDto)
commissionType1string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission1number

Commission amount for primary representative

Example: 5
representative2object(ApiRepresentativeListReadDto)
commissionType2string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "FIXED"
commission2number

Commission amount for secondary representative

Example: 100
representative3object(ApiRepresentativeListReadDto)
commissionType3string(ApiCommissionTypeEnum)
Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission3number

Commission amount for tertiary representative

Example: 2.5
referencestring

Reference number for the template

Example: "TEMP-2024-001"
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"
ibanstring

IBAN for payments

Example: "ES9121000418450200051332"
discount3number

Third discount percentage

Example: 3
discount4number

Fourth discount percentage

Example: 2
billingCompanyobject(ApiCompanyInfoListReadDto)
packagesinteger(int32)

Number of packages

Example: 5
grossWeightnumber

Gross weight in kilograms

Example: 25.5
netWeightnumber

Net weight in kilograms

Example: 23
volumenumber

Volume in cubic meters

Example: 0.5
invoiceEditObservationsstring

Observations for invoice editing

Example: "Special packaging required"
collectedAmountnumber

Collected amount

Example: 1500
collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1500
tagsArray of strings

Tags associated with the template

Example: ["recurring","monthly"]
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
discount3AmountTotalnumber

Total amount of third discount

Example: 45
discount3AmountTotalCompanyCurrencynumber

Total amount of third discount in company currency

Example: 45
discount4AmountTotalnumber

Total amount of fourth discount

Example: 30
discount4AmountTotalCompanyCurrencynumber

Total amount of fourth discount in company currency

Example: 30
activeboolean

Flag indicating if the template is active

Example: true
automaticGenerationboolean

Flag indicating if generation is automatic

Example: true
automaticSendingboolean

Flag indicating if sending is automatic

Example: false
startDatestring(date)

Start date for the template

Example: "2024-01-01"
endDatestring(date)

End date for the template

Example: "2024-12-31"
nextInvoicestring(date)

Next invoice date

Example: "2024-02-01"
periodicInvoicestring(ApiPeriodicInvoiceEnum)
Enum"DAILY""WEEKLY""BIWEEKLY""MONTHLY""BIMONTHLY""QUARTERLY""SEMIANNUAL""ANNUAL"
Example: "MONTHLY"
Response
application/json
{ "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, "customerVatType": { "id": 1, "code": "GENERAL", "description": "General VAT type" }, "billingSeries": { "id": 1, "type": "SALE", "code": "SER2025", "description": "Main invoice series", "deposit": true, "corrective": true }, "shippingTerm": { "id": 1, "code": "string", "customerPays": true, "intrastatCode": "string" }, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5, "shippingAmount": 25.5, "currency": { "id": 1, "code": "strin", "description": "string", "nomenclature": "strin", "isoCode": "USD", "changeValue": 0, "significantDecimalsDocuments": 0, "intermediateDecimalsDocuments": 0, "decimalsCalculatePrices": 0, "decimalsCalculateCosts": 0 }, "rateCode": { "id": 1, "code": "string", "taxesIncluded": true }, "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 }, "status": "PENDING", "validityDate": "2024-12-31", "serviceDate": "2024-01-15", "manufacturingDate": "2024-01-10", "valueDate": "2024-01-20", "season": { "id": 1, "code": "string", "description": "string", "isCurrent": true, "startDate": "2019-08-24", "endDate": "2019-08-24" }, "warehouse": { "id": 1, "code": "ALM01", "description": "Central warehouse" }, "representative1": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType1": "PERCENTAGE", "commission1": 5, "representative2": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType2": "PERCENTAGE", "commission2": 100, "representative3": { "id": 1, "code": 0, "name": "string", "cif": "string", "population": "string", "country": "string", "state": "string", "phone1": "string", "phone2": "string", "email": "string", "commission": 0, "commissionType": "PERCENTAGE", "irpfPercentage": 0, "vatPercentage": 0, "subAgentOf": "string", "userB2bMobility": "string", "enableB2bMobility": true }, "commissionType3": "PERCENTAGE", "commission3": 2.5, "reference": "TEMP-2024-001", "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", "iban": "ES9121000418450200051332", "discount3": 3, "discount4": 2, "billingCompany": { "id": 1, "code": "C100", "cif": "B12345678", "name": "Clavei S.L.", "phone1": true, "email": "string", "logo": "string", "logoToken": "string" }, "packages": 5, "grossWeight": 25.5, "netWeight": 23, "volume": 0.5, "invoiceEditObservations": "Special packaging required", "collectedAmount": 1500, "collectedAmountCompanyCurrency": 1500, "tags": [ "recurring", "monthly" ], "discount1AmountTotal": 150, "discount1AmountTotalCompanyCurrency": 150, "discount2AmountTotal": 75, "discount2AmountTotalCompanyCurrency": 75, "discount3AmountTotal": 45, "discount3AmountTotalCompanyCurrency": 45, "discount4AmountTotal": 30, "discount4AmountTotalCompanyCurrency": 30, "active": true, "automaticGeneration": true, "automaticSending": false, "startDate": "2024-01-01", "endDate": "2024-12-31", "nextInvoice": "2024-02-01", "periodicInvoice": "DAILY" }

Request

Get all your recurring billing templates.

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/template-sale-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(ApiTemplateSaleInvoiceListReadDto)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

Example: "FAC"
data[].​documentDatestring(date)

Document date

Example: "2024-01-15"
data[].​customerCodestring

Customer code

Example: "CUST001"
data[].​customerNamestring

Customer name

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

Customer email address

Example: "john.doe@example.com"
data[].​commercialNamestring

Commercial name

Example: "Doe Enterprises"
data[].​grossAmountTotalnumber

Total gross amount

Example: 1000
data[].​grossAmountTotalCompanyCurrencynumber

Total gross amount in company currency

Example: 1000
data[].​discountPpAmountTotalnumber

Total discount amount (PP)

Example: 50
data[].​discountPpAmountTotalCompanyCurrencynumber

Total discount amount (PP) in company currency

Example: 50
data[].​discountAmountTotalnumber

Total discount amount

Example: 100
data[].​discountAmountTotalCompanyCurrencynumber

Total discount amount in company currency

Example: 100
data[].​netAmountTotalnumber

Total net amount

Example: 900
data[].​netAmountTotalCompanyCurrencynumber

Total net amount in company currency

Example: 900
data[].​vatAmountTotalnumber

Total VAT amount

Example: 189
data[].​vatAmountTotalCompanyCurrencynumber

Total VAT amount in company currency

Example: 189
data[].​disbursementAmountTotalnumber

Total disbursement amount

Example: 25.5
data[].​totalnumber

Total amount

Example: 1114.5
data[].​totalCompanyCurrencynumber

Total amount in company currency

Example: 1114.5
data[].​customerCountrystring

Customer country

Example: "Spain"
data[].​customerStateDescriptionstring

Customer state description

Example: "Madrid"
data[].​valueDatestring(date)

Value date

Example: "2024-01-20"
data[].​paymentMethodDescriptionstring

Payment method description

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

Currency nomenclature

Example: "EUR"
data[].​currencySignificantDecimalsDocumentsinteger(int32)

Currency significant decimals for documents

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

Currency intermediate decimals for documents

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

Currency decimals for calculating prices

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

Currency decimals for calculating costs

Example: 4
data[].​documentTypestring

Document type

Example: "INVOICE"
data[].​ibanstring

IBAN for payments

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

Customer address identifier

Example: 1
data[].​representativesstring

Representatives information

Example: "John Smith, Jane Doe"
data[].​quantityTotalnumber

Total quantity

Example: 10
data[].​statusstring(ApiTemplateSaleInvoiceStatusEnum)
Enum"PENDING""CURRENT"
Example: "ACTIVE"
data[].​collectedAmountnumber

Collected amount

Example: 1114.5
data[].​collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1114.5
data[].​salesAccountCodestring

Sales account code

Example: 700
data[].​referencestring

Reference number

Example: "TEMP-2024-001"
data[].​validityDatestring(date)

Validity date

Example: "2024-12-31"
data[].​tagsArray of strings

Tags associated with the template

Example: ["recurring","monthly"]
data[].​activeboolean

Flag indicating if the template is active

Example: true
data[].​automaticGenerationboolean

Flag indicating if generation is automatic

Example: true
data[].​automaticSendingboolean

Flag indicating if sending is automatic

Example: false
data[].​startDatestring(date)

Start date for the template

Example: "2024-01-01"
data[].​endDatestring(date)

End date for the template

Example: "2024-12-31"
data[].​nextInvoicestring(date)

Next invoice date

Example: "2024-02-01"
data[].​periodicInvoicestring(ApiPeriodicInvoiceEnum)
Enum"DAILY""WEEKLY""BIWEEKLY""MONTHLY""BIMONTHLY""QUARTERLY""SEMIANNUAL""ANNUAL"
Example: "MONTHLY"
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

Billing Series

Manage your Billing Series

Operations
Operations
Operations

PurchaseDeliveryNote

Manage your PurchaseDeliveryNotes

Operations