Results of 1 - 1 of about 1 for invoices (0.001 sec.)
- OpenAPI Callbacks 9414
- OpenAPI Callbacks Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You could create an API with a path operation that could trigger a request to an external API cre
...uld return, etc. An app with callbacks Let's see all this with an example. Imagine you develop an app that allows creating invoices. These invoices will have an id , title (optional), customer , and total . The user of your API (an external developer) wi...float class InvoiceEvent ( BaseModel ): description : str paid : bool class InvoiceEventReceived ( BaseModel ): ok : bool invoices_callback_router = APIRouter () @invoices_callback_router . post ( "{$callback_url}/invoices/{$request.body.id}" , response..._model = InvoiceEventReceived ) def invoice_notification ( body : InvoiceEvent ): pass @app . post ( "/invoices/" , callbacks = invoices_callback_router . routes ) def create_invoice ( invoice : Invoice , callback_url : Union [ HttpUr... - https://man.mtool.work/fastapi/0.115/advanced/openapi-callbacks/
PREV
1
NEXT