Contact Subscriptions
Contact Subscriptions are the links between Subscription Types and Contacts. A Contact is either subscribed or unsubscribed, which decides whether or not they will receive emails sent through that Subscription Type. However, in the case of a Subscription Type with a double opt-in strategy, a third option comes into the mix: pending confirmation. In terms of whether they will receive emails for the Subscription Type, they will not. It is also not possible to fully subscribe a Contact for a double opt-in Subscription Type.
List Contact Subscriptions
This function retrieves a comprehensive list of all subscriptions associated with a specific Contact, identified by their UUID. It provides an easy and efficient way to view the various subscriptions a Contact is enrolled in, ensuring you have up-to-date information on their engagement with your services.
https://api.piggy.eu/api//contact-subscriptions/{{contact_uuid}}Bearer {{ api_key }}application/jsoncontact_uuidstringREQUIRED1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
{
"data": [
{
"is_subscribed": false,
"subscription_type": {
"id": 2,
"uuid" : null,
"name": "Functional",
"description": "Functionele emails",
"active": true,
"strategy": "OPT_OUT"
},
"status": 0
},
{
"is_subscribed": false,
"subscription_type": {
"id": 1,
"uuid" : null,
"name": "Marketing",
"description": "Marketing",
"active": true,
"strategy": "DOUBLE_OPT_IN"
},
"status": 0
}
],
"meta": []
}Code
Message
55031Subscribe Contact
This call enables the subscription of a specific Contact to a chosen Subscription Type. By providing the Contact's UUID and the desired Subscription Type's UUID, you can easily enroll a Contact in a particular subscription.
https://api.piggy.eu/api//contact-subscriptions/{{contact_uuid}}/subscribeBearer {{ api_key }}application/jsoncontact_uuidstringREQUIREDBody
subscription_type_uuidstringREQUIRED1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"data": {
"is_subscribed": false,
"status": "PENDING_CONFIRMATION",
"subscription_type": {
"name": "Marketing",
"description": "Subscribe here for marketing purposes",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": "123123123",
"id": 1
}
},
"meta": []
}Code
Message
10035503155030Unsubscribe Contact to Subscription Type
This function allows for the removal of a specific Contact from a particular Subscription Type. By specifying the Contact's UUID and the Subscription Type's UUID, you can easily manage the Contact's subscription status.
https://api.piggy.eu/api//contact-subscriptions/{{contact_uuid}}/unsubscribeBearer {{ api_key }}application/jsoncontact_uuidstringREQUIREDBody
subscription_type_uuidstringREQUIRED1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
{
"data": {
"is_subscribed": false,
"status": "UNSUBSCRIBED",
"subscription_type": {
"name": "Marketing",
"description": "Subscribe here for marketing purposes",
"active": true,
"strategy": "DOUBLE_OPT_IN",
"uuid": "123123123",
"id": 1
}
},
"meta": []
}Code
Message
10035503155030