A route gives a flow an address under your API, with an HTTP method and a path that can contain parameters. POST /orders/{id}/pay is a route. It reads like the rest of a REST API and works from anything that can make an HTTP request, including your app.
Routes page

Logic → Routes: custom endpoints under /rest/v1, handled by a flow.

Routes are defined in Studio (Logic → Routes): a method, a path, an access rule, and the flow that handles it. From your app you call them through pawabase.routes.

Call a route

Paths are relative to your API’s /rest/v1/. A leading slash is ignored. Use the path exactly as the route was defined, with the real values in place of the {parameters}.

Query strings and bodies

In Python, keyword arguments become the JSON body for post, put and patch, and the query string for get and delete. To send both a body and a query string, pass params={…} for the query:

Any method with call

call(method, path, options) is the general form. The shortcuts are built on it.

Type results (TypeScript)

Options

GET is retried safely by the client after rate limits and temporary server errors. Other methods follow the idempotent flag.

Access and errors

A route has its own access rule, evaluated against the caller before anything runs. Errors are the standard ones:

Designing route paths

  • Use nouns and ids in the path, verbs in the method: POST /orders/42/refund, not POST /doRefund.
  • Keep ids in the path, optional filters in the query, and the details in the body.
  • Return 404 for an id that does not exist or that the caller may not see, so you do not leak which exist.
  • Return 409 for “already done”, and make repeating a call harmless.

Routes versus the database API

You already have from("orders") for plain create/read/update/delete on a table. Use a route when:
  • The action is not a simple row change (pay, refund, publish, invite).
  • You need to change several tables together, or validate across them.
  • You want a stable external API that does not expose your table shape.

Flows

The automation behind a route.

Patterns

Designs that combine them.