Cart updated
| Event Group | Event Identification |
|---|---|
| carts | carts/update |
Occurs whenever a cart is updated.
Request Headers
- X-Shopline-Topic string requiredThe unique identifier for the event.Example:
orders/edited - X-Shopline-Hmac-Sha256 string requiredThe signature of the request. Upon receiving the request, you must verify the signature to confirm the authenticity and integrity of the data.Example:
XWmrwMey6OsLMeiZKwP4FppHH3cmAiiJJAweH5Jo4bM= - X-Shopline-Shop-Domain string requiredThe store domain.Example:
example.myshopline.com - X-Shopline-Shop-Id string requiredThe store ID.Example:
1610418123456 - X-Shopline-Merchant-Id string requiredThe merchant ID.Example:
2000001234 - X-Shopline-API-Version string requiredThe API version.Example:
v20250601 - X-Shopline-Webhook-Id string requiredThe ID of this Webhook event.Example:
b54557e48a5fbf7d70bcd043
Request Body
- created_at stringThe date and time when the cart was created. Format: ISO 8601.Example:
2024-08-31T02:20:26+08:00 - currency_code stringThree-letter currency code, following the ISO 4217 international standard.Example:
USD discount_codesobject[]
A list of information about discount codes.amount doubleDiscount code amount. The value is rounded to two decimal places. If the merchant has set up the multi-market currency, it is displayed in the currency of the corresponding market; otherwise, it is displayed in the store's currency.code stringThe discount code.type integerThe activity type at the order level. Valid values are:-1: No discount1: Amount reduction2: Discount (percentage off)3: Free shipping4: Marked-up item5: Preferential price for any N items6: Preferential price for A+B combination7: Free gift8: Fixed selling price9: Lowest-priced item free11: Discount for Nth item12: Buy X get Y free13: Customized14: Price for multiple items
- id stringCart's ID.
line_itemsobject[]
List of cart item information.giftCard booleanWhether the product is a gift card.true: gift cardfalse: not a gift card
grams stringThe weight of the product in grams(g).id stringThe unique identifier at the cart line item level.original_line_price doubleLine item price, calculated as the pre-discount unit price of a single product multiplied by the quantity. The value is rounded to two decimal places. If the merchant has set up the multi-market currency, it is displayed in the currency of the corresponding market; otherwise, it is displayed in the store's currency.original_price doublePre-discount unit price of a single product. The value is rounded to two decimal places. If the merchant has set up the multi-market currency, it is displayed in the currency of the corresponding market; otherwise, it is displayed in the store's currency.price doublePost-discount unit price of a single product. The value is rounded to two decimal places. If the merchant has set up the multi-market currency, it is displayed in the currency of the corresponding market; otherwise, it is displayed in the store's currency.product_id stringThe unique identifier for the product corresponding to the variant.propertiesobject[]
A list of product customization information.name stringCustom attribute name.show booleanWhether the customized information is visible.true: visiblefalse: not visible
urls arrayURL list.Example:[""]value stringCustom attribute value.quantity integerQuantity of items at the line item level.sku stringProduct SKU serial number.taxable booleanIndicates whether the product is subject to tax.true: Tax is required.false: No tax is required.
title stringThe title of the product.variant_id stringA unique code assigned to a distinct product in inventory.- token stringCart's token.
- total_amount doubleTotal amount of the cart. The value is rounded to two decimal places. If the merchant has set up the multi-market currency, it is displayed in the currency of the corresponding market; otherwise, it is displayed in the store's currency.
- updated_at stringThe date and time when the cart was updated. Format: ISO 8601.Example:
2024-08-31T02:20:26+08:00
Status Codes
After receiving a webhook notification from SHOPLINE, you must respond with the following format:
HTTP/1.1 200 OKFor more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?