{"openapi": "3.1.0", "info": {"title": "ricevuta — prestazione occasionale receipt", "version": "1.0.0", "description": "Public, stateless. POST the receipt's fields, get the PDF. Nothing is stored."}, "paths": {"/api/ricevuta": {"post": {"summary": "Render a receipt", "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "properties": {"issuer": {"type": "object", "properties": {"name": {"type": "string", "maxLength": 200}, "address": {"type": "string", "maxLength": 200}, "zip_city": {"type": "string", "maxLength": 200}, "codice_fiscale": {"type": "string", "maxLength": 32}}, "required": ["name", "codice_fiscale"]}, "client": {"type": "object", "properties": {"name": {"type": "string", "maxLength": 200}, "address": {"type": "string", "maxLength": 200}, "zip_city": {"type": "string", "maxLength": 200}, "country": {"type": "string", "maxLength": 200}, "tax_id": {"type": "string", "maxLength": 64}, "nonresident": {"type": "boolean", "default": true, "description": "True: the client is outside Italy with no permanent establishment there, so no 20% withholding and the receipt says why. False: an Italian withholding agent; the receipt shows the 20% ritenuta and the net amount."}}, "required": ["name"]}, "number": {"type": "string", "maxLength": 32}, "date": {"type": "string", "format": "date", "description": "YYYY-MM-DD"}, "amount": {"type": ["number", "string"], "description": "Gross fee in EUR; a string may use the Italian comma ('4.800,00')."}, "description_it": {"type": "string", "maxLength": 600}, "description_en": {"type": "string", "maxLength": 600}, "contract_date": {"type": "string", "description": "YYYY-MM-DD or empty"}, "iban": {"type": "string", "maxLength": 48}, "bic": {"type": "string", "maxLength": 16}, "bank": {"type": "string", "maxLength": 200}, "place": {"type": "string", "maxLength": 200}, "declare_under_5000": {"type": "boolean", "default": true, "description": "Include the declaration that the year's occasional receipts stay under EUR 5,000."}}, "required": ["issuer", "client", "number", "date", "amount"]}}}}, "responses": {"200": {"description": "The receipt, A4, bilingual Italian and English.", "content": {"application/pdf": {"schema": {"type": "string", "format": "binary"}}}}, "400": {"description": "A field is missing or malformed; `field` names it.", "content": {"application/json": {"schema": {"type": "object", "properties": {"error": {"type": "string"}, "field": {"type": "string"}}, "required": ["error"]}}}}, "413": {"description": "Body over 32 KiB."}}}}, "/api/defaults": {"get": {"summary": "The form's starting values", "responses": {"200": {"description": "A receipt body with the client prefilled.", "content": {"application/json": {"schema": {"type": "object", "properties": {"issuer": {"type": "object", "properties": {"name": {"type": "string", "maxLength": 200}, "address": {"type": "string", "maxLength": 200}, "zip_city": {"type": "string", "maxLength": 200}, "codice_fiscale": {"type": "string", "maxLength": 32}}, "required": ["name", "codice_fiscale"]}, "client": {"type": "object", "properties": {"name": {"type": "string", "maxLength": 200}, "address": {"type": "string", "maxLength": 200}, "zip_city": {"type": "string", "maxLength": 200}, "country": {"type": "string", "maxLength": 200}, "tax_id": {"type": "string", "maxLength": 64}, "nonresident": {"type": "boolean", "default": true, "description": "True: the client is outside Italy with no permanent establishment there, so no 20% withholding and the receipt says why. False: an Italian withholding agent; the receipt shows the 20% ritenuta and the net amount."}}, "required": ["name"]}, "number": {"type": "string", "maxLength": 32}, "date": {"type": "string", "format": "date", "description": "YYYY-MM-DD"}, "amount": {"type": ["number", "string"], "description": "Gross fee in EUR; a string may use the Italian comma ('4.800,00')."}, "description_it": {"type": "string", "maxLength": 600}, "description_en": {"type": "string", "maxLength": 600}, "contract_date": {"type": "string", "description": "YYYY-MM-DD or empty"}, "iban": {"type": "string", "maxLength": 48}, "bic": {"type": "string", "maxLength": 16}, "bank": {"type": "string", "maxLength": 200}, "place": {"type": "string", "maxLength": 200}, "declare_under_5000": {"type": "boolean", "default": true, "description": "Include the declaration that the year's occasional receipts stay under EUR 5,000."}}, "required": ["issuer", "client", "number", "date", "amount"]}}}}}}}, "/healthz": {"get": {"summary": "Liveness", "responses": {"200": {"description": "{\"ok\": true}"}}}}}}