Webhooks

Subscribe to webhooks to synchronize data with another system

You can provide an endpoint that Vinoshipper will notify of changes in your account. All webhooks have the same format, and include the URL where you can get the full details of the order or customer that has been created or updates.

{
  "identifier": "For ORDER, your order number when you supplied one, otherwise the Vinoshipper order number. The customer, product, membership or cart id for other subjects.",
  "subject": "ORDER | CUSTOMER | PRODUCT | CLUB_MEMBERSHIP | CART",
  "event": "See the events below",
  "type": "subject.event in lower case, e.g. order.created",
  "timestamp": "When the event happened (ISO 8601, UTC)",
  "vsOrderNumber": "ORDER only: the Vinoshipper order number, including any letter suffix",
  "metaFields": "ORDER only: the order's meta fields as name/value pairs",
  "context": "Event-specific details, see TRACKING_NUMBER_ADDED and SHIPMENT_STATUS_UPDATED",
  "href": "Deprecated, use hrefV3 instead",
  "hrefV3": "URL of the resource in the v3 API"
}

To add a web hook, go to Account -> Integrations -> Webhooks and specify the URL of your webhook listener.

If you do not see webhooks as an option, contact [email protected] to have webhooks enabled for your account.

Events

Once web hooks are enabled you will start receiving events for customer and order changes.

Customer Events

The event subject will be CUSTOMER and the identifier will contain the id of the customer.

Event Types

  • CREATED A customer has been created.
  • UPDATED One or more of s customer's attributes as been updated.
  • DELETED A customer has been deleted.

Order Events

The event subject will be ORDER. The identifier is your order number when you supplied one, otherwise the Vinoshipper order number; vsOrderNumber always carries the Vinoshipper number.

  • APPROVED An order has been approved.
  • CREATED A new completed order has been created.
  • UPDATED An order has been updated.
  • CANCELLED An order has been cancelled.
  • CARD_DECLINED An order failed to be created due to a credit card decline.
  • TRACKING_NUMBER_ADDED A new tracking number has been added to an order.
  • SHIPMENT_STATUS_UPDATED The shipment's status changed. Sent on every status change

Club Membership Events

The event subject will be CLUB_MEMBERSHIP and the identifier will contain the membership ID.

Event Types

  • CREATED A customer has signed up for a wine club membership.

Cart Events

The event subject will be CART and the identifier will contain the cart ID.

Event Types

  • CREATED A new cart has been created with items added to it (This is for web store only).

Product Events

The event subject will be PRODUCT and the identifier will contain the product id.

  • CREATED A product has been created.
  • UPDATED A product has been updated.
  • APPROVED A product has been approved.
  • SOLD_OUT A product has sold out.
  • ARCHIVED A product has been archived.