Connect
  1. Events
Connect
  • Connect/ConnectID API Reference
  • Overview
    • API lifecycle
    • OAuth 2.0
    • About the URLs
    • Google analytics
    • Unite payment SDK
    • Events
      • Authentication
      • Connect realtime events
      • ConnectID events
  • Customer Data
    • Address
      • Change addresses
      • List addresses
      • List addresses - client mode
      • List addresses for product - client mode
      • List addresses for product
    • Category
      • List category types
      • List category codes
      • List category codes for category type
    • Customer
      • List customer info
      • Change customer Info
      • Search customer - client mode
      • Check customer number - client mode
      • List customer info - client mode
    • External Reference
      • Remove external reference - client mode
      • Change external reference - client mode
      • List external references - client mode
      • Register external reference - client mode
  • Order Management
    • Article
      • Check article price
    • Coupon
      • Check coupon price - client mode
      • List coupon - client mode
      • List coupon for coupon number - client mode
    • Fulfillment
      • Complete order - client mode
    • Order
      • Order Guide
        • Introduction
        • How to register an order
        • Complete order by fulfillment URL
        • Complete order by fulfillment API
        • Q&A for order
      • List orders
      • Search order details
      • List order product history
      • List order status - client mode
      • Register customer - client mode
      • Register customer
      • Register order - client mode
      • Register order
    • Reward
      • Check reward - client mode
    • User
      • Assign user - client mode
    • Voucher Coupons
      • List voucher code coupons - client mode
  • Payment Services
    • Invoice
      • List invoice details
      • List invoices - client mode
      • List invoices for product - client mode
      • List invoices and reminders
      • List invoices and reminders for product
      • List basic invoice info
      • List basic invoice info for product
    • InvoiceAddress
      • List invoice address
    • Klarna
      • List klarna recurring tokens
      • Add Klarna token
      • Remove Klarna token
    • Nexi
      • List Nexi subscriptions
      • Add Nexi subscription
      • Remove Nexi subscription
    • PayEx
      • List PayEx tokens
      • Add PayEx token
      • Remove PayEx token
    • Payment
      • List payment methods
      • Pay invoice
      • Change payment method
    • Vipps
      • List vipps agreements
      • Add vipps agreement
      • Remove vipps agreement
  • Privacy
    • Consent
      • Access private data
      • Remove private data
      • List consent event history - client mode
      • List consent text - client mode
      • List consent text history - client mode
      • List consent groups - client mode
      • List consent given issuer - client mode
      • List consent event history
      • List consent given issuer
      • List consent groups
      • Register consent event - client mode
      • Register consent event
    • Permission/Shield
      • List global permissions
      • List enterprise permissions
      • Change enterprise permissions
      • List ordertype permissions
      • Change ordertype permissions
      • Check shield ordertype - client mode
      • Check shield enterprise - client mode
    • Privacy
      • List privacy enterprise
      • Change privacy enterprise
      • List privacy ordertype
      • Change privacy ordertype
  • Product & Services
    • Complaint
      • Register complaint
      • List complaints
    • Delivery
      • List next distributions
      • List next distributions - client mode
    • DeliveryStop
      • Remove delivery stops
      • Register delivery stops
      • List delivery stops
      • List delivery stop - client mode
    • Issue
      • List distributed issues
      • List product issues - client mode
    • Product
      • List products - client mode
      • Check product - client mode
      • List specific products - client mode
    • ProductDeliveryPlan
      • List productdeliveryplan - client mode
    • ProductDependency
      • Check product dependency discount - client mode
    • Sharing
      • Send subscription share invitation
      • Accept subscription share invitation
      • Decline share - client mode
      • List shareable subscription rules
      • List distribution levels
      • Change subscription share invitation details
      • List all shared subscribers
      • Cancel sharing
      • List shareable subscription nets
      • Change shareable subscription nets
      • Change distribution level
    • Subscription
      • List shared subscriptions
      • List subscriptions
      • Start subscription
      • List subscriptions - client mode
  • Recruitment
    • Recruitment
      • Register recruitment - client mode
      • List recruitments
      • List premium recruitments
      • Change premium recruitments
      • Register recruitments
    • RecruitmentCampaign
      • List recruitment campaign - client mode
  • User Data
    • Access
      • Check access
      • Check access - client mode
    • Credential
      • Check credential - client mode
    • Metadata
      • List metadata
      • Change metadata
      • Remove metadata
      • List metadata - client mode
      • Change metadata - client mode
      • Remove metadata - client mode
    • Profile
      • List user profile
      • List external user profiles
  • Diverse
    • External Identity
      • Register external Id - client mode
      • Register customer - client mode
    • Message
      • List messages
      • Send message
      • Send message - client mode
    • Status
      • List status messages
    • Stock
      • Change stocks - client mode
      • List stocks - client mode
      • List stocks for product - client mode
  1. Events

