Skip to content

Prana API (1.0)

API Prana

Welcome !!! In our developer portal you will find everything you need to interact with our platform.

Our API works with the REST interface through the HTTPS protocol and using the JSON format for processing calls.

All requests are validated against an API Key that can be obtained manually from the Configuration section of the PRANA app.

Our goal is to offer the clearest possible documentation here.

Any suggestions can be sent to: info@prana.software

API Key

To use your API key, you need only call the api with your key in the header as follow:

X-Api-Key

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

Entity Last Update

Manage the last-updated timestamps for entities

Operations

Period

Retrieves the available accounting periods in the app

Operations
Operations
Operations

Purchase Invoice

Manage your Purchase Invoices

Operations
Operations
Operations

Request

Create a new order from ecommerce platform.

Query
shopIdinteger(int32)required
Bodyapplication/jsonrequired
cmsOrderIdinteger(int32)

CMS id

paymentstring

Payment method description

Example: "Transferencia"
dateAddstring(date)required

Order date

totalShippingTaxExclnumber

Total shipping cost, tax excluded

totalShippingTaxInclnumber

Total shipping cost, tax included

giftboolean

Order is a gift

giftMessagestring

Gift message

cmsstring

Gift message

referencestring

Order reference from cms

messageOrderstring

Order observations

totalDiscountsTaxExclnumber

Order discounts, tax excluded

totalDiscountsTaxInclnumber

Order discounts, tax included

customerobject(ApiCustomerEcommerceWriteDto)required

Customer associated with the order

customer.​cmsCustomerIdinteger(int32)
customer.​defaultGroupinteger(int32)
customer.​companystring
customer.​firstNamestring
customer.​lastNamestring
customer.​emailstring
customer.​notestring
addressDeliveryobject(ApiCustomerAddressEcommerceWriteDto)required

Invoice address

addressDelivery.​cmsCustomerAddressIdinteger(int32)
addressDelivery.​aliasstring
addressDelivery.​address1string
addressDelivery.​address2string
addressDelivery.​dnistring
addressDelivery.​citystring
addressDelivery.​countryIsostring
addressDelivery.​stateIsostring
addressDelivery.​otherstring
addressDelivery.​phonestring
addressDelivery.​phoneMobilestring
addressDelivery.​postCodestring
addressDelivery.​companyinteger(int32)
addressDelivery.​firstNamestring
addressDelivery.​lastNamestring
addressInvoiceobject(ApiCustomerAddressEcommerceWriteDto)required

Shipping address associated with the order

addressInvoice.​cmsCustomerAddressIdinteger(int32)
addressInvoice.​aliasstring
addressInvoice.​address1string
addressInvoice.​address2string
addressInvoice.​dnistring
addressInvoice.​citystring
addressInvoice.​countryIsostring
addressInvoice.​stateIsostring
addressInvoice.​otherstring
addressInvoice.​phonestring
addressInvoice.​phoneMobilestring
addressInvoice.​postCodestring
addressInvoice.​companyinteger(int32)
addressInvoice.​firstNamestring
addressInvoice.​lastNamestring
orderCartRulesArray of objects(ApiOrderCartRulesWriteDto)

Amount gifted or discounted

orderDetailsArray of objects(ApiOrderLineEcommerceWriteDto)required

Order lines

