# Storage The API for interacting with local storage. ## StandardApi The base API object provided to this and other `customer-account` extension targets. ### Docs_Standard_StorageApi ### storage value: `Storage` - Storage: export interface Storage { /** * Read and return a stored value by key. * * The stored data is deserialized from JSON and returned as * its original primitive. * * Returns `null` if no stored data exists. */ read(key: string): Promise; /** * Write stored data for this key. * * The data must be serializable to JSON. */ write(key: string, data: any): Promise; /** * Delete stored data by key. */ delete(key: string): Promise; } Key-value storage for the extension target. ### Storage A key-value storage object for extension targets. Stored data is only available to this specific app but can be shared across multiple extension targets. The storage backend is implemented with `localStorage` and should persist for ... days However, data persistence isn't guaranteed. ### delete value: `(key: string) => Promise` Delete stored data by key. ### read value: `(key: string) => Promise` Read and return a stored value by key. The stored data is deserialized from JSON and returned as its original primitive. Returns `null` if no stored data exists. ### write value: `(key: string, data: any) => Promise` Write stored data for this key. The data must be serializable to JSON. ## Related - [Order status page](https://shopify.dev/docs/apps/customer-accounts/order-status-page#pre-authenticated-order-status-page) ## useStorage Returns the key-value `Storage` interface for the extension target. ### UseStorageGeneratedType Returns the key-value `Storage` interface for the extension target. #### Returns: Storage export function useStorage< Target extends RenderExtensionTarget = RenderExtensionTarget, >(): Storage { return useApi().storage; } ### Storage A key-value storage object for extension targets. Stored data is only available to this specific app but can be shared across multiple extension targets. The storage backend is implemented with `localStorage` and should persist for ... days However, data persistence isn't guaranteed. ### delete value: `(key: string) => Promise` Delete stored data by key. ### read value: `(key: string) => Promise` Read and return a stored value by key. The stored data is deserialized from JSON and returned as its original primitive. Returns `null` if no stored data exists. ### write value: `(key: string, data: any) => Promise` Write stored data for this key. The data must be serializable to JSON. ## Related - [Order status page](https://shopify.dev/docs/apps/customer-accounts/order-status-page#pre-authenticated-order-status-page)