Customer Keys Migration¶
Due to customer key format restrictions, the old Web API v1 customerKey
can be unsuitable for use with the Web API v2. For eSales Enterprise to connect session data for the old customerKey
with the new UUID v4 key, both keys can be either used together in the same session or migrated explicitly for a market using Customer Keys Migration. Multiple keys can be migrated simultaneously within a market.
Method¶
POST
URL format¶
/api/v2/migrations/customer-keys?market={market}
Parameters¶
Name | Type | Description | Example |
---|---|---|---|
market | string | The market used for key migration. | Sweden |
oldKey | string | The old Web API v1 customerKey . | 5G7HJ...R77T1 |
newKey | string | The new Web API v2 esales.customerKey . A UUID v4 / GUID. | f6e1f...06692e |
Required headers¶
The header Api-Key
is required.
Request body¶
[
{ "oldKey" : "string", "newKey" : "string" }
]
Request content-type¶
application/json
Response content-type¶
N/A
Responses¶
Response | Description |
---|---|
204 | The migration completed successfully. |
4xx | The request made by the client was invalid. The response body may contain more information about the error. |
5xx | Server error such as cluster unavailable or busy. The response body may contain more information about the error. |
Example¶
Request¶
customer-keys-binding.json¶
[
{ "oldKey" : "user1", "newKey" : "f6e1fc35-9db9-4457-b8a9-9b85a506692e" },
{ "oldKey" : "user2", "newKey" : "2a7a953f-fe66-40b7-ae19-da8d1e06374f" },
...
{ "oldKey" : "userN", "newKey" : "c2488de3-1355-4c76-98a2-3265f2545c3a" }
]
cURL¶
#!/bin/bash
curl -i \
-X POST \
-T customer-keys-binding.json \
-H "Content-Type: application/json" \
-H "Api-Key: {PRIVATE-KEY}" \
"https://{cluster-id}.api.esales.apptus.cloud/api/v2/migrations/customer-keys?market=Sweden"
Response¶
HTTP/1.1 204 No Content