> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Storeganise API reference

> API reference for the Storeganise plugin in Corsair: every `storeganise.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Addons

### get

`addons.get`

Read one add-on record with its operator credentials

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.addons.get({ addonId: '5bf540e8d986a91cd713affe' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `addonId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `customFields` | `Record<string, any> \| null` | No | — |

***

### list

`addons.list`

List the add-ons installed on the account

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.addons.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string,
>   customFields?: Record<string, any> | null
> }[]
> ```

***

## Invoices

### list

`invoices.list`

List invoices, filtered by update time or fetched in batches of ids

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.invoices.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updatedAfter` | `string` | No | Only records updated at or after this UTC time, formatted as YYYY-MM-DDTHH:MM:SS.000Z. |
| `ids` | `string[]` | No | Up to 50 record ids, sent comma-separated in one call. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string
> }[]
> ```

***

## Jobs

### get

`jobs.get`

Read one job by the id a webhook delivery carries

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.jobs.get({ jobId: '5bf540e8d986a91cd713affe' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `jobId` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `result` | `object \| null` | No | — |

> [accordion] result full type
>
> ```ts theme={null}
> {
>   siteId?: string | null
> } | null
> ```

***

## Settings

### get

`settings.get`

Read the business settings, including the webhook secret

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.settings.get({});
```

**Input:** *empty object*

**Output:** *empty object*

***

## Sites

### get

`sites.get`

Read one storage site by id or code

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.sites.get({ siteIdOrCode: 'central' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `siteIdOrCode` | `string` | Yes | Site id or site code, e.g. "central". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `customFields` | `Record<string, any> \| null` | No | — |

***

### list

`sites.list`

List storage sites, optionally filtered by a search term

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.sites.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `search` | `string` | No | Search filter, including custom fields, e.g. "customField:foo". |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string,
>   customFields?: Record<string, any> | null
> }[]
> ```

***

## Unit Rentals

### get

`unitRentals.get`

Read one unit rental, embedding its unit, owner and custom fields

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.unitRentals.get({ unitRentalId: '5bf540e8d986a91cd713affe', include: 'unit,owner,customFields' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `unitRentalId` | `string` | Yes | — |
| `include` | `string` | No | Comma-separated related records to embed, e.g. "unit,owner,customFields". |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `unit` | `object \| null` | No | — |
| `owner` | `object \| null` | No | — |
| `customFields` | `Record<string, any> \| null` | No | — |

> [accordion] unit full type
>
> ```ts theme={null}
> {
>   id: string,
>   siteId?: string | null,
>   typeId?: string | null,
>   name?: string | null,
>   length?: number | null,
>   width?: number | null,
>   height?: number | null,
>   measure?: string | null,
>   floor?: string | null,
>   defaultDeposit?: number | null,
>   defaultPrice?: number | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> } | null
> ```

***

### list

`unitRentals.list`

List unit rentals in batches of ids, embedding related records

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.unitRentals.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `ids` | `string[]` | No | Up to 50 record ids, sent comma-separated in one call. |
| `include` | `string` | No | Comma-separated related records to embed, e.g. "unit,owner,customFields". |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string,
>   unit?: {
>     id: string,
>     siteId?: string | null,
>     typeId?: string | null,
>     name?: string | null,
>     length?: number | null,
>     width?: number | null,
>     height?: number | null,
>     measure?: string | null,
>     floor?: string | null,
>     defaultDeposit?: number | null,
>     defaultPrice?: number | null
>   } | null,
>   owner?: {
>     id: string,
>     email?: string | null
>   } | null,
>   customFields?: Record<string, any> | null
> }[]
> ```

***

### update

`unitRentals.update`

Set custom fields on a unit rental, such as access codes

**Risk:** `write`

```ts theme={null}
await corsair.storeganise.api.unitRentals.update({
	unitRentalId: '5bf540e8d986a91cd713affe',
	customFields: { myAC_accessCode: '482913' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `unitRentalId` | `string` | Yes | — |
| `customFields` | `Record<string, any>` | Yes | — |

The only documented write. Sets custom fields on one rental, which is how access-control integrations store access codes and overlock flags under prefixed keys such as myAC\_accessCode or myAC\_overlocked.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `unit` | `object \| null` | No | — |
| `owner` | `object \| null` | No | — |
| `customFields` | `Record<string, any> \| null` | No | — |

> [accordion] unit full type
>
> ```ts theme={null}
> {
>   id: string,
>   siteId?: string | null,
>   typeId?: string | null,
>   name?: string | null,
>   length?: number | null,
>   width?: number | null,
>   height?: number | null,
>   measure?: string | null,
>   floor?: string | null,
>   defaultDeposit?: number | null,
>   defaultPrice?: number | null
> } | null
> ```

> [accordion] owner full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> } | null
> ```

***

## Units

### list

`units.list`

List storage units with dimensions and default prices

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.units.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string,
>   siteId?: string | null,
>   typeId?: string | null,
>   name?: string | null,
>   length?: number | null,
>   width?: number | null,
>   height?: number | null,
>   measure?: string | null,
>   floor?: string | null,
>   defaultDeposit?: number | null,
>   defaultPrice?: number | null
> }[]
> ```

***

## Users

### get

`users.get`

Read one user by id or email address

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.users.get({ userIdOrEmail: 'john@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `userIdOrEmail` | `string` | Yes | User id or email address. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `email` | `string \| null` | No | — |

***

### list

`users.list`

List users, filtered by update time or fetched in batches of ids

**Risk:** `read`

```ts theme={null}
await corsair.storeganise.api.users.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `updatedAfter` | `string` | No | Only records updated at or after this UTC time, formatted as YYYY-MM-DDTHH:MM:SS.000Z. |
| `ids` | `string[]` | No | Up to 50 record ids, sent comma-separated in one call. |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string,
>   email?: string | null
> }[]
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.