You can be alerted of changes to an Order or Product by providing webhook URLs that we can post the objects to.
When the status of an order is changed, or if shipment tracking numbers are added, we can post the order information to a URL of your choosing. This will allow you to know when things happen in near real time.
If your URL is secured, please supply the login credentials or access token in the URL that you provide.
example: https://api.example.com/orders/webhook?token=1234567890
To Setup your webhook URL, please contact your WineDirect Customer Service Agent and provide the URL that you would like us to post order changes to.
To your setup on your end, you can mimic our post by running the following curl command:
curl -X "POST" "https://api.example.com/orders/webhook?token=1234567890" -d '{ "order": { "id": "123", "order_number": "1234561234", "order_type": "daily", "ordered_on": "2016-02-19", "requested_ship_date": "2016-02-22", "status": "shipped", "subtotal": "100.0", "shipping_collected": "15.0", "shipping_owed": "15.0", "tax_collected": "8.22", "total": "123.22", "shipping_option_code": "overnight", "temp_control": "false", "gift_message": "Happy Birthday Jake", "consumer_benefit": "10.00", "shipping_customer": { "name": "John Doe", "email": "jdoe@example.com", "phone": "555-555-5555", "dob": "1973-04-09" }, "shipping_address": { "line_1": "1190 Airport Road", "line_2": "Suite 101", "city": "Napa", "state": "CA", "zip": "94558", "county": "Napa County", "country": "US", "single_line": "1190 Airport Road, Suite 101, Napa, CA, 94558, US" }, "billing_customer": { "name": "John Doe", "email": "jdoe@example.com", "phone": "555-555-5555", "dob": "1973-04-09" }, "billing_address": { "line_1": "1190 Airport Road", "line_2": "Suite 101", "city": "Napa", "state": "CA", "zip": "94558", "county": "Napa County", "country": "US", "single_line": "1190 Airport Road, Suite 101, Napa, CA, 94558, US" }, "delivery_customer": { "name": "John Doe", "email": "jdoe@example.com", "phone": "555-555-5555", "dob": "1973-04-09" }, "delivery_address": { "company_name": "Walgreens", "line_1": "1190 Airport Road", "line_2": "Suite 101", "city": "Napa", "state": "CA", "zip": "94558", "county": "Napa County", "country": "US", "single_line": "1190 Airport Road, Suite 101, Napa, CA, 94558, US", "hold_at_location_type": "FEDEX_LOCATION", "hold_at_location_id": "ABCD" }, "onebox": true, "order_items": [{ "product_id": 291, "name": "Dancing Wind Merlot", "sku": "12345678", "quantity": 1, "price": "30.0", "subtotal": "30.0", "status": "shipped", "winery_name": "Dancing Wind", "sales_tax_collected": "2.73", "sales_tax_owed": "2.73", "shipping_collected": "5.0", "shipping_owed": "5.0", "shipping_tax_collected": "0.45", "shipping_tax_owed": "0.45" }, { "product_id": 291, "name": "Dancing Wind Cabernet", "sku": "87654321", "quantity": 1, "price": "30.0", "subtotal": "30.0", "status": "shipped", "winery_name": "Dancing Wind", "sales_tax_collected": "2.73", "sales_tax_owed": "2.73", "shipping_collected": "5.0", "shipping_owed": "5.0", "shipping_tax_collected": "0.45", "shipping_tax_owed": "0.45" }], "shipments": [{ "tracking_number": "12345678", "tracking_url": "http://www.fedex.com/Tracking?action=track&tracknumbers=123456789012" "carrier_name": "FedEx", "service_name": "2 Day Ground", "shipped_on": "2016-02-19T00:00:00.000Z", "delivered_on": "2016-04-19T08:00:00.000Z" }], "winery_orders": [{ "winery_name": "Dancing Wind", "winery_order_number": "2826" }] } } '
{ "order": { "id": "123", "order_number": "1234561234", "order_type": "daily", "ordered_on": "2016-02-19", "requested_ship_date": "2016-02-22", "status": "shipped", "subtotal": "100.0", "shipping_collected": "15.0", "shipping_owed": "15.0", "tax_collected": "8.22", "total": "123.22", "shipping_option_code": "overnight", "temp_control": "false", "gift_message": "Happy Birthday Jake", "consumer_benefit": "10.00", "shipping_customer": { "name": "John Doe", "email": "jdoe@example.com", "phone": "555-555-5555", "dob": "1973-04-09" }, "shipping_address": { "line_1": "1190 Airport Road", "line_2": "Suite 101", "city": "Napa", "state": "CA", "zip": "94558", "county": "Napa County", "country": "US", "single_line": "1190 Airport Road, Suite 101, Napa, CA, 94558, US" }, "billing_customer": { "name": "John Doe", "email": "jdoe@example.com", "phone": "555-555-5555", "dob": "1973-04-09" }, "billing_address": { "line_1": "1190 Airport Road", "line_2": "Suite 101", "city": "Napa", "state": "CA", "zip": "94558", "county": "Napa County", "country": "US", "single_line": "1190 Airport Road, Suite 101, Napa, CA, 94558, US" }, "delivery_customer": { "name": "John Doe", "email": "jdoe@example.com", "phone": "555-555-5555", "dob": "1973-04-09" }, "delivery_address": { "company_name": "Walgreens", "line_1": "1190 Airport Road", "line_2": "Suite 101", "city": "Napa", "state": "CA", "zip": "94558", "county": "Napa County", "country": "US", "single_line": "1190 Airport Road, Suite 101, Napa, CA, 94558, US", "hold_at_location_type": "FEDEX_LOCATION", "hold_at_location_id": "ABCD" }, "onebox": true, "order_items": [{ "product_id": 291, "name": "Dancing Wind Merlot", "sku": "12345678", "quantity": 1, "price": "30.0", "subtotal": "30.0", "status": "shipped", "winery_name": "Dancing Wind", "sales_tax_collected": "2.73", "sales_tax_owed": "2.73", "shipping_collected": "5.0", "shipping_owed": "5.0", "shipping_tax_collected": "0.45", "shipping_tax_owed": "0.45" }, { "product_id": 291, "name": "Dancing Wind Cabernet", "sku": "87654321", "quantity": 1, "price": "30.0", "subtotal": "30.0", "status": "shipped", "winery_name": "Dancing Wind", "sales_tax_collected": "2.73", "sales_tax_owed": "2.73", "shipping_collected": "5.0", "shipping_owed": "5.0", "shipping_tax_collected": "0.45", "shipping_tax_owed": "0.45" }], "shipments": [{ "tracking_number": "12345678", "tracking_url": "http://www.fedex.com/Tracking?action=track&tracknumbers=123456789012" "carrier_name": "FedEx", "service_name": "2 Day Ground", "shipped_on": "2016-02-19T00:00:00.000Z", "delivered_on": "2016-04-19T08:00:00.000Z" }], "winery_orders": [{ "winery_name": "Dancing Wind", "winery_order_number": "2826" }] } }
When certain attributes of a product is changed, we can post the product information to a URL of your choosing. This will allow you to know when things happen in near real time.
These attributes are:
If your URL is secured, please supply the login credentials or access token in the URL that you provide.
example: https://api.example.com/products/webhook?token=1234567890
To Setup your webhook URL, please contact your WineDirect Customer Service Agent and provide the URL that you would like us to post product changes to.
To your setup on your end, you can mimic our post by running the following curl command:
curl -X "POST" "https://api.example.com/products/webhook?token=1234567890" -d '{ "product": { "id": 5, "sku": "2008Chardonnay", "name": "2008 Chardonnay Bundle", "brand": "Solstice", "description": "This is a product description", "retail_price": 99.99, "marketplace_price": 89.99, "inventory": 200, "available_inventory": 150, "product_type": "bundle", "alcohol_percent": 10.0, "region": "California", "status": "available", "teaser": "This is the product teaser", "varietal": "Chardonnay", "vintage": 2007, "volume_in_liters": 0.75, "weight_in_kg": 1.36078, "acid": 9.6, "appellation": "Paso Robles", "bottling_date": "2008-04-28T00:00:00.000Z", "fermentation": 0.0, "harvest_date": "2005-04-09T00:00:00.000Z", "ph": 31.0, "production_amount": "259 Cases", "residual_sugar": 218.0, "sugar": 3.0, "tannin": 12.6, "wine_type": "White Wine", "unit_description": "Bottle", "vineyard_designation": "Generic Vineyard", "primary_image_url": "http://www.example.com/image.jpg", "sparkling": "false", "url": "htttp://www.example.com/products/product.html", "vivino_id": 123456789, "vivino_rating": 4.5, "display_bundled_products": true, "giftset": false, "bottles": 6, "status_changed_at": "2008-04-28T00:00:00.000Z", "winery": { "name": "Test Winery 2", "address": "24732 Vine Drive, Napa, CA, 94510, US" }, "jurisdictions": [{ "name": "Alaska", "abbr": "AK" }, { "name": "Arizona", "abbr": "AZ" }, { "name": "California", "abbr": "CA" }], "images": [{ "filename": "yellow_bottle1.png", "content_type": "image/png", "file_size": 60970, "image_type": 'bottle_shot', "url": "https://s3-us-west-2.amazonaws.com/vin65-product-images/images/files/000/000/003/original/yellow_bottle1.png?1453504454" }, { "filename": "yellow_bottle2.png", "content_type": "image/png", "file_size": 60970, "image_type": 'bottle_shot', "url": "https://s3-us-west-2.amazonaws.com/vin65-product-images/images/files/000/000/004/original/yellow_bottle2.png?1453504477" }], "notes": [{ "name": "vineyardNotes", "content": "Nulla sit amet aliquam sem. Aenean vehicula vestibulum augue, eu ornare ipsum viverra et." }, { "name": "productionNotes", "content": "Nulla sit amet aliquam sem. Aenean vehicula vestibulum augue, eu ornare ipsum viverra et." }], "ratings": [{ "code": "VORating", "name": "Vivino", "score": "4.3", "content": "4.3", "review": null, "entries": 328, "rating_type": "community", "abbr": "VO" }, { "code": "WBRating", "name": "Wine Buyer", "score": "90", "content": "90", "review": null, "entries": null, "rating_type": "professional", "abbr": "WB" }], "bundled_products": [{ "id": 123, "sku": "yolo10", "name": "Yolo Chard", "Brand": "Yolo", "marketplace_price": 19.99, "quantity": 6, "inventory": 600, "bottles": 1, "product_type": "wine", "individually_sellable": false, "volume_in_liters": 0.75, "alcohol_percent": 13.5, "region": "California", "appellation": "Paso Robles", "wine_type": "White Wine", "vintage": 2022, "teaser": "This is the product teaser", "description": "This is the product description", "status": "available", "ratings": [{ "code": "VORating", "name": "Vivino", "score": "4.3", "content": "4.3", "review": null, "entries": 328, "rating_type": "community", "abbr": "VO" }], "notes": [{ "name": "vineyardNotes", "content": "Nulla sit amet aliquam sem. Aenean vehicula vestibulum augue, eu ornare ipsum viverra et." }] }] } } '
{ "product": { "id": 5, "sku": "2008Chardonnay", "name": "2008 Chardonnay Bundle", "brand": "Solstice", "description": "This is a product description", "retail_price": 99.99, "marketplace_price": 89.99, "inventory": 200, "available_inventory": 150, "product_type": "bundle", "alcohol_percent": 10.0, "region": "California", "status": "available", "teaser": "This is the product teaser", "varietal": "Chardonnay", "vintage": 2007, "volume_in_liters": 0.75, "weight_in_kg": 1.36078, "acid": 9.6, "appellation": "Paso Robles", "bottling_date": "2008-04-28T00:00:00.000Z", "fermentation": 0.0, "harvest_date": "2005-04-09T00:00:00.000Z", "ph": 31.0, "production_amount": "259 Cases", "residual_sugar": 218.0, "sugar": 3.0, "tannin": 12.6, "wine_type": "White Wine", "unit_description": "Bottle", "vineyard_designation": "Generic Vineyard", "primary_image_url": "http://www.example.com/image.jpg", "sparkling": "false", "url": "htttp://www.example.com/products/product.html", "vivino_id": 123456789, "vivino_rating": 4.5, "display_bundled_products": true, "giftset": false, "bottles": 6, "status_changed_at": "2008-04-28T00:00:00.000Z", "winery": { "name": "Test Winery 2", "address": "24732 Vine Drive, Napa, CA, 94510, US" }, "jurisdictions": [{ "name": "Alaska", "abbr": "AK" }, { "name": "Arizona", "abbr": "AZ" }, { "name": "California", "abbr": "CA" }], "images": [{ "filename": "yellow_bottle1.png", "content_type": "image/png", "file_size": 60970, "image_type": 'bottle_shot', "url": "https://s3-us-west-2.amazonaws.com/vin65-product-images/images/files/000/000/003/original/yellow_bottle1.png?1453504454" }, { "filename": "yellow_bottle2.png", "content_type": "image/png", "file_size": 60970, "image_type": 'bottle_shot', "url": "https://s3-us-west-2.amazonaws.com/vin65-product-images/images/files/000/000/004/original/yellow_bottle2.png?1453504477" }], "notes": [{ "name": "vineyardNotes", "content": "Nulla sit amet aliquam sem. Aenean vehicula vestibulum augue, eu ornare ipsum viverra et." }, { "name": "productionNotes", "content": "Nulla sit amet aliquam sem. Aenean vehicula vestibulum augue, eu ornare ipsum viverra et." }], "ratings": [{ "code": "VORating", "name": "Vivino", "score": "4.3", "content": "4.3", "review": null, "entries": 328, "rating_type": "community", "abbr": "VO" }, { "code": "WBRating", "name": "Wine Buyer", "score": "90", "content": "90", "review": null, "entries": null, "rating_type": "professional", "abbr": "WB" }], "bundled_products": [{ "id": 123, "sku": "yolo10", "name": "Yolo Chard", "Brand": "Yolo", "marketplace_price": 19.99, "quantity": 6, "inventory": 600, "bottles": 1, "product_type": "wine", "individually_sellable": false, "volume_in_liters": 0.75, "alcohol_percent": 13.5, "region": "California", "appellation": "Paso Robles", "wine_type": "White Wine", "vintage": 2022, "teaser": "This is the product teaser", "description": "This is the product description", "status": "available", "ratings": [{ "code": "VORating", "name": "Vivino", "score": "4.3", "content": "4.3", "review": null, "entries": 328, "rating_type": "community", "abbr": "VO" }], "notes": [{ "name": "vineyardNotes", "content": "Nulla sit amet aliquam sem. Aenean vehicula vestibulum augue, eu ornare ipsum viverra et." }] }] } }