VineSpring can send webhook events that notify your application any time an event happens on your account. Administrators configure webhooks that tell VineSpring where to send the event data.

Table of Contents

  • Create a new webhook
  • Responding to a webhook
  • Events
  • Event sample data

Create a new webhook

Navigate to Settings->Webhooks to view existing webhooks and to create new ones. To create a new one, use the Create New action.

New Webhook

Name: name of the webhook.
Url: must be set as an accessible, absolute URL. VineSpring will send event data to this endpoint via an HTTP POST request.
Failure Email: used for notifying an administrator by email when the event happened but no endpoint listened, or there was no successful response from the endpoint.
Subscribe To: can be used to configure which events notify.

Responding to a Webhook

Please refer to the following details:

  • All requests are in JSON format.
  • Request method will always be POST.
  • You must respond with a successful (200) status code.
  • VineSpring will retry every 25 seconds 10 times until a successful status code is received.

The request body will contain event data, in the following format:

{
  type: "customer.created", // event type <string>
  data: { ... } // event data <object>
}

Events

We currently support the following events (continue scrolling down the page to view examples):

Customers

  • Customer created
  • Customer deleted
  • Customer updated

Orders

  • Order created
  • Order updated

Clubs

  • Membership created
  • Membership customer note updated
  • Membership placed "on hold"
  • Membership payment method updated
  • Membership reactivated
  • Membership shipping address updated

Groups

  • Group created
  • Group customer(s) added
  • Group customer(s) removed
  • Group deleted
  • Group updated

Event (Customer)

Customer created

{
  type: "customer.created",
  data: {
    id: "cust_xxxxx" ,
    accountId: "acct_xxxx",
    altEmail: "alt_email@vinespring.com",
    authToken: "xxxxx",
    company: "xxxxx",
    createdOn: "2018-08-31T23:09:37.038Z",
    customerSince: "2018-08-31T23:09:37.038Z",
    defaultAddress: {
      city: "Denver",  
      country: "United States",
      createdOn: "2017-12-06T19:30:47.042Z",
      customerId: "cust_5xxxe",  
      id: "addr_5a28xxxxb0c0",              
      isInternational: false,  
      line1: "856 Quitman Street",  
      line2: "Suite 123",  
      name: "Address",  
      postalCode: "80204",  
      state: "CO",  
      updatedBy: "cust_59fxx",  
      updatedOn: "2018-01-09T14:06:07.384Z"
     },
     dob: "2018-08-31T23:09:37.038Z",
     email: "test@vinespring.com",
     fullName: "Rachel Green",
     isTaxExempt: false,
     password: "xxxx",
     updatedBy: "test@vinespring.com",
     updatedOn: "2018-08-31T23:09:37.038Z",
     name": {
       first: "Rachel",
       last: "Green",
       middle: "xxx",
    },
    lifetimeValue: 120.5,
    merchantId: "xxx_id",
    phone: "049-234223",
    source: "website"
  }
}

Customer deleted

{
  type: "customer.deleted",
  data: {
    id: "cust_xxxxx"
  }
}

Customer updated

{
  type: "customer.updated",
  data: {
    id: "cust_xxxxx" ,
    accountId: "acct_xxxx",
    altEmail: "alt_email@vinespring.com",
    authToken: "xxxxx",
    company: "xxxxx",
    createdOn: "2018-08-31T23:09:37.038Z",
    customerSince: "2018-08-31T23:09:37.038Z",
    defaultAddress: {
      city: "Denver",  
      country: "United States",
      createdOn: "2017-12-06T19:30:47.042Z",
      customerId: "cust_5xxxe",  
      id: "addr_5a28xxxxb0c0",              
      isInternational: false,  
      line1: "856 Quitman Street",  
      line2: "Suite 123",  
      name: "Address",  
      postalCode: "80204",  
      state: "CO",  
      updatedBy: "cust_59fxx",  
      updatedOn: "2018-01-09T14:06:07.384Z"
     },
     dob: "2018-08-31T23:09:37.038Z",
     email: "test@vinespring.com",
     fullName: "Rachel Green",
     isTaxExempt: false,
     password: "xxxx",
     updatedBy: "test@vinespring.com",
     updatedOn: "2018-09-31T23:09:37.038Z",
     name": {
       first: "Rachel",
       last: "Green",
       middle: "xxx",
    },
    lifetimeValue: 162.52,
    merchantId: "xxx_id",
    phone: "072-776342",
    source: "website"
  }
}

Events (Order)

Order created

