storage/add

Save persistent data to the app

Fields

typestring required

Types can be string, number, boolean, json

keystring required

This is the value you would like to add to your storage. This can also use dot notation ex.user.age

valuestring required

The value to store. Can be a string, number, boolean, or JSON object. Capped at 2000 bytes

The storage/add action stores a key-value pair in the app's local storage. This storage persists across app sessions and can be used to store user preferences, temporary data, or any other information your app needs to remember.

The storage system supports dot notation for organizing data hierarchically (e.g., user.name, settings.theme).

Basic usage - Saving a basic value to Storge

Tapcart.action("storage/add", {
  "type": "boolean",
  "key": "is_vip",
  "value": true
});

Basic usage - Saving custom data to storage

Tapcart.action("storage/add", {
  "type": "json",
  "key": "customer_profile",
  "value": {
    "age": 26,
    "gender": "f",
		"location": "california"
	}
});