younifyd
Menu

Create A Field

Create a Field

POST/v2/fields

Use it in a workflow

  1. Add a step and choose the Elastic Path connector.
  2. Pick the Create A Field action (under Flows).
  3. Fill in the fields below, then reference the result from later steps as {{createAField.response.data}}.

Fields

baseUrlstring

The API host this action calls. Choose one, or pick Custom to enter your own.

One ofhttps://euwest.api.elasticpath.comhttps://useast.api.elasticpath.com__custom__Default "https://euwest.api.elasticpath.com"

baseUrlCustomstring
bodystring

The request body content (for POST, PUT, PATCH requests).

forwardAllHeadersboolean

If enabled, all headers from the incoming request will be forwarded. Additional headers below will override forwarded ones.

Default false

headerskeyvalue

Extra HTTP headers to include, beyond what this action already declares. These override forwarded or declared headers with the same name.

queryParamskeyvalue

Extra URL query parameters to include, beyond what this action already declares. These override declared query parameters with the same name.

Response

Returns 201 with an object. Read it in later steps with {{createAField.response.data.<field>}}.

dataobject
idstring (uuid)

A unique identifier for a resource.

typestring

Represents the type of object being returned.

field_typestring

This field is immutable and cannot be updated. You can have the following field types: - `string` - `integer` - `boolean` - `float` - `date` - `relationship`

slugstring

A short description for a field/attribute.

namestring

The name of a field/attribute.

descriptionstring

A short description of a field/attribute.

requiredboolean

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

defaultboolean | number | string | null

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

enabledboolean
ordernumber | null

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

omit_nullboolean

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

validation_rulesarray<object>3 fields
metaobject2 fields
linksobject1 fields

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: | Property | Description | | --- | --- | | `current` | Always the current page | | `first` | Always the first page | | `last` | `null` if there is only one page. | | `previous` | `null` if you are on the first page. | | `next` | `null` if there is only one page. |

relationshipsobject1 fields

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.

json
{
  "data": {
    "id": "00000000-0000-0000-0000-000000000000",
    "type": "string",
    "field_type": "string",
    "slug": "string",
    "name": "string",
    "description": "string",
    "required": false,
    "default": false,
    "enabled": false,
    "order": 0,
    "omit_null": false,
    "validation_rules": [
      {
        "type": "enum",
        "options": null,
        "to": "customer"
      }
    ]
  }
}

Need more? See the Elastic Path guide for connection setup and behaviour shared by every action.

Was this page helpful?