---
# System prepended metadata

title: Untitled

---

## Taxiflow

```mermaid

sequenceDiagram


    Activate KM API
        KM API->>+KM Taxifix: command.quote.create
        opt if no current auth
        KM Taxifix->>+Taxifix API: [POST]/v1/auth
        Taxifix API-->>+KM Taxifix: [Result]
        end
        KM Taxifix->>+Taxifix API: [POST]/v1/pricecalculator
                note over Taxifix API : Retrive <br>priceToken and <br>estimated cost
        Taxifix API-->>+KM Taxifix: [Result]
        opt if 401
        KM Taxifix->>+Taxifix API: [POST]/v1/auth
        Taxifix API-->>+KM Taxifix: [Result]

        KM Taxifix->>+Taxifix API: [POST]/v1/pricecalculator
        Taxifix API-->>+KM Taxifix: [Result]
        end
        
        KM Taxifix->>+KM API: entity.quote.key
        KM Taxifix->>+KM API: entity.taxi.quote.key
        KM API->>+KM Taxifix: command.delivery.create
        opt if no current auth
        KM Taxifix->>+Taxifix API: [POST]/v1/auth
        Taxifix API-->>+KM Taxifix: [Result]
        end
        note over Taxifix API : Create booking <br> with provided <br> priceToken
        KM Taxifix->>+Taxifix API: [POST]/v1/bookings
        Taxifix API->>+KM Taxifix: [Result]
        opt if 401
        KM Taxifix->>+Taxifix API: [POST]/v1/auth
        Taxifix API-->>+KM Taxifix: [Result]
        KM Taxifix->>+Taxifix API: [POST]/v1/bookings
        Taxifix API-->>+KM Taxifix: [Result]
        end
        KM Taxifix->>+KM API: entity.delivery.key
        KM Taxifix->>+KM API: entity.taxi.delivery.key
        Taxifix API->>+KM Taxifix: [POST] updateBooking
        KM Taxifix->>+KM API: entity.delivery.key(update)
        KM Taxifix->>+KM API: entity.taxi.delivery.key(update)
        Taxifix API->>+KM Taxifix: [POST] initializePayment
        KM Taxifix->>+KM API: entity.delivery.key(update)
        
```
