All Products
Search
Document Center

WUYING Workspace:CreateProperty

Last Updated:Apr 23, 2024

Creates a user property.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
PropertyKeystringYes

The property name.

department
PropertyValuesarrayNo

The values of the property. You can specify up to 50 values for a property.

stringNo

The value of the property.

HR

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The ID of the request.

1CBAFFAB-B697-4049-A9B1-67E1FC5F****
CreateResultobject

The result of creating the property.

PropertyIdlong

The ID of the property.

390
PropertyKeystring

The name of the property.

department
SavePropertyValueModelobject

The result of creating the property value.

SavePropertyValuesobject []

Details of the property values that were created.

PropertyValueIdlong

The ID of the property value.

978
PropertyValuestring

The value of the property.

HR
FailedPropertyValuesobject []

The property values that failed to be created.

PropertyIdlong

The ID of the property value.

390
PropertyValuestring

The value of the property.

HR
ErrorCodestring

The error code.

ExistedPropertyValue
ErrorMessagestring

The error message.

The property value is used by another property.

Examples

Sample success responses

JSONformat

{
  "RequestId": "1CBAFFAB-B697-4049-A9B1-67E1FC5F****",
  "CreateResult": {
    "PropertyId": 390,
    "PropertyKey": "department",
    "SavePropertyValueModel": {
      "SavePropertyValues": [
        {
          "PropertyValueId": 978,
          "PropertyValue": "HR"
        }
      ],
      "FailedPropertyValues": [
        {
          "PropertyId": 390,
          "PropertyValue": "HR",
          "ErrorCode": "ExistedPropertyValue",
          "ErrorMessage": "The property value is used by another property."
        }
      ]
    }
  }
}

Error codes

For a list of error codes, visit the Service error codes.