orderDetails[].​referencestring
orderDetails[].​descriptionstring
orderDetails[].​quantitynumber
orderDetails[].​priceWithoutTaxnumber
orderDetails[].​priceWithTaxnumber
orderDetails[].​reductionnumber
curl -i -X POST \
  'https://api.prana.software/api/v1/ecommerce/order?shopId=0' \
  -H 'Content-Type: application/json' \
  -d '{
    "cmsOrderId": 0,
    "payment": "Transferencia",
    "dateAdd": "2019-08-24",
    "totalShippingTaxExcl": 0,
    "totalShippingTaxIncl": 0,
    "gift": true,
    "giftMessage": "string",
    "cms": "string",
    "reference": "string",
    "messageOrder": "string",
    "totalDiscountsTaxExcl": 0,
    "totalDiscountsTaxIncl": 0,
    "customer": {
      "cmsCustomerId": 0,
      "defaultGroup": 0,
      "company": "string",
      "firstName": "string",
      "lastName": "string",
      "email": "string",
      "note": "string"
    },
    "addressDelivery": {
      "cmsCustomerAddressId": 0,
      "alias": "string",
      "address1": "string",
      "address2": "string",
      "dni": "string",
      "city": "string",
      "countryIso": "string",
      "stateIso": "string",
      "other": "string",
      "phone": "string",
      "phoneMobile": "string",
      "postCode": "string",
      "company": 0,
      "firstName": "string",
      "lastName": "string"
    },
    "addressInvoice": {
      "cmsCustomerAddressId": 0,
      "alias": "string",
      "address1": "string",
      "address2": "string",
      "dni": "string",
      "city": "string",
      "countryIso": "string",
      "stateIso": "string",
      "other": "string",
      "phone": "string",
      "phoneMobile": "string",
      "postCode": "string",
      "company": 0,
      "firstName": "string",
      "lastName": "string"
    },
    "orderCartRules": [
      {
        "name": "string",
        "valueTaxExcl": 0,
        "valueTaxIncl": 0,
        "code": "string"
      }
    ],
    "orderDetails": [
      {
        "reference": "string",
        "description": "string",
        "quantity": 0,
        "priceWithoutTax": 0,
        "priceWithTax": 0,
        "reduction": 0
      }
    ]
  }'

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(ApiOrderLineReadDto)

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
billingSeriesobject(ApiBillingSeriesListReadDto)

Billing series information

serviceDatestring(date)

Service date

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

Manufacturing date

Example: "2024-01-10"
seasonobject(ApiSeasonListReadDto)

Season information

warehouseobject(ApiWarehouseListReadDto)

Warehouse information

customerAddressobject(ApiCustomerAddressListReadDto)

Customer address information

orderTypeobject(ApiOrderTypeListReadDto)

Order type information

rateCodeobject(ApiRateCodeListReadDto)

Exchange rate code information

referencestring

Reference number

Example: "PED-2024-001"
billingObservationsstring

Billing observations

Example: "Special handling required"
paymentMethodobject(ApiPaymentMethodListReadDto)

DTO para listar los métodos de pago disponibles

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)

Type of proximity

Enum"NEARBY""PREVIOUS""LATER"
Example: "LOCAL"
discount3number

Third discount percentage

Example: 3
discount4number

Fourth discount percentage

Example: 2
currencyobject(ApiCurrencyListReadDto)

Currency information

ibanstring

IBAN for payments

Example: "ES9121000418450200051332"
customerVatTypeobject(ApiCustomerVatTypeListReadDto)

Customer VAT type information

billingCompanyobject(ApiCompanyInfoListReadDto)

Billing company information

collectedAmountnumber

Collected amount

Example: 1500
representative1object(ApiRepresentativeListReadDto)

Primary representative information

commissionType1string(ApiCommissionTypeEnum)

Type of commission for primary representative

Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission1number

Commission amount for primary representative

Example: 5
representative2object(ApiRepresentativeListReadDto)

Secondary representative information

commissionType2string(ApiCommissionTypeEnum)

Type of commission for secondary representative

Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "FIXED"
commission2number

Commission amount for secondary representative

Example: 100
representative3object(ApiRepresentativeListReadDto)

Tertiary representative information

commissionType3string(ApiCommissionTypeEnum)

Type of commission for tertiary representative

Enum"PERCENTAGE""AMOUNT_PER_UNIT""FIXED"
Example: "PERCENTAGE"
commission3number

Commission amount for tertiary representative

Example: 2.5
valueDatestring(date)

Value date

Example: "2024-01-20"
agencyobject(ApiAgencyListReadDto)

Agency information

shippingTermobject(ApiShippingTermListReadDto)

Shipping terms information

shippingVatTypestring(ApiArticleVatTypeEnum)

VAT type for shipping

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
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
noAccumulateWarehouseboolean

