Skip to content

Commit

Permalink
Merge branch 'partners_update_webhook_documentation_with_several_fields'
Browse files Browse the repository at this point in the history
  • Loading branch information
papantonis committed Oct 27, 2023
2 parents ea80b71 + a4694aa commit a86d934
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 2 deletions.
6 changes: 6 additions & 0 deletions source/localizable/smart_cart/_order_object.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ Name | Type | Value | Description
`fbs_delivery_note` | String | | Order's delivery note from warehouse for orders that are fulfilled by Skroutz
`store_pickup` | Boolean | | Whether the order will be picked up by the user at the store
`shipping_cost` | Double | | The order's shipping cost in euros (only available for FBM (Fulfilled By Merchant) orders)
`commission` | Double | | Order's total commission in euros
`pickup_window` | Object | | Selected [Pickup window](#pickup-window)
`pickup_address` | String | | Pickup location address
`number_of_parcels` | Integer | | Number of parcels
Expand Down Expand Up @@ -112,12 +113,16 @@ Name | Type | Description
`line_items[_].unit_price` | Double | Price per item in euros
`line_items[_].total_price` | Double | Total item price in euros: `unit_price` * `quantity`
`line_items[_].price_includes_vat` | Boolean | Price includes VAT (could be `false` for [invoice](#invoice-details) with VAT exclusion)
`line_items[_].commission` | Double | Commission in euros: `total_price` * (`commission_rate`/100)
`line_items[_].commission_rate` | Double | Commission rate as percentage, e.g. `8.34`
`line_items[_].island_vat_discount_applied` | Boolean | VAT discount applied (could be `true` for [invoice](#invoice-details) orders, billed to customers in [5 specific Greek islands](http://elib.aade.gr/elib/view?d=/gr/ap/2021/A_1150/))
`line_items[_].ean` | String | EAN code of product (optional)
`line_items[_].mpn` | String | MPN code of product (optional)
`line_items[_].extra_info` | String | Additional information for item, eg. color preference or prescription details for contact lenses (optional) [webhook example](../webhook/#example-9-with-extrainfo-in-lineitems)
`line_items[_].rejection_reason` | String | Rejection reason (possible values: `limited_stock`, `no_stock`, `discontinuation`, `wrong_price`)
`line_items[_].return_reason` | String | User return reason (possible values: `faulty`, `wrong_product`, `withdrawal`, `wrong_size`)
`line_items[_].serial_numbers` | String | Serial numbers for item, concatenated by ',', e.g. `SN12345,SN56789`
`line_items[_].tags` | Array | A list of tags that characterize the line item (optional). Supported tags: `["plus_deal"]`

#### Line item size

Expand All @@ -128,6 +133,7 @@ Name | Type | Value | Description
`line_items[_].size.shop_value` | String | |Item original size as provided by the shop
`line_items[_].size.shop_variation_uid` | String | | Variation ID in shop for an item
`line_items[_].size.ean` | String | | EAN code of variation
`line_items[_].size.mpn` | String | | MPN code of variation

#### Accept options

Expand Down
68 changes: 66 additions & 2 deletions source/localizable/smart_cart/webhook.html.md.erb
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,13 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 10.40,
"total_price": 20.80,
"price_includes_vat": true,
"commission": 1.73,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"serial_numbers": null
"mpn": "JA-1059",
"serial_numbers": null,
"tags": ["plus_deal"]
},
{
"id": "l39vKqxqh2",
Expand All @@ -234,6 +238,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -245,6 +251,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.05,
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -351,13 +358,17 @@ Would send a Webhook request payload just like if the order was cancelled by the
"value": "14 χρονών",
"shop_value": "12-14",
"shop_variation_uid": "40575312-14",
"ean": "1234567890321"
"ean": "1234567890321",
"mpn": "JA-1059"
},
"unit_price": 17.99,
"total_price": 35.98,
"price_includes_vat": true,
"commission": 3.00,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -368,6 +379,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -379,6 +392,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 5.32,
"fbs_delivery_note": null
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -482,8 +496,11 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 10.40,
"total_price": 20.80,
"price_includes_vat": true,
"commission": 1.73,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -494,6 +511,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -505,6 +524,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.05,
"fbs_delivery_note": null
},
"changes": {
Expand Down Expand Up @@ -558,8 +578,11 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 10.40,
"total_price": 20.80,
"price_includes_vat": true,
"commission": 1.73,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -570,6 +593,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -581,6 +606,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.05,
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -694,8 +720,11 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 10.40,
"total_price": 20.80,
"price_includes_vat": true,
"commission": 1.73,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -706,6 +735,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -717,6 +748,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.05,
"fbs_delivery_note": null
"pickup_window": { from: "2019-11-02T15:00:00+02:00", "to": "2019-11-02T16:00:00+02:00" },
"number_of_parcels": 1,
Expand Down Expand Up @@ -791,8 +823,11 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 10.40,
"total_price": 20.80,
"price_includes_vat": true,
"commission": 1.73,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -803,6 +838,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -814,6 +851,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.05,
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -939,8 +977,11 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 100,
"total_price": 200,
"price_includes_vat": false,
"commission": 16.68,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -951,6 +992,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -962,6 +1005,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 19.00,
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -1079,8 +1123,11 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 100,
"total_price": 200,
"price_includes_vat": true,
"commission": 16.68,
"commission_rate": 8.34,
"island_vat_discount_applied": true,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -1091,6 +1138,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -1102,6 +1151,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 19.00,
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -1206,6 +1256,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 10.40,
"total_price": 20.80,
"price_includes_vat": true,
"commission": 1.73,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"serial_numbers": null
},
Expand All @@ -1217,6 +1269,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -1228,6 +1282,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.05,
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -1331,6 +1386,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25.5,
"total_price": 51,
"price_includes_vat": true,
"commission": 4.73,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"extra_info": "Χρώμα: Πράσινο\nΒαθμοί SPH: -6.50",
"serial_numbers": null
Expand All @@ -1343,6 +1400,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.73,
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down Expand Up @@ -1446,8 +1504,11 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 10.40,
"total_price": 20.80,
"price_includes_vat": true,
"commission": 1.73,
"commission_rate": 8.34,
"island_vat_discount_applied": false,
"ean": "1234567890123",
"mpn": "JA-1059",
"serial_numbers": null
},
{
Expand All @@ -1458,6 +1519,8 @@ Would send a Webhook request payload just like if the order was cancelled by the
"unit_price": 25,
"total_price": 25,
"price_includes_vat": true,
"commission": 2.32,
"commission_rate": 9.28,
"island_vat_discount_applied": false,
"serial_numbers": null
}
Expand All @@ -1469,6 +1532,7 @@ Would send a Webhook request payload just like if the order was cancelled by the
"gift_wrap": false,
"fulfilled_by_skroutz": false,
"store_pickup": false,
"commission": 4.05
"fbs_delivery_note": null,
"accept_options": {
"number_of_parcels": [
Expand Down

0 comments on commit a86d934

Please sign in to comment.