You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: i18n/ja/docusaurus-plugin-content-docs/current/endpoints/post-identity-map.md
+293-1Lines changed: 293 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,298 @@ import Link from '@docusaurus/Link';
12
12
このページには、近日中に翻訳される新しいコンテンツが含まれています。
13
13
:::
14
14
15
+
# POST /identity/map
15
16
16
-
TODO: I will add a copy of the English language text here instead this todo once content is finalized.
17
+
Maps multiple email addresses, phone numbers, or their respective hashes to their raw UID2s. You can also use this endpoint to check for updates to opt-out information, check when a raw UID2 can be refreshed, or view the previous UID2 if the current UID2 is less than 90 days old.
17
18
19
+
Used by: This endpoint is used mainly by advertisers and data providers. For details, see [Advertiser/Data Provider Integration Overview](../guides/integration-advertiser-dataprovider-overview.md).
20
+
21
+
For details about the UID2 opt-out workflow and how users can opt out, see [User Opt-Out](../getting-started/gs-opt-out.md).
22
+
23
+
## Version
24
+
25
+
This documentation is for the latest version of this endpoint, version 3.
26
+
27
+
If needed, documentation is also available for the previous version: see [POST /identity/map (v2)](post-identity-map-v2.md).
28
+
29
+
## Batch Size and Request Parallelization Requirements
30
+
31
+
Here's what you need to know:
32
+
33
+
- The maximum request size is 1MB.
34
+
- To map a large number of email addresses, phone numbers, or their respective hashes, send them in *sequential* batches with a maximum batch size of 5,000 items per batch.
35
+
- Unless you are using a <Linkhref="../ref-info/glossary-uid#gl-private-operator">Private Operator</Link>, do not send batches in parallel. In other words, use a single HTTP connection and send batches of hashed or unhashed <Linkhref="../ref-info/glossary-uid#gl-dii">directly identifying information (DII)</Link> values consecutively, without creating multiple parallel connections.
36
+
- Be sure to store mappings of email addresses, phone numbers, or their respective hashes.<br/>Not storing mappings could increase processing time drastically when you have to map millions of email addresses or phone numbers. Recalculating only those mappings that actually need to be updated, however, reduces the total processing time because only about 1/365th of UID2s need to be updated daily. See also [Advertiser/Data Provider Integration Overview](../guides/integration-advertiser-dataprovider-overview.md) and [FAQs for Advertisers and Data Providers](../getting-started/gs-faqs.md#faqs-for-advertisers-and-data-providers).
37
+
38
+
## Request Format
39
+
40
+
`POST '{environment}/v3/identity/map'`
41
+
42
+
For authentication details, see [Authentication and Authorization](../getting-started/gs-auth.md).
43
+
44
+
:::important
45
+
You must encrypt all requests using your secret. For details, and code examples in different programming languages, see [Encrypting Requests and Decrypting Responses](../getting-started/gs-encryption-decryption.md).
46
+
:::
47
+
48
+
### Path Parameters
49
+
50
+
| Path Parameter | Data Type | Attribute | Description |
51
+
| :--- | :--- | :--- | :--- |
52
+
|`{environment}`| string | Required | Testing (integration) environment: `https://operator-integ.uidapi.com`<br/>Production environment: The best choice depends on where your users are based. For information about how to choose the best URL for your use case, and a full list of valid base URLs, see [Environments](../getting-started/gs-environments.md). |
53
+
54
+
:::note
55
+
The integration environment and the production environment require different <Linkhref="../ref-info/glossary-uid#gl-api-key">API keys</Link>. For information about getting credentials for each environment, see [Getting Your Credentials](../getting-started/gs-credentials.md#getting-your-credentials).
56
+
:::
57
+
58
+
### Unencrypted JSON Body Parameters
59
+
60
+
:::important
61
+
Include one or more of the following four parameters as key-value pairs in the JSON body of the request when encrypting it.
62
+
:::
63
+
64
+
| Body Parameter | Data Type | Attribute | Description |
|`email`| string array | Conditionally Required | The list of email addresses to be mapped. |
67
+
|`email_hash`| string array | Conditionally Required | The list of [Base64-encoded SHA-256](../getting-started/gs-normalization-encoding.md#email-address-hash-encoding) hashes of [normalized](../getting-started/gs-normalization-encoding.md#email-address-normalization) email addresses to be mapped. |
68
+
|`phone`| string array | Conditionally Required | The list of [normalized](../getting-started/gs-normalization-encoding.md#phone-number-normalization) phone numbers to be mapped. |
69
+
|`phone_hash`| string array | Conditionally Required | The list of [Base64-encoded SHA-256](../getting-started/gs-normalization-encoding.md#phone-number-hash-encoding) hashes of [normalized](../getting-started/gs-normalization-encoding.md#phone-number-normalization) phone numbers to be mapped. |
70
+
71
+
72
+
### Request Examples
73
+
74
+
The following are unencrypted JSON request body examples to the `POST /identity/map` endpoint:
For details, and code examples in different programming languages, see [Encrypting Requests and Decrypting Responses](../getting-started/gs-encryption-decryption.md).
109
+
110
+
## Decrypted JSON Response Format
111
+
112
+
:::note
113
+
The response is encrypted only if the HTTP status code is 200. Otherwise, the response is not encrypted.
114
+
:::
115
+
116
+
A successful decrypted response returns the current raw UID2s, previous raw UID2s, and refresh timestamps for the specified email addresses, phone numbers, or their respective hashes.
117
+
118
+
The response arrays preserve the order of input arrays. Each element in the response array maps directly to the element at the same index in the corresponding request array. This ensures that you can reliably associate results with their corresponding inputs based on array position.
119
+
120
+
Input values that cannot be mapped to a raw UID2 are mapped to an error object with the reason for unsuccessful mapping. An unsuccessful mapping occurs if the DII is invalid or has been opted out from the UID2 ecosystem. In these cases, the response status is `success` but no raw UID2 is returned.
121
+
122
+
The following example shows the input and corresponding response.
123
+
124
+
Input:
125
+
126
+
```json
127
+
{
128
+
"email": [
129
+
"[email protected]", // Corresponding UID2 rotated in the last 90 days
130
+
"[email protected]", // Corresponding UID2 rotated more than 90 days ago
|`u`| string | The raw UID2 corresponding to the email or phone number provided in the request. |
181
+
|`p`| string | One of the following:<ul><li>If the current raw UID2 has been rotated in the last 90 days: the previous value.</li><li>If the current raw UID2 is older than 90 days: `Null`.</li></ul> |
182
+
|`r`| number | The Unix timestamp (in milliseconds) that indicates when the raw UID2 might be refreshed. The raw UID2 is guaranteed to be valid until this timestamp. |
183
+
184
+
For unsuccessfully mapped input values, the mapped object includes the properties shown in the following table.
|`e`| string | The reason for being unable to map the DII to a raw UID2. One of two possible values:<ul><li>`optout`</li><li>`invalid identifier`</li></ul> |
189
+
190
+
### Response Status Codes
191
+
192
+
The following table lists the `status` property values and their HTTP status code equivalents.
193
+
194
+
| Status | HTTP Status Code | Description |
195
+
| :--- | :--- | :--- |
196
+
|`success`| 200 | The request was successful. The response will be encrypted. |
197
+
|`client_error`| 400 | The request had missing or invalid parameters. |
198
+
|`unauthorized`| 401 | The request did not include a bearer token, included an invalid bearer token, or included a bearer token unauthorized to perform the requested operation. |
199
+
200
+
If the `status` value is anything other than `success`, the `message` field provides additional information about the issue.
201
+
202
+
## Migration from v2 Identity Map
203
+
204
+
The following sections provide general information and guidance for migrating to version 3 from earlier versions, including:
-[Key Differences Between v2 and v3](#key-differences-between-v2-and-v3)
208
+
-[Required Changes](#required-changes)
209
+
-[Additional Resources](#additional-resources)
210
+
211
+
### Version 3 Improvements
212
+
213
+
The v3 Identity Map API provides the following improvements over v2:
214
+
215
+
-**Simplified Refresh Management**: You can monitor for UID2s reaching `refresh_from` timestamps instead of polling <Linkhref="../ref-info/glossary-uid#gl-salt-bucket-id">salt buckets</Link> for rotation.
216
+
-**Previous UID2 Access**: You have access to previous raw UID2s for 90 days after rotation for campaign measurement.
217
+
-**Single Endpoint**: You use only one endpoint, `/v3/identity/map`, instead of both `/v2/identity/map` and `/v2/identity/buckets`.
218
+
-**Multiple Identity Types in One Request**: You can process both emails and phone numbers in a single request.
219
+
-**Improved Performance**: The updated version uses significantly less bandwidth to process the same amount of DII.
220
+
221
+
### Key Differences Between v2 and v3
222
+
223
+
The following table shows key differences between the versions.
#### 3. Replace Salt Bucket Monitoring with Refresh Timestamp Logic
284
+
285
+
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.
286
+
287
+
The following example shows an implementation of the v3 approach for checking refresh timestamps:
288
+
289
+
```python
290
+
import time
291
+
292
+
defis_refresh_needed(mapping):
293
+
now =int(time.time() *1000) # Convert to milliseconds
294
+
return now >= mapping['refresh_from']
295
+
296
+
# Check individual mappings for refresh needs
297
+
to_remap = [mapping for mapping in mappings if is_refresh_needed(mapping)]
298
+
remap_identities(to_remap)
299
+
```
300
+
301
+
### Additional Resources
302
+
-[SDK for Java](../sdks/sdk-ref-java.md) for Java implementations (see Usage for Advertisers/Data Providers section)
303
+
304
+
<!-- For SDK-specific migration guidance, see:
305
+
- [SDK for Python](../sdks/sdk-ref-python.md) for Python implementations -->
306
+
307
+
<!-- GWH 7/7 Commenting out the above until the SDK docs are available. -->
308
+
309
+
For general information about identity mapping, see [Advertiser/Data Provider Integration Overview](../guides/integration-advertiser-dataprovider-overview.md).
0 commit comments