Webhooks
Content
Webhooks sind ein Tool zum Abrufen und Speichern von Daten von einem bestimmten Ereignis. Sie können eine https:// oder https:// URL registrieren, unter der die Ereignisdaten gespeichert werden können.
Events
- Produkterstellung: Jedes Mal, wenn ein Produkt erstellt wurde, wird ein Webhook gesendet.
- Produktlöschung: Ein Webhook wird jedes Mal gesendet, wenn ein Produkt gelöscht wurde.
- Produktaktualisierung: Jedes Mal, wenn ein Produkt aktualisiert wurde, wird ein Webhook gesendet.
- Bestellung erstellen: Der Webhook wird jedes Mal gesendet, wenn die Bestellung erstellt wird.
- Bestellaktualisierung: Der Webhook wird jedes Mal gesendet, wenn die Anfrage aktualisiert wird. Beispiel: Eine Zahlung ist registriert.
Order
Parameter |
Description |
Sample |
from |
Full VersaCommerce-Domain name |
demo-1.versacommerce.de |
to |
Receiving URL |
https://requestb.in/1fqwxbp0 |
subject |
create / update / delete: #ordernumber |
create order: 37578 |
shop_id |
Internal ID (VersaCommerce) for issuing shop |
1157 |
subscription_id |
Internal ID (VersaCommerce) for issuing subscription |
86 |
domain |
Public domain name of shop |
demo-1.versacommerce.de |
body |
Contains info about order, items, customer, addresses |
See example below… |
Body
<?xml version="1.0" encoding="UTF-8"?>
<order>
<bank-account-bank-code nil="true"/>
<bank-account-bank-name nil="true"/>
<bank-account-name nil="true"/>
<bank-account-number nil="true"/>
<checkout-locale>de</checkout-locale>
<code>213-697-917</code>
<coupon-code nil="true"/>
<coupon-value type="decimal">0.0</coupon-value>
<created-at type="datetime">2013-10-09T10:35:41+02:00</created-at>
<currency>€</currency>
<customer-email>dorra@d-1.com</customer-email>
<customer-id type="integer">12838</customer-id>
<discount-total type="decimal">0.0</discount-total>
<external-invoicing-id nil="true"/>
<id type="integer">37578</id>
<item-total type="decimal">2000.0</item-total>
<items-count type="integer">0</items-count>
<items-status>undelivered</items-status>
<note> </note>
<payment-cost type="decimal">2.5</payment-cost>
<payment-status>not_paid</payment-status>
<payment-tax-rate type="float">19.0</payment-tax-rate>
<payment-type>cod</payment-type>
<payments-count type="integer">0</payments-count>
<prices-include-tax type="boolean">true</prices-include-tax>
<reduced-tax-amount type="decimal">0.0</reduced-tax-amount>
<reduced-tax-rate type="float">7.0</reduced-tax-rate>
<reduced-tax-total type="decimal">0.0</reduced-tax-total>
<referrer/>
<shipments-count type="integer">0</shipments-count>
<shipping-cost type="decimal">0.0</shipping-cost>
<shop-id type="integer">1157</shop-id>
<source nil="true"/>
<standard-tax-amount type="decimal">319.73</standard-tax-amount>
<standard-tax-rate type="float">19.0</standard-tax-rate>
<standard-tax-total type="decimal">2002.5</standard-tax-total>
<status>open</status>
<subtotal type="decimal">2002.5</subtotal>
<total type="decimal">2002.5</total>
<weight-total type="float">0.0</weight-total>
<items type="array">
<item>
<category>The product category</category>
<code>1234567890</code>
<current-status-on type="date" nil="true"/>
<discount type="float">0.0</discount>
<discount-amount type="decimal">0.0</discount-amount>
<discount-price type="decimal">2000.0</discount-price>
<discount-type>money</discount-type>
<editable-quantity type="integer">1</editable-quantity>
<editable-shipping-type>UPS</editable-shipping-type>
<extra-price type="decimal">0.0</extra-price>
<id type="integer">57552</id>
<line-price type="decimal">2000.0</line-price>
<line-tax type="decimal">380.0</line-tax>
<line-weight type="float">0.0</line-weight>
<options nil="true"/>
<order-id type="integer">37578</order-id>
<price type="decimal">2000.0</price>
<product-id type="integer">167358</product-id>
<quantity type="integer">1</quantity>
<shipment-id type="integer" nil="true"/>
<shipping-address-id type="integer" nil="true"/>
<shipping-type>UPS</shipping-type>
<status>undelivered</status>
<subtitle>This is the subtitle of the product.</subtitle>
<tax-category>standard</tax-category>
<tax-rate type="decimal">19.0</tax-rate>
<title>This is the title (name) of the product.</title>
<vendor>Canon</vendor>
<weight type="float">0.0</weight>
</item>
</items>
<shipping-address type="Address">
<city>Hannover</city>
<company/>
<country>DE</country>
<customer-id type="integer">21781</customer-id>
<email>dorra@d-1.com</email>
<extension nil="true"/>
<firstname>Björn B.</firstname>
<id type="integer">126136</id>
<lastname>Dorra</lastname>
<option-01 nil="true"/>
<option-02 nil="true"/>
<option-03 nil="true"/>
<order-id type="integer">37578</order-id>
<phone nil="true"/>
<state>Lower Saxony</state>
<street>Sample Streetname</street>
<streetnumber>34</streetnumber>
<title>Mr.</title>
<zipcode>30161</zipcode>
</shipping-address>
<billing-address type="Address">
<city>Hannover</city>
<company/>
<country>DE</country>
<customer-id type="integer">21781</customer-id>
<email>dorra@d-1.com</email>
<extension nil="true"/>
<firstname>Björn B.</firstname>
<id type="integer">126135</id>
<lastname>Dorra</lastname>
<option-01 nil="true"/>
<option-02 nil="true"/>
<option-03 nil="true"/>
<order-id type="integer">37578</order-id>
<phone nil="true"/>
<state>Lower Saxony</state>
<street>Sample Streetname</street>
<streetnumber>34</streetnumber>
<title>Mr.</title>
<zipcode>30161</zipcode>
</billing-address>
<customer>
<accepts-newsletter type="boolean">true</accepts-newsletter>
<active type="boolean">false</active>
<birthday type="date" nil="true"/>
<created-on type="date">2013-06-20</created-on>
<email>dorra@d-1.com</email>
<id type="integer">12838</id>
<option-01 nil="true"/>
<option-02 nil="true"/>
<option-03 nil="true"/>
<option-04 nil="true"/>
<registered type="boolean">true</registered>
<shop-id type="integer">1157</shop-id>
<updated-on type="date">2013-06-20</updated-on>
</customer>
</order>
Product
Parameter |
Description |
Sample |
from |
Full VersaCommerce-Domain name |
demo-1.versacommerce.de |
to |
Receiving URL |
https://requestb.in/1fqwxbp0 |
subject |
create / update / delete: #productid |
create product: 37578 |
shop_id |
Internal ID (VersaCommerce) for issuing shop |
1157 |
subscription_id |
Internal ID (VersaCommerce) for issuing subscription |
86 |
domain |
Public domain name of shop |
demo-1.versacommerce.de |
body |
Contains info about product, variants |
See example below… |
Body
<?xml version="1.0" encoding="UTF-8"?>
<product>
<active type="boolean">true</active>
<base-perform-calculation type="boolean">false</base-perform-calculation>
<base-quantity type="integer">1</base-quantity>
<base-quantity-package type="float">1.0</base-quantity-package>
<base-quantity-sold type="integer">1</base-quantity-sold>
<base-unit>Piece</base-unit>
<boolean-option-01 type="boolean">false</boolean-option-01>
<calculates-shipping-cost type="boolean">true</calculates-shipping-cost>
<category>Product category name</category>
<category-handle>product-category-name</category-handle>
<code>1234567890</code>
<compare-at-price type="decimal">0.0</compare-at-price>
<considers-stock type="boolean">true</considers-stock>
<content-meta-description nil="true"/>
<content-meta-keywords nil="true"/>
<content-title-tag nil="true"/>
<created-on type="datetime">2012-12-18T01:00:00+01:00</created-on>
<custom-url nil="true"/>
<custom-url-routing>standard_url_is_canonical</custom-url-routing>
<date-option-01 type="date" nil="true"/>
<date-option-02 type="date" nil="true"/>
<description>This is the product description.</description>
<description-html><p>This is the product description.</p></description-html>
<extra-price type="decimal">0.0</extra-price>
<featured type="boolean">false</featured>
<featured-image-url>https://assets.versacommerce.de/demo-1_versacommerce_de/product_images/167361/original/image20121218-2-191bq3s.jpg</featured-image-url>
<format>tinymce</format>
<handle>smaple-product-handle</handle>
<id type="integer">167361</id>
<new type="boolean" nil="true"/>
<note>Every product can contain a note.</note>
<option-01 nil="true"/>
<option-02 nil="true"/>
<option-03 nil="true"/>
<packaging-duration type="integer">0</packaging-duration>
<position type="integer" nil="true"/>
<price type="decimal">849.0</price>
<product-id type="integer" nil="true"/>
<product-images-count type="integer">2</product-images-count>
<properties-count type="integer">0</properties-count>
<shop-id type="integer">1157</shop-id>
<shows-stock-amount type="boolean">false</shows-stock-amount>
<stock type="integer">0</stock>
<subtitle>This is the product subtitle.</subtitle>
<tag-list>Keyword,Tag,Special,Whatever</tag-list>
<tags-count type="integer">4</tags-count>
<tax-category>standard</tax-category>
<title>This is the product title (name)</title>
<updated-on type="datetime">2013-10-09T11:15:15+02:00</updated-on>
<vendor>Vendor-Name</vendor>
<vendor-handle>a-handle-for-that-vendor</vendor-handle>
<visible type="boolean">true</visible>
<weight type="float">1.2</weight>
<variants-count type="integer">0</variants-count>
<url>/products/product-handle</url>
<variant-ids type="array"/>
</product>