Skip to content

Commit 656114c

Browse files
committed
edits to POST /identity/map migration section
1 parent 2d9a8cb commit 656114c

File tree

3 files changed

+45
-21
lines changed

3 files changed

+45
-21
lines changed

docs/endpoints/post-identity-buckets.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Used by: This endpoint is used mainly by advertisers and data providers. For det
1616
:::important
1717
If you're using the latest version of `POST /v3/identity/map`, v3, you don't need to use `POST /identity/buckets` at all. You only need to use it if you're using the earlier version, `POST /v2/identity/map`.
1818

19-
If you're using the V2 version, we recommend that you upgrade as soon as possible, to take advantage of improvements. For migration guidance, see [Migration From V2 Identity Map](post-identity-map.md#migration-from-v2-identity-map).
19+
If you're using the V2 version, we recommend that you upgrade as soon as possible, to take advantage of improvements. For migration guidance, see [Migration from V2 Identity Map](post-identity-map.md#migration-from-v2-identity-map).
2020
:::
2121

2222
## Request Format

docs/endpoints/post-identity-map-v2.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ For details about the UID2 opt-out workflow and how users can opt out, see [User
2020
This documentation is for version 2 of this endpoint, which is not the latest version. For the latest version, v3, see [POST /identity/map](post-identity-map.md).
2121

2222
:::note
23-
If you're using the V2 version, we recommend that you upgrade as soon as possible, to take advantage of improvements. For migration guidance, see [Migration From V2 Identity Map](post-identity-map.md#migration-from-v2-identity-map).
23+
If you're using the V2 version, we recommend that you upgrade as soon as possible, to take advantage of improvements. For migration guidance, see [Migration from V2 Identity Map](post-identity-map.md#migration-from-v2-identity-map).
2424
:::
2525

2626
## Batch Size and Request Parallelization Requirements

docs/endpoints/post-identity-map.md

Lines changed: 43 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -195,30 +195,47 @@ The following table lists the `status` property values and their HTTP status cod
195195

196196
If the `status` value is anything other than `success`, the `message` field provides additional information about the issue.
197197

198-
## Migration From V2 Identity Map
198+
## Migration from V2 Identity Map
199+
200+
The following sections provide general information and guidance for migrating to version 3 from earlier versions, including:
201+
202+
- [Migration Overview](#migration-overview)
203+
- [Key Differences Between V2 and V3](#key-differences-between-v2-and-v3)
204+
- [Required Changes](#required-changes)
205+
- [Additional Resources](#additional-resources)
199206

200207
### Migration Overview
201208

202-
The V3 Identity Map API provides several improvements over V2:
209+
The V3 Identity Map API provides the following improvements over V2:
203210

204-
- **Simplified Refresh Management**: Monitor for UID2s reaching `refresh_from` timestamps instead of polling <Link href="../ref-info/glossary-uid#gl-salt-bucket-id">salt buckets</Link> for rotation
205-
- **Previous UID2 Access**: Access to previous raw UID2s for 90 days after rotation for campaign measurement
206-
- **Single Endpoint**: Use only `/v3/identity/map` instead of both `/v2/identity/map` and `/v2/identity/buckets`
207-
- **Multiple Identity Types In One Request**: Process emails and phone numbers in a single request
208-
- **Improved Performance**: The V3 API uses significantly less bandwidth for the same amount of DII
211+
- **Simplified Refresh Management**: You can monitor for UID2s reaching `refresh_from` timestamps instead of polling <Link href="../ref-info/glossary-uid#gl-salt-bucket-id">salt buckets</Link> for rotation.
212+
- **Previous UID2 Access**: You have access to previous raw UID2s for 90 days after rotation for campaign measurement.
213+
- **Single Endpoint**: You use only one endpoint, `/v3/identity/map`, instead of both `/v2/identity/map` and `/v2/identity/buckets`.
214+
- **Multiple Identity Types in One Request**: You can process both emails and phone numbers in a single request.
215+
- **Improved Performance**: The updated version uses significantly less bandwidth to process the same amount of DII.
209216

210217
### Key Differences Between V2 and V3
211218

219+
The following table shows key differences between the versions.
220+
212221
| Feature | V2 Implementation | V3 Implementation |
213222
|:-------------------------------|:--------------------------------------------|:-------------------------------------------|
214-
| **Endpoints Required** | `/v2/identity/map` + `/v2/identity/buckets` | `/v3/identity/map` only |
215-
| **Identity Types per Request** | Single identity type only | Multiple identity types |
216-
| **Refresh Management** | Monitor salt bucket rotations via `/identity/buckets` endpoint | Re-map when past `refresh_from` timestamps |
217-
| **Previous UID2 Access** | Not available | Available for 90 days |
223+
| Endpoints Required | `/v2/identity/map` + `/v2/identity/buckets` | `/v3/identity/map` only |
224+
| Identity Types per Request | Single identity type only | Multiple identity types |
225+
| Refresh Management | Monitor salt bucket rotations via `/identity/buckets` endpoint | Re-map when past `refresh_from` timestamps |
226+
| Previous UID2 Access | Not available | Available for 90 days |
218227

219228
### Required Changes
220229

221-
#### 1. **Update Endpoint URL**
230+
To upgrade from an earlier version to version 3, follow these steps:
231+
232+
1. [Update Endpoint URL](#1-update-endpoint-url)
233+
2. [Update V3 Response Parsing Logic](#2-update-v3-response-parsing-logic)
234+
3. [Replace Salt Bucket Monitoring with Refresh Timestamp Logic](#3-replace-salt-bucket-monitoring-with-refresh-timestamp-logic)
235+
236+
#### 1. Update Endpoint URL
237+
238+
Update any reference to the endpoint URL so that it references the /v3/ implementation, as shown in the following example.
222239

223240
```python
224241
# Before (V2)
@@ -228,9 +245,11 @@ url = '/v2/identity/map'
228245
url = '/v3/identity/map'
229246
```
230247

231-
#### 2. **Update V3 Response Parsing Logic**
248+
#### 2. Update V3 Response Parsing Logic
249+
250+
Update the logic for parsing the response, as shown in the following example.
232251

233-
**V2 Response Parsing**:
252+
V2 Response Parsing:
234253
```python
235254
# V2: Process mapped/unmapped objects with identifier lookup
236255
for item in response['body']['mapped']:
@@ -241,7 +260,7 @@ for item in response['body']['mapped']:
241260
store_mapping(original_identifier, raw_uid, bucket_id)
242261
```
243262

244-
**V3 Response Parsing**:
263+
V3 Response Parsing:
245264
```python
246265
# V3: Process array-indexed responses
247266
for index, item in enumerate(response['body']['email']):
@@ -257,8 +276,11 @@ for index, item in enumerate(response['body']['email']):
257276
handle_unmapped(original_email, item['e'])
258277
```
259278

260-
#### 3. **Replace Salt Bucket Monitoring with Refresh Timestamp Logic**
261-
**V3 Approach (Refresh Timestamps)**:
279+
#### 3. Replace Salt Bucket Monitoring with Refresh Timestamp Logic
280+
281+
Update your code for salt bucket monitoring, replacing it with code that checks the `refresh_from` timestamp to determine raw UID2s that are due for refresh.
282+
283+
The following example shows an implementation of the v3 approach for checking refresh timestamps:
262284

263285
```python
264286
import time
@@ -274,8 +296,10 @@ remap_identities(to_remap)
274296

275297
### Additional Resources
276298

277-
For SDK-specific migration guidance, see:
299+
<!-- For SDK-specific migration guidance, see:
278300
- [SDK for JavaScript V3](../sdks/sdk-ref-javascript-v3.md) for client-side implementations
279-
- [SDK for Java](../sdks/sdk-ref-java.md) for server-side implementations (see Usage for Advertisers/Data Providers section)
301+
- [SDK for Java](../sdks/sdk-ref-java.md) for server-side implementations (see Usage for Advertisers/Data Providers section) -->
302+
303+
<!-- GWH 7/7 Commenting out the above until the SDK docs are available. -->
280304

281305
For general information about identity mapping, see [Advertiser/Data Provider Integration Overview](../guides/integration-advertiser-dataprovider-overview.md).

0 commit comments

Comments
 (0)