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
CREATEDA customer has been created.UPDATEDOne or more of s customer's attributes as been updated.DELETEDA 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.
APPROVEDAn order has been approved.CREATEDA new completed order has been created.UPDATEDAn order has been updated.CANCELLEDAn order has been cancelled.CARD_DECLINEDAn order failed to be created due to a credit card decline.TRACKING_NUMBER_ADDEDA new tracking number has been added to an order.SHIPMENT_STATUS_UPDATEDThe 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
CREATEDA 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
CREATEDA 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.
CREATEDA product has been created.UPDATEDA product has been updated.APPROVEDA product has been approved.SOLD_OUTA product has sold out.ARCHIVEDA product has been archived.
