# 创建属性值

创建一个属性值。
<div class="notice"><strong>注意：</strong><br><br>所有项目对属性值数量均有限制。默认值和最大值均为<strong>每个属性20个值。</strong></div>

Endpoint: POST /v2/project/{project_id}/admin/attribute/{external_id}/value
Version: 2.0.0
Security: basicAuth

## Path parameters:

  - `project_id` (integer, required)
    项目ID。您可以在[发布商帐户](https://publisher.xsolla.com/0/projects/0/)的项目名称旁找到此参数；使用项目时，也可以在浏览器地址栏中找到此参数。URL格式如下：`https://publisher.xsolla.com/<merchant_id>/projects/<project_id>`。

  - `external_id` (string, required)
    属性外部ID。

## Request fields (application/json):

  - `external_id` (string, required)
    属性的唯一值ID。 `external_id`只能包含小写英文字母、数字、短横线和下划线。
    Example: attribute_value

## Response 201 fields (application/json):

  - `external_id` (string)
    属性的唯一值ID。 `external_id`只能包含小写英文字母、数字、短横线和下划线。
    Example: attribute_value

## Response 401 fields (application/json):

  - `statusCode` (integer)
    Example: 401

  - `errorCode` (integer)
    Example: 1020

  - `errorMessage` (string)
    Example: [0401-1020]: Error in Authentication method occurred

## Response 403 fields (application/json):

  - `statusCode` (integer)
    Example: 403

  - `errorCode` (integer)
    Example: 0

  - `errorMessage` (string)
    Example: Authorization header not sent.

  - `transactionId` (string)
    Example: x-x-x-x-transactionId-mock-x-x-x

## Response 404 fields (application/json):

  - `statusCode` (integer)
    Example: 404

  - `errorCode` (integer)
    Example: 9901

  - `errorMessage` (string)
    Example: [0401-9901]: Attribute not found.

  - `transactionId` (string)
    Example: x-x-x-x-transactionId-mock-x-x-x

## Response 422 fields (application/json):

  - `statusCode` (integer)
    Example: 422

  - `errorCode` (integer)
    Example: 1102

  - `errorMessage` (string)
    Example: [0401-1102]: Unprocessable Entity. The property `property_name` is required

  - `transactionId` (string)
    Example: x-x-x-x-transactionId-mock-x-x-x

