Skip to main content

Create a Field

POST 

https://euwest.api.elasticpath.com/v2/fields

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

Request

Responses

Created

Authorization: http

name: bearerAuthtype: httpscheme: bearer

Request Collapse all
Base URL
https://euwest.api.elasticpath.com
Auth
Body required
{
  "data": {
    "default": 0,
    "description": "string",
    "enabled": true,
    "field_type": "string",
    "name": "string",
    "order": 0,
    "relationships": {
      "flow": {
        "data": {
          "id": "00000000-0000-0000-0000-000000000000",
          "type": "flow"
        }
      }
    },
    "required": true,
    "slug": "string",
    "type": "string",
    "validation_rules": [
      {
        "type": "enum",
        "options": [
          "string"
        ],
        "to": "customer"
      }
    ]
  }
}
ResponseClear

Click the Send API Request button above and see the response here!

We use cookies to enhance your experience. By continuing to visit this site you agree to our use of cookies.