Skip to content

Commit cf110c4

Browse files
removed dii object in request
1 parent b5f24e1 commit cf110c4

File tree

3 files changed

+30
-28
lines changed

3 files changed

+30
-28
lines changed

.idea/.gitignore

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import Link from '@docusaurus/Link';
1010
# POST /identity/map (v2)
1111

1212
:::important
13-
This documentation is for earlier versions of the `POST /identity/map` endpoint. If you're using an earlier version, we recommend upgrading. No specific migration steps are needed. For the latest version, v3, see [POST /identity/map](post-identity-map.md).
13+
This documentation is for earlier versions of the `POST /identity/map` endpoint. For the latest version, v3, see [POST /identity/map](post-identity-map.md). For migration steps, see [TODO].
1414
:::
1515

1616
Maps multiple email addresses, phone numbers, or their respective hashes to their raw UID2s and <Link href="../ref-info/glossary-uid#gl-salt-bucket-id">salt bucket IDs</Link>. You can also use this endpoint to check for updates to opt-out information.

docs/endpoints/post-identity-map.md

Lines changed: 21 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ For details about the UID2 opt-out workflow and how users can opt out, see [User
1717

1818
## Version
1919

20-
This documentation is for the latest version of this endpoint. If you're using an earlier version, we recommend that you upgrade your integration. No specific migration steps are needed.
20+
This documentation is for the latest version of this endpoint. If you're using an earlier version, we recommend that you upgrade your integration. For migration steps, see [TODO].
2121

2222
If needed, documentation is also available for the previous version, v2: see [POST /identity/map (v2)](post-identity-map-v2.md).
2323

@@ -53,22 +53,16 @@ The integration environment and the production environment require different <Li
5353
### Unencrypted JSON Body Parameters
5454

5555
:::important
56-
You can include one or more of the following four parameters as key-value pairs in the JSON body of the request when encrypting it.
56+
You must include one or more of the following four parameters as key-value pairs in the JSON body of the request when encrypting it.
5757
:::
5858

59-
| Body Parameter | Data Type | Attribute | Description |
60-
|:---------------|:---------------------|:-----------------------| :--- |
61-
| `email` | array of DII objects | Conditionally Required | The list of email addresses to be mapped. |
62-
| `email_hash` | array of DII objects | 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. |
63-
| `phone` | array of DII objects | Conditionally Required | The list of [normalized](../getting-started/gs-normalization-encoding.md#phone-number-normalization) phone numbers to be mapped. |
64-
| `phone_hash` | array of DII objects | 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. |
65-
66-
67-
Each email address, email hash, phone, or phone hash is input as a DII object.
68-
69-
| Parameter | Data Type | Attribute | Description |
70-
|:----------|:----------|:----------|:----------------------------------------------------|
71-
| `i` | string | Required | The email address, email hash, phone, or phone hash.|
59+
| Body Parameter | Data Type | Attribute | Description |
60+
|:---------------|:----------------------------|:----------| :--- |
61+
| `email` | string array | Optional* | The list of email addresses to be mapped. |
62+
| `email_hash` | string array | Optional* | 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. |
63+
| `phone` | string array | Optional* | The list of [normalized](../getting-started/gs-normalization-encoding.md#phone-number-normalization) phone numbers to be mapped. |
64+
| `phone_hash` | string array | Optional* | 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. |
65+
<b>* At least one of these fields must be provided</b>
7266

7367
### Request Examples
7468

@@ -77,33 +71,33 @@ The following are unencrypted JSON request body examples to the `POST /identity/
7771
```json
7872
{
7973
"email":[
80-
81-
74+
75+
8276
],
8377
"phone":[
84-
{"i": "+12345678901"},
85-
{"i": "+441234567890"}
78+
"+12345678901",
79+
"+441234567890"
8680
]
8781
}
8882
```
8983

9084
```json
9185
{
9286
"email_hash":[
93-
{"i": "tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ="},
94-
{"i": "KzsrnOhCq4tqbGFMsflgS7ig1QLRr0nFJrcrEIlOlbU="}
87+
"tMmiiTI7IaAcPpQPFQ65uMVCWH8av9jw4cwf/F5HVRQ=",
88+
"KzsrnOhCq4tqbGFMsflgS7ig1QLRr0nFJrcrEIlOlbU="
9589
],
9690
"phone_hash":[
97-
{"i": "EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4="},
98-
{"i": "Rx8SW4ZyKqbPypXmswDNuq0SPxStFXBTG/yvPns/2NQ="}
91+
"EObwtHBUqDNZR33LNSMdtt5cafsYFuGmuY4ZLenlue4=",
92+
"Rx8SW4ZyKqbPypXmswDNuq0SPxStFXBTG/yvPns/2NQ="
9993
]
10094
}
10195
```
10296

10397
Here's an encrypted request example to the `POST /identity/map` endpoint for a phone number:
10498

10599
```sh
106-
echo '{"phone": [{"i": "+12345678901"}, {"i": "+441234567890"}]}' | python3 uid2_request.py https://prod.uidapi.com/v3/identity/map [Your-Client-API-Key] [Your-Client-Secret]
100+
echo '{"phone": ["+12345678901", "+441234567890"]}' | python3 uid2_request.py https://prod.uidapi.com/v3/identity/map [Your-Client-API-Key] [Your-Client-Secret]
107101
```
108102

109103
For details, and code examples in different programming languages, see [Encrypting Requests and Decrypting Responses](../getting-started/gs-encryption-decryption.md).
@@ -165,9 +159,9 @@ For successfully mapped DII, the mapped object includes the properties shown in
165159

166160
For unsuccessfully mapped DII, the mapped object includes the properties shown in the following table.
167161

168-
| Property | Data Type | Description |
169-
|:---------|:----------|:------------------------------------------------------------------|
170-
| `e` | string | The reason for being unable to map the DII to an advertising ID. |
162+
| Property | Data Type | Description |
163+
|:---------|:----------|:-----------------------------------------------------------------------------------------------------------------|
164+
| `e` | string | The reason for being unable to map the DII to an advertising ID. Either one of "optout" or "invalid identifier". |
171165

172166
### Response Status Codes
173167

0 commit comments

Comments
 (0)