Get Pricing Configuration
GET/company/settings/pricing
Returns the current platform pricing, commission, and tax configuration.
Purpose:
- Provide the updated pricing structure
- Enable consistent calculations across the platform
- Facilitate transparency in costs and fees
Use cases:
- Fee calculation during the quotation process
- Display cost breakdown to the end user
- Synchronization between different platform services
- Centralized update of the pricing structure
Typical flow:
- The client (web/app) calls this endpoint when pricing information is needed
- The server retrieves the latest pricing configuration
- Returns an object containing:
- Base price
- Commission percentage
- Tax percentage
- The client uses these values for calculations and visualizations
Considerations:
- Values are expressed in euros (€)
- Percentages are represented as decimals (e.g., 0.20 = 20%)
- Changes are immediately propagated to all clients
- No authentication required (public data)
Implementation example:
// Example consumption from frontend
async function calculateTotalPrice(baseAmount) {
try {
const response = await fetch('/company/settings/pricing');
const pricing = await response.json();
const commission = baseAmount * pricing.commission;
const tax = baseAmount * pricing.tax;
const total = baseAmount + commission + tax;
return {
base: baseAmount,
commission,
tax,
total
};
} catch (error) {
console.error('Error calculating price:', error);
throw error;
}
}
Responses
- 200
- 500
Pricing configuration obtained
Internal Server Error