Parameters

> Pass data to your routes using path params, query strings, request bodies, and headers.

When a client calls one of your routes, it can send data in several ways. Brickr provides dedicated nodes in the Builder to access each type of parameter.

Path parameters

Path parameters are dynamic segments in your route's URL, defined with a : prefix.

Defining path parameters

When you create a route, include a colon before the parameter name in the path:

/users/:id
/orders/:orderId/items/:itemId
/posts/:slug

Accessing path parameters

In the Builder, use the Get Path Param node to read a path parameter by name.

For example, if your route path is /users/:id and a request comes in for /users/42, the Get Path Param node with the name id will output the string "42".

Path parameters are always strings. If you need a number, connect the output to a To Number node to convert it.

Query parameters

Query parameters are key-value pairs appended to the URL after a ?.

GET /products?category=shoes&limit=10

Accessing query parameters

Use the Get Query Param node to read a specific query parameter by name.

For the URL above:

| Parameter | Value | |-----------|-------| | category | "shoes" | | limit | "10" |

Query parameters are optional by default. Always handle the case where a query parameter might be missing by using a Fallback or If Null node.

Request body

POST and PUT requests typically include a JSON body with data.

{
  "name": "New Product",
  "price": 29.99,
  "category": "shoes"
}

Accessing the request body

Use the Get JSON Body node to read the entire request body as an object. Then use Get Property or Split Object to extract individual fields.

Alternatively, use the Get Body Field node to read a specific field directly by name.

Headers

HTTP headers carry metadata about the request, such as authentication tokens or content types.

Authorization: Bearer eyJhbGciOiJIUzI1NiJ9...
Content-Type: application/json
X-Custom-Header: my-value

Accessing headers

Use the Get Header node to read a specific header by name.

Never expose sensitive header values (like API keys or tokens) in your response. Use headers for internal logic only.

Summary

| Data source | Node | Typical use | |-------------|------|-------------| | Path parameter | Get Path Param | Resource IDs, slugs | | Query parameter | Get Query Param | Filters, pagination, search | | JSON body | Get JSON Body | Creating or updating records | | Header | Get Header | Authentication, metadata |

What's next?

| Topic | Description | |-------|-------------| | Methods | HTTP method reference | | Builder | Learn to build flows visually | | Type System | Understand data types in Brickr |