Event GroupEvent Identification
cartscarts/update
Occurs whenever a cart is updated.
Request Headers
  • X-Shopline-Topic string required
    The unique identifier for the event.
    Example: orders/edited
  • X-Shopline-Hmac-Sha256 string required
    The 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 required
    The store domain.
    Example: example.myshopline.com
  • X-Shopline-Shop-Id string required
    The store ID.
    Example: 1610418123456
  • X-Shopline-Merchant-Id string required
    The merchant ID.
    Example: 2000001234
  • X-Shopline-API-Version string required
    The API version.
    Example: v20250601
  • X-Shopline-Webhook-Id string required
    The ID of this Webhook event.
    Example: b54557e48a5fbf7d70bcd043
Request Body
  • created_at string
    The date and time when the cart was created. Format: ISO 8601.
    Example: 2024-08-31T02:20:26+08:00
  • currency_code string
    Three-letter currency code, following the ISO 4217 international standard.
    Example: USD
  • discount_codesobject[]
    A list of information about discount codes.
  • amount double
    Discount 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 string
    The discount code.
  • type integer
    The activity type at the order level. Valid values are:
    • -1: No discount
    • 1: Amount reduction
    • 2: Discount (percentage off)
    • 3: Free shipping
    • 4: Marked-up item
    • 5: Preferential price for any N items
    • 6: Preferential price for A+B combination
    • 7: Free gift
    • 8: Fixed selling price
    • 9: Lowest-priced item free
    • 11: Discount for Nth item
    • 12: Buy X get Y free
    • 13: Customized
    • 14: Price for multiple items
  • id string
    Cart's ID.
  • line_itemsobject[]
    List of cart item information.
  • giftCard boolean
    Whether the product is a gift card.
    • true: gift card
    • false: not a gift card
  • grams string
    The weight of the product in grams(g).
  • id string
    The unique identifier at the cart line item level.
  • original_line_price double
    Line 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 double
    Pre-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 double
    Post-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 string
    The unique identifier for the product corresponding to the variant.
  • propertiesobject[]
    A list of product customization information.
  • name string
    Custom attribute name.
  • show boolean
    Whether the customized information is visible.
    • true: visible
    • false: not visible
  • urls array
    URL list.
    Example: [""]
  • value string
    Custom attribute value.
  • quantity integer
    Quantity of items at the line item level.
  • sku string
    Product SKU serial number.
  • taxable boolean
    Indicates whether the product is subject to tax.
    • true: Tax is required.
    • false: No tax is required.
  • title string
    The title of the product.
  • variant_id string
    A unique code assigned to a distinct product in inventory.
  • token string
    Cart's token.
  • total_amount double
    Total 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 string
    The 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 OK
For more information about how to subscribe to webhooks and webhook response rules, refer to Webhook overview.
Was this article helpful to you?