- [HTTP request](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#body.aspect)
- [IAM Permissions](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#body.aspect_1)
- [UserEventRejoinScope](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#UserEventRejoinScope)
- [Try it!](https://docs.cloud.google.com/gemini-enterprise-cx/ai-commerce-search/reference/rest/v2/projects.locations.catalogs.userEvents/rejoin.md.txt#try-it)

Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.

### HTTP request

`POST https://retail.googleapis.com/v2/{parent=projects/*/locations/*/catalogs/*}/userEvents:rejoin`

The URL uses [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The parent catalog resource name, such as `projects/1234/locations/global/catalogs/default_catalog`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "userEventRejoinScope": enum (`UserEventRejoinScope`) } ``` |

| Fields ||
|---|---|
| `userEventRejoinScope` | ``enum (`UserEventRejoinScope`)`` The type of the user event rejoin to define the scope and range of the user events to be rejoined with the latest product catalog. Defaults to `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to an invalid integer value. |

### Response body

If successful, the response body contains an instance of `Operation`.

### Authorization scopes

Requires the following OAuth scope:

- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication.md.txt#authorization-gcp).

### IAM Permissions

Requires the following [IAM](https://cloud.google.com/iam/docs) permission on the `parent` resource:

- `retail.userEvents.rejoin`

For more information, see the [IAM documentation](https://cloud.google.com/iam/docs).

## UserEventRejoinScope

The scope of user events to be rejoined with the latest product catalog. If the rejoining aims at reducing number of unjoined events, set `UserEventRejoinScope` to `UNJOINED_EVENTS`. If the rejoining aims at correcting product catalog information in joined events, set `UserEventRejoinScope` to `JOINED_EVENTS`. If all events needs to be rejoined, set `UserEventRejoinScope` to `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED`.

| Enums ||
|---|---|
| `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` | Rejoin all events with the latest product catalog, including both joined events and unjoined events. |
| `JOINED_EVENTS` | Only rejoin joined events with the latest product catalog. |
| `UNJOINED_EVENTS` | Only rejoin unjoined events with the latest product catalog. |