Connect realtime events

Introduction#

The payload of an event will consist of two parts:
General fields, common to all events
Event specific fields, nested within the data field

General payload fields#

FieldTypeDescription
timeIntegerEpoch timestamp in milliseconds of the event.
typeStringType of the event. Possible values are listed below.
sourceStringSource of the event. Is equal to the Connect client schema name.
statusStringStatus of the resource associated to the event.
dataObjectData for the resource associated to the event.

Event types#

subscription
product
order
coupon
customer
consent

Subscription#

This event is generated by Connect when there is an update on a subscription.

General fields#

FieldDescription
typeThe field will contain the value 'subscription'.
statusThe status of the subscription. Possible values:
'start': The subscription is started.
'stop': The subscription is stopped.
'renew': The subscription is renewed.
'stop_reset': The subscription was stopped and starts agian.
'deliveryplan_changed:' Deliveryplan has been changed on subscription.

Event specific fields#

FieldTypeDescriptionNullable
customerNumberIntegerConnect customer number related to the event.No
productCodeStringProduct code of the subscription that has started.No
periodEndIntegerEpoch timestamp in milliseconds for end of current subscription period.Yes

Example payload#

{
  "time": 1610665200000,
  "type": "subscription",
  "source": "CN_DEV",
  "status": "start",
  "data": {
    "customerNumber": 12345,
    "productCode": "PROD1",
    "periodEnd": 1610665200000
  }  
}

Product#

This event is generated when a product is new, updated or deleted.

General fields#

FieldDescription
typeThe field will contain the value 'product'.
statusThe status of the product. Possible values:
'new': The product is active.
'update': The product is updated.
'delete': The product is deleted.

Event specific fields#

FieldTypeDescriptionNullable
productCodeStringProduct codeNo
companyCodeStringCompany codeYes

Example payload#

{
  "time": 1610665200000,
  "type": "product",
  "source": "CN_DEV",
  "status": "new",
  "data": {
    "productCode": "KUP",
    "companyCode": "468979834"
    }
  }

Coupon#

This event is generated when a coupon is created, updated or deleted.

General fields#

FieldDescription
typeThe field will contain the value 'coupon'.
statusThe status of the coupon. Possible values:
'new': The coupon is new.
'update': The coupon is updated.
'delete': The coupon is deleted.

Event specific fields#

FieldTypeDescriptionNullable
couponCodeStringCoupon codeNo
couponNumberIntegerCoupon numberNo

Example payload#

{
  "time": 1610665200000,
  "type": "coupon",
  "source": "CN_DEV",
  "status": "new",
  "data": {
    "couponCode": "KUP",
    "couponNumber": 99
    }
  }

Order#

This event is generated when order process is initiated or processed.

General fields#

FieldDescription
typeThe field will contain the value 'order'.
statusThe status of the order. Possible values:
'verified': The verification process of an order is initiated.
'processed': The verification process of an order is processed.

Event specific fields#

FieldTypeDescriptionNullable
receiversInteger arrayList of Connect customer numbers that are receivers in the order. This will be empty if payer is the same as the receiver.Yes
payerIntegerConnect customer number of the payer of the order.Yes
connectOrderNumberIntegerConnect order number.No
connectIDOrderNumberIntegerConnectID order number.Yes
statusStringStatus code for the order. See description for order status codes.Yes

Example payload#

{
  "time": 1610665200000,
  "type": "order",
  "source": "CN_DEV",
  "status": "verified",  
  "data": {
    "receivers": [
      23456,
      34567
    ],
    "payer": 12345,
    "connectOrderNumber": 54321,
    "connectIDOrderNumber": 24680,
    "status": "B"
  }
}

Customer#

The event will be generated and sent to EventBrigde if customer data has been changed. This means the event will be trigged by a change of name, address, email address, or phone numbers.

General fields#

FieldDescription
typeThe field will contain the value 'customer'.
statusThe status of the customer data. Possible values:
'data_changed': Customer data is updated.
'new': New customer is created.

Event specific fields#

