Skip to content

Overview

Work in progress

This documentation is a work in progress and might be subject for change.

Introduction

By default Payway (PW) will send an e-mail to end users when certain events occur, such as when a new account is registered. The e-mails sent this way will by default use an e-mail template which is defined in PW and offers very little in the way of being customizable. It is possible to integrate PW with an E-mail Service Provider (ESP) as an alternative to the default, opening up the possibility to tailor fit transactional e-mails and automate marketing.

When an event occurs in PW that will trigger an e-mail action, the event will be propagated to the Payway E-mail Service (PES) which in turn will communicate with the ESP. The PES currently supports integration with Rule. More ESP:s to be announced.

Abbreviations

Abbreviation Full name Description
PW Payway
ESP E-mail Service Provider A third party providing e-mail services
PES Payway E-mail Service Payway software dealing with e-mail integration

Supported E-mail Service Providers

E-mail Events

There are currently 18 events in PW that triggers an e-mail being sent to the end user. This section describes each event, when it is triggered and what data it contains.

OrderClosed

When a purchase in PW is completed this event occurs.

OrderClosed example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "order": {
        "order_id": "ADEPRIMO-1",
        "parent_order": "",
        "payment_option": "creditcard",
        "purchase_type": "limited",
        "created": "2018-10-30T15:08:44+00:00",
        "traffic_source": "some_traffic_source",
        "subscription_start_date": "0001-01-01T00:00:00",
        "delivery_address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        },
        "details": {
            "description": "(K) Adeprimo Kombo (12 månader)",
            "product_code": "adeprimo_campaign_combo",
            "price": "49.0",
            "vat_code": "12",
            "type": "month",
            "length": "12"
        },
        "campaign_package_or_package_product_code": "adeprimo_package"
    },
    "event_type": "OrderClosed",
    "organisation_id": "adeprimo"
}

PaymentSuccess

When a successful payment is completed, this event occurs.

PaymentSuccess example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "payment": {
        "type": "autopay",
        "amount": "100.00",
        "vat_amount": "25.00"
    },
    "subscription": {
        "product_title_name": "Plus",
        "product_title_code": "adeprimo_PLUS",
        "code": "plus-12-2018",
        "name": "Plus i 12 mån för 100 kr/mån",
        "is_recurring": true,
        "campaign": true,
        "valid_from": "1900-00-00T00:00:00+00:00",
        "valid_to": "2099-12-31T00:00:00+00:00"
    },
    "event_type": "PaymentSuccess",
    "organisation_id": "adeprimo"
}

PaymentFailure

When a payment has failed, this event occurs.

PaymentFailure example data
 1
 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
31
32
33
34
35
36
37
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "payment": {
        "type": "autopay",
        "amount": "100.00",
        "vat_amount": "25.00"
    },
    "event_type": "PaymentFailure",
    "organisation_id": "adeprimo"
}

PaymentUserAgreementInvalidState

When user agreement for payment has gotten an invalid state, this event occurs.

PaymentUserAgreementInvalidState example data
 1
 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
31
32
33
34
35
36
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "payment_profile": {
        "expiration": "19000101",
        "masked_creditcard": "123456******7890"
    },
   "event_type": "PaymentUserAgreementInvalidState",
   "organisation_id": "adeprimo"
}

PaymentUserProductDeactivated

When a user product has been deactivated, this event occurs.

PaymentUserProductDeactivated example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "subscription": {
        "product_title_name": "Plus",
        "product_title_code": "adeprimo_PLUS",
        "code": "plus-12-2018",
        "name": "Plus i 12 mån för 100 kr/mån",
        "is_recurring": true,
        "campaign": true,
        "valid_from": "1900-00-00T00:00:00+00:00",
        "valid_to": "2099-12-31T00:00:00+00:00"
    },
    "event_type": "PaymentUserProductDeactivated",
    "organisation_id": "adeprimo"
}

PaymentUserProductFrozen

When a user product has been frozen, this event occurs.

PaymentUserProductFrozen example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "subscription": {
          "product_title_name": "Plus",
          "product_title_code": "adeprimo_PLUS",
          "code": "plus-12-2018",
          "name": "Plus i 12 mån för 100 kr/mån",
          "is_recurring": true,
          "campaign": true,
          "valid_from": "1900-00-00T00:00:00+00:00",
          "valid_to": "2099-12-31T00:00:00+00:00"
      },
      "event_type": "PaymentUserProductFrozen",
      "organisation_id": "adeprimo"
}

