> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Dictionary Transaction Actions

Specification of verify/consume/acquire transaction actions




## Verify Action



### Gs2Dictionary:VerifyEntryByUserId

Verify Entry by User ID

Verifies whether the specified user has or has not collected a specific entry.
The verify type specifies the condition: 'have' checks that the user has the entry, 'havent' checks that the user does not have it.
If the verification fails, an error is returned.

**Quantity specification supported: NO**

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| entryModelName | string |  | ✓|  |  ~ 128 chars | Entry Model name<br>Unique Entry Model name. Specified using alphanumeric characters, hyphen (-), underscore (_), and period (.). |
| verifyType | string (enum)<br>enum {<br>&nbsp;&nbsp;"havent",<br>&nbsp;&nbsp;"have"<br>}<br> |  | ✓|  |  | Type of verification"havent": The specified entry must not be held / "have": The specified entry must be held /  |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Dictionary:VerifyEntryByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "entryModelName": "[string]Entry Model name",
        "verifyType": "[string]Type of verification",
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Dictionary:VerifyEntryByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  entryModelName: "[string]Entry Model name"
  verifyType: "[string]Type of verification"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("dictionary").verify.verify_entry_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    entryModelName="[string]Entry Model name",
    verifyType="[string]Type of verification",
    timeOffsetToken="[string]Time offset token",
})
```


---

## Consume Action



### Gs2Dictionary:DeleteEntriesByUserId

Delete entries by User ID

Removes specific Entry from the specified user's dictionary by specifying a list of entry model names.
Multiple entries can be deleted at once in a batch operation.
The returned list contains the entries that were actually deleted.

**Quantity specification supported: NO**

**Reversible action: YES**

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | List of Entry Model names |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Dictionary:DeleteEntriesByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "entryModelNames": [
            "[string]Entry Model name"
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Dictionary:DeleteEntriesByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  entryModelNames: 
    - "[string]Entry Model name"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("dictionary").consume.delete_entries_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    entryModelNames={
        "[string]Entry Model name"
    },
    timeOffsetToken="[string]Time offset token",
})
```


---

## Acquire Action



### Gs2Dictionary:AddEntriesByUserId

Add entries by User ID

Registers one or more entry model names to the specified user's dictionary.
Multiple entry model names can be specified at once in a batch operation.
If an entry has already been registered, it is silently skipped without causing an error.
The returned list contains only the entries that were newly added.

**Quantity specification supported: NO**

**Reversible action: YES**

|  | Type | Condition | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- | --- |
| namespaceName | string |  | ✓|  |  ~ 128 chars | Namespace name<br>Unique Namespace name. Specified using alphanumeric characters, hyphens (-), underscores (_), and periods (.). |
| userId | string |  | ✓|  |  ~ 128 chars | User ID<br>Specify `#{userId}` to substitute the currently logged-in user's ID. |
| entryModelNames | List&lt;string&gt; |  | | [] | 0 ~ 100 items | List of Entry Model names |
| timeOffsetToken | string |  | |  |  ~ 1024 chars | Time offset token |




**JSON**
```json
{
    "action": "Gs2Dictionary:AddEntriesByUserId",
    "request": {
        "namespaceName": "[string]Namespace name",
        "userId": "[string]User ID",
        "entryModelNames": [
            "[string]Entry Model name"
        ],
        "timeOffsetToken": "[string]Time offset token"
    }
}
```

**YAML**
```yaml

action: Gs2Dictionary:AddEntriesByUserId
request:
  namespaceName: "[string]Namespace name"
  userId: "[string]User ID"
  entryModelNames: 
    - "[string]Entry Model name"
  timeOffsetToken: "[string]Time offset token"
```

**GS2-Script**
```lua

transaction.service("dictionary").acquire.add_entries_by_user_id({
    namespaceName="[string]Namespace name",
    userId="[string]User ID",
    entryModelNames={
        "[string]Entry Model name"
    },
    timeOffsetToken="[string]Time offset token",
})
```


---