FieldTypeDescriptionNullable
customerNumberIntegerCustomer number.No
nameobjectObject containing name information.No
firstNameStringCustomer first name.Yes
middleNameStringCustomer middle name.Yes
lastNameStringCustomer last name.Yes
companyNameStringName of the company.Yes
departmentNameStringdepartment name.Yes
phoneNumbersobject arrayObject containing phone numbers.No
phoneNumberStringThe phone number, following the E.164 standard.Yes
phoneNumberTypeStringPhone number type: Company, Personal, FaxYes
emailsString arrayEmail addresses.No
addressobjectObject containing address information.No
addressTypeStringAddress type - possible values:
'currentAddress'
'historicalAddress'
'futureAddress'
No
streetAddressStringThe street name for this address.Yes
streetNumberIntegerThe street number for this address.Yes
entranceStringThe entrance for this address.Yes
floorShortThe floor for this address.Yes
suiteStringThe suite for this address.Yes
careOfAddressStringExtra address line if needed.Yes
postalCodeStringThe postal code for this address.Yes
postalPlaceStringThe postal place for this address.Yes
postalAddressStringThe postal address for this address.Yes
countryCodeStringThe country code for this address - ISO 3166 - alpha-2.Yes

Example payload#

{
  "time": 1610665200000,
  "type": "customer",
  "source": "CN_DEV"
  "status": "data_changed",
  "data": {
    "customerNumber": 3,
    "name": {
      "firstName": "Kari",
      "middleName": "Fjordstrand",
      "lastName": "Nordmann",
      "companyName": "Unite",
      "departmentName": "Support"
     },
    "phoneNumbers": [
      {
        "phoneNumber": "+4711122333",
        "phoneNumberType": "personal"
      },
      {
        "phoneNumber": "+4711133444",
        "phoneNumberType": "company"
      }
    ],
    "emails": [
      "email1@unite.as",
      "email2@unite.as"
    ],
    "address": {
      "addressType": "currentAddress",
      "streetAddress": "Storgt.",
      "streetNumber": 56,
      "entrance": "A",
      "floor": 2,
      "suite": "LGH 1001",
      "careOfAddress":  "C/O address",
      "postalCode": "2016",
      "postalPlace": "Oslo",
      "postalAddress": "Pb 265 Økern",
      "countryCode": "NO"
    }
  }
}

Consent#

This event is generated when a consent is changed.
The change of consent (consent event) can be done either in Connect KS or via API. It is important to be aware that if a consent event triggers "sub-consents" as well, then events will be sent for these as well.

General fields#

FieldDescription
typeThe field will contain the value 'consent'.
statusThe status of the consent data. Possible values:
'new': The consent is created.
'updated': The consent is updated.

Event specific fields#

FieldTypeDescriptionNullable
consentEventIdIntegerThe consent event Id.No
consentobjectObject containing consent information.No
consentIdIntegerConsent ID for this event.No
consentTargetStringIdentification of the target of the consent (e.g. URL of a policy)No
consentScopeStringScope of the consent. Typically, this will refer to a section or clause in the target. Yes
subjectStringIdentification of the subject:
Enter Customer number for subjectType CONNECT
Enter Credential for subjectType CONNECTID
Enter External id for subjectType EXTERNAL
Enter ConnectID orderid for subjectType ORDER.
No
subjectTypeStringType of subject - possible values:
'CONNECT'
'CONNECTID'
'EXTERNAL'
'ORDER'
No
sourceStringIdentification of the source of the consent principalYes
actionBooleanIt informs if the consent is granted.
'true': The consent is granted.
'false': The consent is revoked or granted.
No

Example payload#

{
 "time": 1610665200000,
 "type": "consent",
 "source": "CNDEV",
  "status": "updated",
  "data": {
    "consentEventId": 12345,
    "consent": {
      "consentId": 456,
      "consentTarget": "target",
      "consentScope": "scope",
      "subject": 12345,
      "subjectType": "CONNECT",
      "action": true,
      "source": "Selfservice"
    }
  }
}

Order status codes#

The following status codes are used on Connect orders.
CodeDescription
APreliminary order (not yet confirmed by the merchant service provider).
BConfirmed order, initial status for most orders.
COrder updated in client schema.
DAn error occurred on this order.
GDuplicate order.
HWrong coupon code or number.
IError creating a name and/or address.
JError creating recurring product.
KThis order should not be processed.
LThis order needs to be processed manually.
MThis order has been processed manually.
NError due to active gift subscription.
OError due to active gift subscription, email sent.
PError when handling prepaid/single credit card.
Previous
Authentication
Next
ConnectID events
Built with