---
title: getAllIds
slug: campaign/docs/getallids-attachment
docTags: 
createdAt: 2026-07-02T19:01:46.338Z
---

**Type**: long\[ ]

**Parameters**

| Name         | Type   | Value                                                                                                                                                                                                                                 |
| ------------ | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sessionId    | String | ID of the current session                                                                                                                                                                                                             |
| couponSource | String | Type of the coupon block:<br />- **static** – Contains static coupon codes. These must be added manually (*add* or *addAll*.<br />- **generated** – Coupon codes are automatically generated when sending the mailing and are unique. |

**Return values**

The IDs of all existing coupon blocks

**Code structure**

```javascript
long[] getAllIds(String sessionId, String couponSource)
```