PaymentUserProductRenewed

When a user product has been renewed, this event occurs.

PaymentUserProductRenewed example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "subscription": {
          "product_title_name": "Plus",
          "product_title_code": "adeprimo_PLUS",
          "code": "plus-12-2018",
          "name": "Plus i 12 mån för 100 kr/mån",
          "is_recurring": true,
          "campaign": true,
          "valid_from": "1900-00-00T00:00:00+00:00",
          "valid_to": "2099-12-31T00:00:00+00:00"
      },
      "event_type": "PaymentUserProductRenewed",
      "organisation_id": "adeprimo"
}

UserProductCancelled

When a user product has been cancelled, this event occurs.

UserProductCancelled example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "subscription": {
          "product_title_name": "Plus",
          "product_title_code": "adeprimo_PLUS",
          "code": "plus-12-2018",
          "name": "Plus i 12 mån för 100 kr/mån",
          "is_recurring": true,
          "campaign": true,
          "valid_from": "1900-00-00T00:00:00+00:00",
          "valid_to": "2099-12-31T00:00:00+00:00"
      },
      "event_type": "UserProductCancelled",
      "organisation_id": "adeprimo"
}

NewAccountRegistered

When a new account is registered, this event occurs.

NewAccountRegistered example data
 1
 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
31
32
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "event_type": "NewAccountRegistered",
      "organisation_id": "adeprimo"
}

NewCheckoutAccountRegistered

When a new account is registered via checkout, this event occurs.

NewCheckoutAccountRegistered example data
 1
 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
31
32
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "event_type": "NewCheckoutAccountRegistered",
      "organisation_id": "adeprimo"
}

AccountActivatedForExistingCustomer

When an account is activated for an existing customer, this event occurs.

AccountActivatedForExistingCustomer example data
 1
 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
31
32
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "event_type": "AccountActivatedForExistingCustomer",
      "organisation_id": "adeprimo"
}

AccountRequestedEmailChange

When an account requests an email change, this event occurs.

AccountRequestedEmailChange example data
 1
 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
31
32
33
34
35
36
37
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "contact_email_for_update": "new_email@example.com",
        "contact_email_update_code": "12345678-1111-2222-3333-123456789012",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "event_additional_data": {
               "email_change_url": "https://adeprimo.com/emailChange"
    },
      "event_type": "AccountRequestedEmailChange",
      "organisation_id": "adeprimo"
}

ConfirmationEmailRequested

When an account confirmation email is requested, this event occurs.

ConfirmationEmailRequested example data
 1
 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
31
32
33
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "confirmation_code": "123-456-789",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "event_type": "ConfirmationEmailRequested",
      "organisation_id": "adeprimo"
}

AccountRequestedPasswordReset

When an account requests for a new password, this event occurs.

AccountRequestedPasswordReset example data
 1
 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
31
32
33
34
35
36
37
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "confirmation_code": "123-456-789",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "event_additional_data": {
               "reset_url": "https://adeprimo.com/reset_url",
         "return_url": "https://adeprimo.com/return_url"
    },
      "event_type": "AccountRequestedPasswordReset",
      "organisation_id": "adeprimo"
}

AccountPasswordResetComplete

When a password reset is complete, this event occurs.

AccountPasswordResetComplete example data
 1
 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
31
32
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
      "event_type": "AccountPasswordResetComplete",
      "organisation_id": "adeprimo"
}

GiftCreated

When a gift is created, this event occurs.

GiftCreated example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "gift": {
        "gift_code": "12345-1234-1234-1234-123456789",
        "receiver_first_name": "Johan",
        "receiver_last_name": "Johansson",
        "receiver_contact_email": "johan.johansson@example.com",
        "gift_url": "https://adeprimo.portal.worldoftulo.com/v2/shop/adeprimo_plus?giftcode=12345-1234-1234-1234-123456789"
    },
    "product": {
        "product_code": "ade_plus_11",
        "name": "Adeprimo plus 11 månader",
        "valid_from": "2017-12-07T08:20:47.977+01:00",
        "valid_to": "2019-12-07T08:20:47.977+01:00"
    },
    "event_type": "GiftCreated",
    "organisation_id": "adeprimo"
}

