# Calculate Guide Summary Calculates the financial summary of a guide from its items, retention, global discount, currency and tax exemption, without saving anything. Unlike update_summary, the input is not validated — invalid values are coerced and a missing wrapper gives an all-zero summary — so it always answers 200 unless an unexpected error occurs. Endpoint: POST /api/v3/{guides-type}/calculate_summary Version: 3.1.0 Security: apiKeyAuth ## Path parameters: - `guides-type` (string, required) The type of the guide document. Enum: "shippings", "transports", "devolutions" ## Query parameters: - `api_key` (string, required) Your API Key. Example: "YOUR_API_KEY" ## Request fields (application/json): - `transport` (object) - `transport.date` (string) Example: "2026-04-16" - `transport.due_date` (string) Example: "2026-05-16" - `transport.retention` (number) Example: 100 - `transport.global_discount` (object) - `transport.global_discount.value_type` (string) Example: "percentage" - `transport.global_discount.value` (number) Example: 50 - `transport.items` (array) Invoice items. Example: [{"name":"p2","description":"","unit_price":10,"unit":"","quantity":1,"tax":{"name":"IVA23","value":23},"discount":0,"retention":0},{"name":"p1","description":"Item description","unit_price":10,"quantity":10,"tax":{"name":"IVA23","value":23},"discount":50}] - `transport.items.name` (string) Maximum 60 characters. Longer values are rejected with 422 ("Code for the item is too long"). - `transport.items.description` (string) Maximum 200 characters and at most 20 lines. Longer values are rejected with 422. - `transport.items.unit_price` (number) - `transport.items.unit` (string) Must be one of a fixed set of supported unit values, not a free-length string. - `transport.items.quantity` (number) - `transport.items.discount` (number) - `transport.items.tax` (object) - `transport.items.tax.name` (string) ## Response 200 fields (application/json): - `summary` (object) - `summary.sum` (number) Example: 19.99 - `summary.discount` (number) - `summary.before_taxes` (number) Example: 19.99 - `summary.taxes` (number) Example: 4.6 - `summary.total` (number) Example: 24.59 - `summary.currency` (object) - `summary.currency.name` (string) Example: "Euro" - `summary.currency.code` (string) Example: "EUR" - `summary.currency.symbol` (string) Example: "€" - `summary.retention` (number) - `summary.pay_progress` (number) - `summary.to_pay` (number) Example: 24.59 - `summary.total_paid` (number) - `summary.taxes_breakdown` (array) Example: [{"category":"IVA23","items_value":10,"tax_value":2.3},{"category":"IVA23","items_value":9.99,"tax_value":2.3}] - `summary.taxes_breakdown.category` (string) - `summary.taxes_breakdown.items_value` (number) - `summary.taxes_breakdown.tax_value` (number) - `summary.total_currency_rate` (number) - `summary.rate` (number) Example: 1 ## Response 401 fields (application/json): - `errors` (array) Example: [{"error":"Authentication Error"}] - `errors.error` (string) ## Response 500 fields (application/json): - `errors` (array) Example: [{"error":"An unexpected error occurred"}] - `errors.error` (string)