{
  type: "order.created",
  data: {
    id: "ordr_xxxx" ,
    accountId: "acct_xxxx",
    createdOn: "2018-08-31T23:09:37.038Z",
    freightTax: 0,
    items: [{  
      productId: "prod_xxxx",  
      name: "Wine",
      sku: "12CH750",
      isTaxExempt: false,  
      quantity: 5,              
      price: 35,  
      subtotal: 2,  
      total: 3  
    }],
    orderNumber: "JW003",
    shipping: 1,
    shippingMethod: {
      alternateAddress: true,  
      carrierCode: "UPS",
      id: "smtd_5a4e19f952",
      name: "UPS Ground",  
      requireShippingAddress: true                
    },
    status: "Hold",
    subtotal: 70,
    tax: 10,
    total: 80,
    type: "Admin",
    shipDate: "2018-08-31T23:09:37.038Z",
    shippingAddress: {
      city: "Denver",  
      country: "United States",
      createdOn: "2017-12-06T19:30:47.042Z",
      customerId: "cust_5xxxe",  
      id: "addr_5a28xxxxb0c0",              
      line1: "856 Quitman Street",  
      line2: "Suite 123",  
      name: "Address",  
      postalCode: "80204",  
      state: "CO",  
      updatedBy: "cust_59fxx",  
      updatedOn: "2018-01-09T14:06:07.384Z"
    },
    fullName: "Rachel Green",
    customerId: "cust_xxxxx",
    customer: {
      fullname: "Rachel Green",  
      id: "cust_5a28xxxxb0c0",
      ...
    },
    calculatedShipping: 3,
    fulfillmentHouse: "Shipping"
  }
}

Order updated

{
  type: "order.updated",
  data: {
    id: "ordr_xxxx" ,
    accountId: "acct_xxxx",
    createdOn: "2018-08-31T23:09:37.038Z",
    freightTax: 0,
    items: [{  
      productId: "prod_xxxx",  
      name: "Wine",
      sku: "12CH750",
      isTaxExempt: false,  
      quantity: 5,              
      price: 35,  
      subtotal: 2,  
      total: 3  
    }],
    orderNumber: "JW003",
    shipping: 1,
    shippingMethod: {
      alternateAddress: true,  
      carrierCode: "UPS",
      id: "smtd_5a4e19f952",
      name: "UPS Ground",  
      requireShippingAddress: true                
    },
    status: "Sent To Fulfillment",
    subtotal: 70,
    tax: 10,
    total: 80,
    type: "Admin",
    shipDate: "2018-08-31T23:09:37.038Z",
    shippingAddress: {
      city: "Denver",  
      country: "United States",
      createdOn: "2017-12-06T19:30:47.042Z",
      customerId: "cust_5xxxe",  
      id: "addr_5a28xxxxb0c0",              
      line1: "856 Quitman Street",  
      line2: "Suite 123",  
      name: "Address",  
      postalCode: "80204",  
      state: "CO",  
      updatedBy: "cust_59fxx",  
      updatedOn: "2018-01-09T14:06:07.384Z"
    },
    fullName: "Rachel Green",
    customerId: "cust_xxxxx",
    customer: {
      fullname: "Rachel Green",  
      id: "cust_5a28xxxxb0c0",
      ...
    },
    calculatedShipping: 3,
    fulfillmentHouse: "Shipping"
  }
}

Events (Clubs)

Club membership created

{
type: "membership.created",
data: {
id: "cmbr_xxx",
accountId: "acct_xxx",
cardId: "ch_xxx",
clubId: "club_xxx",
isGift: false,
memberSince: "2020-01-31T09:01:18.897Z",
purchaserCustomerId: "cust_xxx",
recipientCustomerId: "cust_xxx",
status: "active",
source: "storefront",
createdOn: "2020-01-31T09:01:18.897Z",
updatedOn: "2020-01-31T09:01:18.897Z"
}
}

Club membership customer note updated

