HomeGuidesAPI ReferenceChangelogDiscussions
HomeLog In
Guides

Order Promotion_items

Data structure of a promotion item

FieldColumn TypeDescriptionExample
idStringOrder item's ID (ID of an order item's collection, including item_type, item_id..and so on)
系統自行創建訂單折扣ID
5de71987202bf4001574ecfd
discountable_amount
discounted_amountMoneyDiscounted Amount
折扣金額
1125
subtotal_afterMoneySubtotal After Discount
折扣後訂單金額
5125
promotionPromotionPromotion Data
促銷資訊
item_dataObjectcart item snapshot
購物車快照
coupon_codeStringCoupon Code
該訂單使用之優惠代碼
vip002
updated_atDateTimePromotion Updated Time
此產品使用促銷更新時間
2019-12-04T02:27:20.087+00:00
created_atDateTimePromotion Created Time
此產品使用促銷創造時間(通常與產品創造時間一致)
2019-12-04T02:27:20.081+00:00

JSON example

{
  "promotion_items": [
        {
            "id": "62a1abd9759e690012072869",
            "discountable_amount": null,
            "discounted_amount": {
                "cents": 950,
                "currency_symbol": "NT$",
                "currency_iso": "TWD",
                "label": "NT$950",
                "dollars": 950.0
            },
            "subtotal_after": {
                "cents": 50,
                "currency_symbol": "NT$",
                "currency_iso": "TWD",
                "label": "NT$50",
                "dollars": 50.0
            },
            "promotion": {
                "_id": "62a1ab9e6cef95001b4428d0",
                "addon_product_id": null,
                "available_platforms": [
                    "ec"
                ],
                "banner_media_ids": [],
                "codes": [
                    "vip002",
                    "vip003",
                    "vip004",
                    "vip005"
                ],
                "coupon_generated_by": null,
                "coupon_type": null,
                "created_at": "2022-06-09T08:13:18.107Z",
                "description_translations": {},
                "discount_amount": null,
                "discount_on": "order",
                "discount_percentage": 95.0,
                "discount_type": "percentage",
                "discountable_category_ids": [],
                "discountable_product_ids": [],
                "discountable_quantity": null,
                "discounted_point": null,
                "discounted_price": null,
                "end_at": null,
                "extended_promotion_id": null,
                "first_purchase_only": false,
                "for_affiliate_campaign": false,
                "is_accumulated": false,
                "max_use_count": null,
                "membership_tier_id": null,
                "merchant_id": "5bf76f982cf7f2000142280a",
                "min_price_type": "after_discount",
                "multiple_code": false,
                "requires_membership": false,
                "seo_description_translations": {},
                "seo_keywords": null,
                "seo_title_translations": {},
                "show_coupon": false,
                "start_at": "2022-06-09T08:00:00.000Z",
                "status": "active",
                "term_translations": {},
                "title_translations": {
                    "zh-hant": "代碼測試2"
                },
                "updated_at": "2022-06-09T08:13:18.107Z",
                "use_count": 0,
                "user_max_use_count": 0,
                "whitelisted_tag_contents": [],
                "is_extend_promotion": false,
                "id": "62a1ab9e6cef95001b4428d0"
            },
            "updated_at": "2022-06-09T08:14:17.040+00:00",
            "created_at": "2022-06-09T08:14:17.040+00:00",
            "item_data": null,
            "promotion_conditions_data": [
                {
                    "min_item_count": null,
                    "min_price": {
                        "cents": 1.0,
                        "currency_iso": "TWD"
                    },
                    "type": null,
                    "whitelisted_product_ids": [],
                    "whitelisted_category_ids": [],
                    "blacklisted_product_ids": [],
                    "id": "62a1ab9e6cef95001b4428cf"
                }
            ],
            "coupon_code": "vip002"
        }
  ]
}