This API requires the Synerise API key in order to work properly.
Open the vtex.synerise-api
app on the admin (myvtex.com/admin/apps) and set the API key provided by synerise.
curl --request POST \
--url https://accountexample.vtexcommercestable.com.br/_v/campaign/ \
--header 'Content-Type: application/json' \
--data '{
"uuid": "f446feec-2fe4-4906-8b53-7e956b4207e0",
"campaignId": "lsRGDVA04",
"itemId": "2",
"jwt": "myjwt"
}'
Param | Description | |
---|---|---|
uuid | user's UUID | mandatory |
campaignId | Synerise campaign id | mandatory |
itemId | Vtex product id. Used in recommendations where a product input is necessary (eg cross selling, similar products) | optional |
jwt | User JWTG | optional |
Param | Description |
---|---|
products | List of recommended products |
jwt | User JWTG |
When it is users first access, JWT is not generated yet. This way, the first client's call will only contain the uuid
.
{
"uuid": "${userUUID}",
"campaignId": "${campaignId}"
}
The response will include a new JWT for the user
{
"products": [...],
"jwt": "${userJWT}"
}
Now, the next synerise calls must have the JWT included
{
"uuid": "${userUUID}",
"campaignId": "${campaignId}",
"jwt": "${userJWT}"
}