# 获取所有促销活动列表 获取项目的促销活动列表。 Endpoint: GET /v3/project/{project_id}/admin/promotion Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) 项目ID。您可以在您的发布商帐户项目名称旁边找到。 Example: 44056 ## Query parameters: - `limit` (integer) 页面上元素数量的限制。 Example: 50 - `offset` (integer) 元素编号,从该元素开始生成列表(从0开始数)。 - `enabled` (integer) 通过is_enabled标志筛选元素。 ## Response 200 fields (application/json): - `active_promotions_count` (integer) 进行中的促销活动的数量。 - `inactive_promotions_count` (integer) 已停用的促销活动的数量。 - `promotions` (array) - `promotions.bonus` (array) - `promotions.bonus.item` (object) - `promotions.bonus.item.bundle_type` (string) 捆绑类型。商品类型是捆绑包时返回。 Enum: "standard", "virtual_currency_package" - `promotions.bonus.item.content` (array) - `promotions.bonus.item.description` (string,null) 商品描述。 Example: "Game description" - `promotions.bonus.item.image_url` (string,null) 图像URL。 Example: "https://cdn.xsolla.net/img/misc/images/b79342cdf24f0f8557b63c87e8326e62.png" - `promotions.bonus.item.name` (object) 商品名称。 Example: {"en":"Game name"} - `promotions.bonus.item.sku` (string) 唯一商品ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。 Example: "game_01" - `promotions.bonus.item.type` (string) 商品类型:virtual_good/virtual_currency/bundle/physical_good/unit。 Example: "unit" - `promotions.bonus.item.unit_items` (array) 如果商品具有单位类型,则它包含单位中的所有商品。大多数情况下,用户应该选择其中之一作为优惠券奖励。 - `promotions.bonus.item.unit_items.drm_name` (string) DRM名称。 Example: "Steam" - `promotions.bonus.item.unit_items.drm_sku` (string) 唯一DRM ID。 SKU只能包含大小写英文字母和数字字符、句点、破折号和下划线。 Example: "steam" - `promotions.bonus.item.unit_items.is_free` (boolean) - `promotions.bonus.item.unit_items.type` (string) 商品类型:game_key。 Example: "game_key" - `promotions.bonus.quantity` (number) 商品数量。 - `promotions.condition` (array,null) - `promotions.discount` (object,null) Example: {"discount":{"percent":"10.99"}} - `promotions.discount.percent` (string,null) 百分比折扣。 购物车价格将按照此百分比打折,然后四舍五入到小数点后两位。 Example: "10.00" - `promotions.id` (integer) 促销活动ID。项目内的唯一促销活动标识符。 Example: 1 - `promotions.is_enabled` (boolean) - `promotions.limits` (object) 促销活动限制。 - `promotions.limits.per_item` (integer,null) 全局商品限制。 Example: 10 - `promotions.limits.per_user` (object,null) 针对单独用户的促销活动限制。 - `promotions.limits.per_user.total` (integer) 用户可以购买的商品总数。您可以在发布商帐户中设置此数字或使用商店实体的管理端点(限制对象)。 Example: 5 - `promotions.limits.recurrent_schedule` (object,null) 限制次数刷新周期。 - `promotions.limits.recurrent_schedule.per_user` (object) 用户限制刷新周期。 - `promotions.limits.recurrent_schedule.per_user.day_of_month` (integer,null) 在一个月中的哪一天刷新限制次数。如果由于较短的月没有选择具体哪一天,刷新将在该月的最后一天发生。仅针对monthly限制刷新周期类型不为null。 - `promotions.limits.recurrent_schedule.per_user.day_of_week` (integer,null) 在一周中的哪一天刷新限制次数。其中1是星期一,7是星期日。仅针对weekly限制刷新周期类型不为null。 - `promotions.limits.recurrent_schedule.per_user.displayable_reset_next_date` (string) 应重置限制次数的日期和时间 (ISO 8601)。 Example: "2023-02-28T11:00:00+08:00" - `promotions.limits.recurrent_schedule.per_user.displayable_reset_start_date` (string) 第一次限制次数刷新的日期和时间 (ISO 8601)。 Example: "2023-02-28T11:00:00+08:00" - `promotions.limits.recurrent_schedule.per_user.interval_type` (string) 循环刷新周期类型。 Enum: "daily", "weekly", "monthly" - `promotions.limits.recurrent_schedule.per_user.reset_next_date` (integer) 限制次数刷新的日期和时间(Unix时间戳)。 Example: 1677553200 - `promotions.limits.recurrent_schedule.per_user.time` (string) 所需时区的限制次数刷新时间(四舍五入到小时)。 Example: "11:00:00+03:00" - `promotions.name` (object) 促销活动名称。应包含键/值对, 其中键是"^[a-z]{2}-[A-Z]{2}$"格式的区域设置,值是字符串。 Example: {"de-DE":"Gutscheintitel","en-US":"Coupon title"} - `promotions.promotion_periods` (array) 促销活动有效期。若指定了多个时间段,则date_from和date_until均为必需。 - `promotions.promotion_periods.date_from` (string, required) 指定促销活动的开始日期。 Example: "2020-08-11T10:00:00+03:00" - `promotions.promotion_periods.date_until` (string,null) 促销活动的结束日期。设置为null时,促销活动永久有效。仅在指定单个有效期时可设置为null。 Example: "2020-08-11T20:00:00+03:00" - `promotions.type` (string) 促销活动类型。 Example: "item_discount" - `total_promotions_count` (integer) 促销活动总数。 ## Response 401 fields (application/json): - `errorCode` (integer) Example: 1020 - `errorMessage` (string) Example: "[0401-1020]: Error in Authentication method occurred" - `statusCode` (integer) Example: 401