Subscribe to campaign
/subscribe_to_campaign
Target audience: Developers
Release version: 4.4.5
Subscribe to campaign¶
Introduction¶
This endpoint subsribes the user to a given retention campaign.
URI¶
Environment | URI |
---|---|
Stage | https://payway-api.stage.adeprimo.se/external/api/v1/me_retention/subscribe_to_campaign |
Production | https://backend.worldoftulo.com/external/api/v1/me_retention/subscribe_to_campaign |
Requirements¶
Identity | Scope |
---|---|
Yes | /external/me/w /external/me/r |
Parameters¶
Field | Required | Type | Description |
---|---|---|---|
user_product_id | Required | String | The ID of the subscription (belonging to the user) that should change to a retention campaign, if an order id is not supplied. Size range: ..1024 |
order_id | Required | String | The order id that belongs to the subscription (of the user) to check, if an user product id is not supplied. Size range: ..1024 |
Curl Example 1¶
curl --request PUT \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me_retention/subscribe_to_campaign \
--header 'accept: application/json' \
--header 'authorization: Bearer token' \
--header 'content-type: application/json' \
--data '{
"user_product_id": "50f3ac249f6aef294d000007",
}'
Curl Example 2¶
curl --request PUT \
--url https://payway-api.stage.adeprimo.se/external/api/v1/me_retention/subscribe_to_campaign \
--header 'accept: application/json' \
--header 'authorization: Bearer token' \
--header 'content-type: application/json' \
--data '{
"order_id": "ADEPRIMO-1",
}'
Response¶
Field | Description |
---|---|
item | Hash containing information about the retention campaign |
Success response¶
HTTP 200
{
"item": {
"id": "Retention campaign id",
"code": "Retention campaign product code",
"name": "Retention campaign name",
"description": "Retention campaign description",
"products": ["first_product", "second_product"]
}
}
Errors¶
This API uses the common error conventions of the Payway API