Get started Pricing

Data Parameters

Sometimes it is useful to pass additional information to the front-end e.g. a link to a specific product, or some data needed for a button action.

This data can be set via API or manually in the Data section of a note's Advanced tab.

Setting data parameters

Simply include a note.data json array when adding or updating a note.

await pn.update("/products/iphone14", {data: {device_id: 2}});

Getting data parameters

Parameters are sent in notes.data as {key:value} pairs, making them easy to access either from an SSR script or on the client-side e.g.:

  const search = notes.data.product_id;

Retrieving / searching via data parameter

pass the find={} parameter when getting e.g.

https://api.pullnote.com/blog?find={"data.author":"Janet"}

Example

This allows pages to be customised dependent on their path, for example showing the appropriate image:

{#if note.data.city == "London"}
  <img src="/i/london-skyline.png" alt="London Skyline" />
{/if}

Developers Blog T&Cs Privacy