# 设置指定用户的促销活动限制 在增加或减少次数后设置指定用户在应用的限制内可以使用促销活动的次数。 用户限制API允许您限制用户可以使用促销活动的次数。要自行配置用户限制,请前往所需促销活动类型的“管理”部分: * 折扣促销活动 * 奖励促销活动 Endpoint: PUT /v2/project/{project_id}/admin/user/limit/promotion/id/{promotion_id} Version: 2.0.0 Security: basicAuth ## Path parameters: - `project_id` (integer, required) 项目ID。您可以在您的发布商帐户项目名称旁边找到。 Example: 44056 - `promotion_id` (integer, required) 促销活动ID。项目内的唯一促销活动标识符。 Example: 111425 ## Request fields (application/json): - `available` (integer, required) 在应用的限制数内用户可购的剩余商品数或可用的促销活动次数。 - `user` (object, required) - `user.user_external_id` (string, required) 用户外部ID。 ## Response 200 fields (application/json): - `per_user` (object) - `per_user.available` (integer) 用户可以使用促销活动的剩余次数。 Example: 9 - `per_user.total` (integer) 用户可以使用促销活动的最大次数。 Example: 10 ## Response 401 fields (application/json): - `errorCode` (integer) Example: 1020 - `errorMessage` (string) Example: "[0401-1020]: Error in Authentication method occurred" - `statusCode` (integer) Example: 401 ## Response 404 fields (application/json): - `errorCode` (integer) - `errorMessage` (string) - `statusCode` (integer) - `transactionId` (string) ## Response 422 fields (application/json): - `errorCode` (integer) - `errorMessage` (string) - `errorMessageExtended` (array) - `statusCode` (integer) - `transactionId` (string)