Skip to content

Latest commit

 

History

History
46 lines (37 loc) · 3.25 KB

custom-attribute.md

File metadata and controls

46 lines (37 loc) · 3.25 KB

Custom Attribute

A custom attribute value. Each custom attribute value has a corresponding CustomAttributeDefinition object.

Structure

Custom Attribute

Fields

Name Type Tags Description
key str Optional The identifier
of the custom attribute definition and its corresponding custom attributes. This value
can be a simple key, which is the key that is provided when the custom attribute definition
is created, or a qualified key, if the requesting
application is not the definition owner. The qualified key consists of the application ID
of the custom attribute definition owner
followed by the simple key that was provided when the definition was created. It has the
format application_id:simple key.

The value for a simple key can contain up to 60 alphanumeric characters, periods (.),
underscores (_), and hyphens (-).
Constraints: Minimum Length: 1, Pattern: ^([a-zA-Z0-9\._-]+:)?[a-zA-Z0-9\._-]{1,60}$
value object Optional The value assigned to the custom attribute. It is validated against the custom
attribute definition's schema on write operations. For more information about custom
attribute values,
see Custom Attributes Overview.
version int Optional Read only. The current version of the custom attribute. This field is incremented when the custom attribute is changed.
When updating an existing custom attribute value, you can provide this field
and specify the current version of the custom attribute to enable
optimistic concurrency.
This field can also be used to enforce strong consistency for reads. For more information about strong consistency for reads,
see Custom Attributes Overview.
visibility str (Custom Attribute Definition Visibility) Optional The level of permission that a seller or other applications requires to
view this custom attribute definition.
The Visibility field controls who can read and write the custom attribute values
and custom attribute definition.
definition Custom Attribute Definition Optional Represents a definition for custom attribute values. A custom attribute definition
specifies the key, visibility, schema, and other properties for a custom attribute.
updated_at str Optional The timestamp that indicates when the custom attribute was created or was most recently
updated, in RFC 3339 format.
created_at str Optional The timestamp that indicates when the custom attribute was created, in RFC 3339 format.

Example (as JSON)

{
  "key": "key0",
  "value": {
    "key1": "val1",
    "key2": "val2"
  },
  "version": 20,
  "visibility": "VISIBILITY_HIDDEN",
  "definition": {
    "key": "key0",
    "schema": {
      "key1": "val1",
      "key2": "val2"
    },
    "name": "name0",
    "description": "description0",
    "visibility": "VISIBILITY_HIDDEN"
  }
}