GiftOrderClosed

When a gift order closedis completed, this event occurs.

GiftOrderClosed example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
{
    "account": {
        "id": "52a9b320400e06024b000001",
        "contact_email": "me@example.com",
        "customer_number": "123456",
        "first_name": "Anders",
        "last_name": "Andersson",
        "mobile_number": "07012345678",
        "ssn": "010101-0101",
        "birth_date": "1901-01-01T00:00:00+00:00",
        "gender": "M",
        "status": "active",
        "account_origin": "SOME_ORIGIN",
        "created": "2013-12-12T12:59:12+00:00",
        "address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        }
    },
    "order": {
        "order_id": "ADEPRIMO-1",
        "parent_order": "",
        "payment_option": "creditcard",
        "purchase_type": "limited",
        "created": "2018-10-30T15:08:44+00:00",
        "traffic_source": "some_traffic_source",
        "subscription_start_date": "0001-01-01T00:00:00",
        "delivery_address": {
            "first_name": "Anders",
            "last_name": "Andersson",
            "street": "Andersgatan 1",
            "street_number": "",
            "staircase": "",
            "floor": "",
            "apartment_number": "",
            "zip_code": "12345",
            "city": "Andersborg",
            "mobile_number": "07012345678",
            "phone_number": "",
            "country_code": "se"
        },
        "details": {
            "description": "(K) Adeprimo Kombo (12 månader)",
            "product_code": "adeprimo_campaign_combo",
            "price": "49.0",
            "vat_code": "12",
            "type": "month",
            "length": "12"
        },
        "campaign_package_or_package_product_code": "adeprimo_package"
    },
    "event_type": "GiftOrderClosed",
    "organisation_id": "adeprimo"
}

PackageSharingInitialized

When package sharing is initialized, this event occurs.
If the receiver has an account, receiver is populated with data. If not, only invite will be populated.

PackageSharingInitialized example data
 1
 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
{
    "share": {
        "sharer": {
            "id": "52a9b320400e06024b000001",
            "contact_email": "me@example.com",
            "customer_number": "123456",
            "first_name": "Anders",
            "last_name": "Andersson",
            "mobile_number": "07012345678",
            "ssn": "010101-0101",
            "birth_date": "1901-01-01T00:00:00+00:00",
            "gender": "M",
            "status": "active",
            "account_origin": "SOME_ORIGIN",
            "created": "2013-12-12T12:59:12+00:00",
            "address": {
                "first_name": "Anders",
                "last_name": "Andersson",
                "street": "Andersgatan 1",
                "street_number": "",
                "staircase": "",
                "floor": "",
                "apartment_number": "",
                "zip_code": "12345",
                "city": "Andersborg",
                "mobile_number": "07012345678",
                "phone_number": "",
                "country_code": "se"
            }
        },
        "receiver": {
            "id": "52a9b320400e06024b000001",
            "contact_email": "johan.johansson@example.com",
            "customer_number": "123456",
            "first_name": "Johan",
            "last_name": "Johansson",
            "mobile_number": "07012345678",
            "ssn": "010101-0101",
            "birth_date": "1901-01-01T00:00:00+00:00",
            "gender": "M",
            "status": "active",
            "account_origin": "SOME_ORIGIN",
            "created": "2013-12-12T12:59:12+00:00",
            "address": {
                "first_name": "Johansson",
                "last_name": "Johansson",
                "street": "Andersgatan 1",
                "street_number": "",
                "staircase": "",
                "floor": "",
                "apartment_number": "",
                "zip_code": "12345",
                "city": "Andersborg",
                "mobile_number": "07012345678",
                "phone_number": "",
                "country_code": "se"
            }
        },
        "subscription": {
            "product_title_name": "Plus",
            "product_title_code": "adeprimo_PLUS",
            "code": "plus-12-2018",
            "name": "Plus i 12 mån för 100 kr/mån",
            "is_recurring": true,
            "campaign": true,
            "valid_from": "1900-00-00T00:00:00+00:00",
            "valid_to": "2099-12-31T00:00:00+00:00"
        },
        "invite": {
            "activation_code": "12345-1234-1234-1234-123456789",
            "contact_email": "johan.johansson@example.com"
        }
    },
    "event_type": "PackageSharingInitialized",
    "organisation_id": "adeprimo"
}