Flag indicating no warehouse accumulation

Example: false
cancelledQuantityTotalnumber

Total cancelled quantity

Example: 5
servedQuantityTotalnumber

Total served quantity

Example: 20
pendingQuantityTotalnumber

Total pending quantity

Example: 10
collectedAmountCompanyCurrencynumber

Collected amount in company currency

Example: 1500
pendingAmountTotalnumber

Total pending amount

Example: 500
pendingAmountTotalCompanyCurrencynumber

Total pending amount in company currency

Example: 500
noAccumulateRiskboolean

Flag indicating no accumulation risk

Example: false
lockedboolean

Flag indicating if the order is locked

Example: false
netAmountPendingTotalnumber

Total net amount pending

Example: 500
cmsOrderIdinteger(int32)

CMS id for order

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, "billingSeries": { "id": 1, "type": "SALE", "code": "SER2025", "description": "Main invoice series", "deposit": true, "corrective": false, "otherSIF": false }, "serviceDate": "2024-01-15", "manufacturingDate": "2024-01-10", "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", "population": "Madrid", "active": true }, "customerAddress": { "id": 1, "code": 101, "customerCode": "C10001", "customerName": "Acme S.A.", "customerId": 10001, "customerVatTypeId": 1, "customerCommercialName": "Acme España", "customerEmail": "info@acme.es", "name": "Headquarters", "city": "Alicante", "stateId": "A", "state": "Valencia", "stateDescription": "A full state description", "postalCode": "03001", "countryId": "ES", "country": "Spain", "countryDescription": "España (Spain)", "address": "Main Street, 22", "firstPhoneNumber": "+34965123456", "cif": "B12345678", "representative1": "John Smith", "representative2": "Mary Brown", "representative3": "Walter Doe", "representative4": "Ana White", "representative5": "Lucas Black", "representative1Id": 14, "representative2Id": 15, "representative3Id": 16, "representative4Id": 17, "representative5Id": 18, "activity": "Wholesale", "brand": { … }, "customerIsActive": true, "isActive": true, "classificationObservation": { … }, "hasUnpaidReceipts": false, "defaultAddress": false, "shippingTermId": 1 }, "orderType": { "id": 1, "code": "string", "noRiskAccumulation": true }, "rateCode": { "id": 1, "code": "string", "taxesIncluded": true }, "reference": "PED-2024-001", "billingObservations": "Special handling required", "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", "discount3": 3, "discount4": 2, "currency": { "id": 1, "code": "strin", "description": "string", "nomenclature": "strin", "isoCode": "USD", "changeValue": 0, "significantDecimalsDocuments": 0, "intermediateDecimalsDocuments": 0, "decimalsCalculatePrices": 0, "decimalsCalculateCosts": 0 }, "iban": "ES9121000418450200051332", "customerVatType": { "id": 1, "code": "GENERAL", "description": "General VAT type" }, "billingCompany": { "id": 1, "code": "C100", "cif": "B12345678", "name": "Clavei S.L.", "phone1": true, "email": "string", "logo": "string", "logoToken": "string" }, "collectedAmount": 1500, "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, "valueDate": "2024-01-20", "agency": { "id": 1, "code": "AG001", "name": "Fast Transport Agency" }, "shippingTerm": { "id": 1, "code": "string", "customerPays": true, "intrastatCode": "string" }, "shippingVatType": "STANDARD", "shippingVatPercentage": 21, "shippingSurchargePercentage": 5, "shippingAmount": 25.5, "packages": 5, "grossWeight": 25.5, "netWeight": 23, "volume": 0.5, "noAccumulateWarehouse": false, "cancelledQuantityTotal": 5, "servedQuantityTotal": 20, "pendingQuantityTotal": 10, "collectedAmountCompanyCurrency": 1500, "pendingAmountTotal": 500, "pendingAmountTotalCompanyCurrency": 500, "noAccumulateRisk": false, "locked": false, "netAmountPendingTotal": 500, "cmsOrderId": 0 }

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
Operations
Operations