# 验证促销码 确定代码是促销码还是优惠券码以及用户是否可以应用它。 Endpoint: GET /v2/project/{project_id}/promotion/code/{code}/verify Version: 2.0.0 Security: XsollaLoginUserJWT ## Path parameters: - `project_id` (integer, required) 项目ID。您可以在您的发布商帐户项目名称旁边找到。 Example: 44056 - `code` (string, required) 唯一区分大小写的代码。包含字母和数字。 Example: "WINTER2021" ## Response 200 fields (application/json): - `code` (string) 区分大小写的唯一券码。包含字母和数字。 Example: "WINTER2021" - `rewards` (any) - `type` (string) 代码类型:promocode/coupon。 ## Response 401 fields (application/json): - `errorCode` (integer) Example: 1501 - `errorMessage` (string) Example: "[0401-1501]: Authorization failed: Provide authorization" - `statusCode` (integer) Example: 401 ## Response 403 fields (application/json): - `errorCode` (integer) - `errorMessage` (string) Example: "Authorization header not sent." - `statusCode` (integer) Example: 403 - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x" ## Response 404 fields (application/json): - `errorCode` (integer) Example: 9811 - `errorMessage` (string) Example: "[0401-9811]: Code not found." - `statusCode` (integer) Example: 404 - `transactionId` (string) Example: "x-x-x-x-transactionId-mock-x-x-x" ## Response 422 fields (application/json): - `errorCode` (integer) - `errorMessage` (string) - `statusCode` (integer)