---
title: getUnAssignedCodeCount
slug: campaign/docs/getunassignedcodecount
createdAt: 2026-07-02T19:01:47.121Z
---

**Type**: long

**Parameters**

| Name      | Type   | Value                     |
| --------- | ------ | ------------------------- |
| sessionId | String | ID of the current session |
| blockId   | long   | ID of the coupon block    |

**Return values**

The number of available (unassigned) coupon codes in this block

**Code structure**

```javascript
long getUnAssignedCodeCount(String sessionId, long blockId)
```
