---
title: getAssignedMailing
slug: campaign/docs/getassignedmailing
docTags: 
createdAt: 2026-07-02T19:01:45.941Z
---

**Type**: long

**Parameters**

| Name      | Type   | Value                     |
| --------- | ------ | ------------------------- |
| sessionId | String | ID of the current session |
| blockId   | long   | ID of the coupon block    |
| code      | String | Coupon code to be queried |

**Return values**

The ID of the mailing the code has been assigned to.

**Code structure**

```javascript
long getAssignedMailing(String sessionId, long blockId, String code)
```
