---
title: markAsUsed
slug: campaign/docs/markasused
docTags: 
createdAt: 2026-07-02T19:01:44.226Z
---

Use this method after the recipient has converted the coupon code after a purchase.

**Type**: void

**Parameters**

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

**Return values**

- **Code structure**

```javascript
void markAsUsed(String sessionId, long blockId, String code)
```