{
type: "membership.customerNote.updated",
data: {
id: "cmbr_xxx",
accountId: "acct_xxx",
cardId: "ch_xxx",
clubId: "club_xxx",
customerNote: {
message: "a note",
updatedBy: "email@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
isGift: false,
memberSince: "2020-01-31T09:01:18.897Z",
purchaserCustomerId: "cust_xxx",
recipientCustomerId: "cust_xxx",
status: "active",
source: "storefront",
createdOn: "2020-01-31T09:01:18.897Z",
updatedOn: "2020-02-31T09:01:18.897Z",
updatedBy: "email@email.com"
}
}

Club membership on hold

{
type: "membership.on_hold",
data: {
id: "cmbr_xxx",
accountId: "acct_xxx",
cardId: "ch_xxx",
clubId: "club_xxx",
customerNote: {
message: "a note",
updatedBy: "email@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
holdUntil: "2020-11-31T09:01:18.897Z",
holdOn: "2020-03-31T09:01:18.897Z",
isGift: false,
memberSince: "2020-01-31T09:01:18.897Z",
purchaserCustomerId: "cust_xxx",
recipientCustomerId: "cust_xxx",
status: "hold",
source: "storefront",
createdOn: "2020-01-31T09:01:18.897Z",
updatedOn: "2020-03-31T09:01:18.897Z",
updatedBy: "email@email.com"
}
}

Club membership payment method updated

{
type: "membership.paymentMethod.updated",
data: {
id: "cmbr_xxx",
accountId: "acct_xxx",
cardId: "ch_xxx",
clubId: "club_xxx",
custom1: "custom field 1",
custom2: "custom field 2",
custom3: "custom field 3",
custom4: "custom field 4",
custom5: "custom field 5",
customerNote: {
message: "a note",
updatedBy: "email@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
isGift: false,
memberSince: "2020-01-31T09:01:18.897Z",
purchaserCustomerId: "cust_xxx",
recipientCustomerId: "cust_xxx",
salesrep: "Jack",
shipmentsCreated: 2,
shippingAddressId: "addr_123",
shippingMethodId: "smtd_123",
status: "active",
source: "storefront",
createdOn: "2020-01-31T09:01:18.897Z",
updatedOn: "2020-04-31T09:01:18.897Z",
updatedBy: "email@email.com"
}
}

Club membership reactivated

{
type: "membership.reactivated",
data: {
id: "cmbr_xxx",
accountId: "acct_xxx",
cardId: "ch_xxx",
clubId: "club_xxx",
custom1: "custom field 1",
custom2: "custom field 2",
custom3: "custom field 3",
custom4: "custom field 4",
custom5: "custom field 5",
customerNote: {
message: "a note",
updatedBy: "email@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
isGift: false,
memberSince: "2020-01-31T09:01:18.897Z",
purchaserCustomerId: "cust_xxx",
recipientCustomerId: "cust_xxx",
salesrep: "Jack",
shipmentsCreated: 2,
shippingAddressId: "addr_123",
shippingMethodId: "smtd_123",
status: "active",
source: "storefront",
createdOn: "2020-01-31T09:01:18.897Z",
updatedOn: "2020-04-31T09:01:18.897Z",
updatedBy: "email@email.com"
}
}

Club membership shipping address updated

{
type: "membership.shippingAddress.updated",
data: {
id: "cmbr_xxx",
accountId: "acct_xxx",
cardId: "ch_xxx",
clubId: "club_xxx",
custom1: "custom field 1",
custom2: "custom field 2",
custom3: "custom field 3",
custom4: "custom field 4",
custom5: "custom field 5",
giftMessage: "Enjoy!",
note: {
message: "admin note",
updatedBy: "admin@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
customerNote: {
message: "a note",
updatedBy: "email@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
isGift: true,
memberSince: "2020-01-31T09:01:18.897Z",
purchaserCustomerId: "cust_xxx",
recipientCustomerId: "cust_xxx",
salesrep: "Jack",
shipmentsCreated: 2,
shipmentsGifted: 2,
shippingAddressId: "addr_123",
shippingMethodId: "smtd_123",
status: "active",
trustee: {
fullName: "Name",
email: "test@test.com",
phone: "1231231234"
},
source: "admin",
createdOn: "2020-01-31T09:01:18.897Z",
updatedOn: "2020-04-31T09:01:18.897Z",
updatedBy: "email@email.com"
}
}

Club membership shipping method updated

{
type: "membership.shippingMethod.updated",
data: {
id: "cmbr_xxx",
accountId: "acct_xxx",
cardId: "ch_xxx",
clubId: "club_xxx",
custom1: "custom field 1",
custom2: "custom field 2",
custom3: "custom field 3",
custom4: "custom field 4",
custom5: "custom field 5",
giftMessage: "Enjoy!",
note: {
message: "admin note",
updatedBy: "admin@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
customerNote: {
message: "a note",
updatedBy: "email@email.com",
updatedOn: "2020-02-31T09:01:18.897Z"
},
isGift: true,
memberSince: "2020-01-31T09:01:18.897Z",
purchaserCustomerId: "cust_xxx",
recipientCustomerId: "cust_xxx",
salesrep: "Jack",
shipmentsCreated: 2,
shipmentsGifted: 2,
shippingAddressId: "addr_123",
shippingMethodId: "smtd_123",
status: "active",
trustee: {
fullName: "Name",
email: "test@test.com",
phone: "1231231234"
},
source: "admin",
createdOn: "2020-01-31T09:01:18.897Z",
updatedOn: "2020-04-31T09:01:18.897Z",
updatedBy: "email@email.com"
}
}

Events (Groups)

Group created

{
"type": "group.created",
"data": {
"name": "My Group Name",
"accountId": "acct_xxx",
"id": "cgrp_xxx",
"autoRefresh": false,
"isDefault": false,
"isTaxExempt": false
}
}

Group customer(s) added

{
"type": "group.customers.added",
"data": {
"customerIds": [
"cust_xxx"
],
"groupId": "cgrp_xxx"
}
}

Group customer(s) removed

{
"type": "group.customers.removed",
"data": {
"customerIds": [
"cust_xxx"
],
"groupId": "cgrp_xxx"
}
}

Group deleted

{
"type": "group.deleted",
"data": {
"id": "cgrp_5fa351a33ffd2c00075b7911"
}
}

Group updated

{
"type": "group.updated",
"data": {
"isDefault": false,
"isTaxExempt": false,
"autoRefresh": false,
"accountId": "acct_xxx",
"id": "cgrp_xxx",
"name": "Group Name",
"memberCount": 27
}
}

Did this answer your question?