Skip to main content

Update a Field

PUT 

/v2/fields/:flowFieldID

  • For Commerce, this endpoint updates a field.
  • For Product Experience Manager, this endpoint updates an attribute.

Specify whichever attributes you want to change. The values of the other attributes remain the same. If the attributes section is empty, the field/attribute is not updated.

Request

Path Parameters

    flowFieldID uuidrequired

    The unique identifier for the flow/template to which the field/attribute you want to update belongs.

Body

required
    data object
    default number

    A default value if none is supplied and the field/attribute is required.

    description string

    A description for a field/attribute.

    field_type string

    This field is immutable and cannot be updated. The type of field:

    • string
    • integer
    • boolean
    • float
    • date
    • relationship
    id uuid

    A unique identifier for a resource.

    name string

    The name of a field/attribute.

    required boolean

    true if required on input, false if not. Always false if the field_type is relationship.

    slug string

    A unique identifier of a field/attribute.

    enabled boolean
    type string

    Represents the object being returned.

Responses

OK

Schema
    data object
    id uuid

    A unique identifier for a resource.

    type string

    Represents the type of object being returned.

    field_type string

    This field is immutable and cannot be updated. You can have the following field types:

    • string
    • integer
    • boolean
    • float
    • date
    • relationship
    slug string

    A short description for a field/attribute.

    name string

    The name of a field/attribute.

    description string

    A short description of a field/attribute.

    required boolean

    true if required on input, false if not. Always false if the field_type is a relationship.

    default numberstringnull

    A default value if none is supplied and a field/attribute is not required.

    enabled boolean
    order numbernull

    Denotes the order in which this field is returned relative to the rest of the flow/template fields/attributes.

    omit_null boolean

    Hide this field/attribute from responses if the value is null.

    validation_rules object[]
  • Array [
  • type string

    Possible values: [enum, email, slug, between, one-to-many, one-to-one]

    The validation you use depends on the field_type of the field/attribute. Each validation rule is expressed as a validation rule object.

    options object
    anyOf
  • Array [
  • string

  • ]
  • to string
  • ]
  • meta object
    owner string

    Possible values: [store, organization]

    The resource owner, either organization or store.

    timestamps object
    created_at string

    The date and time a resource is created.

    updated_at string

    The date and time a resource is updated.

    links object

    Links allow you to move between requests. Single entities use a self parameter with a link to that specific resource. Listing pages use the following:

    PropertyDescription
    currentAlways the current page
    firstAlways the first page
    lastnull if there is only one page.
    prevnull if you are on the first page.
    nextnull if there is only one page.
    self string
    relationships object

    Relationships are established between different flow/template entities. For example, a field/attribute is related to a flow/template, as the field/attribute is attached to the flow/template.

    flow object
    data object
    id uuid

    A unique identifier for a resource.

    type string

    Represents the type of object being returned.

Loading...