HOC SiteDocumentation

save_object_type

Omit objectTypeId to create. Pass an existing uuid or slug to update, or a new uuid to create with that id. identifierFieldKey is the text field matched by dynamic_object URL segments and shown as the admin entry identifier — a page's slugParamName does not override it. Requires create_update_delete_object_types permission.

save_object_type · Group: objects

Inputs

websiteId

required

objectTypeId

optional

label

optional

kind

optional

fieldSchema

optional

slug

optional

detailRouteParam

optional

identifierFieldKey

optional — Text field key used as the public URL identity segment on dynamic_object pages and as the admin entry identifier. Independent of a page's slugParamName.

overlaysByLocale

optional

dryRun

optional

Schema

{
  "name": "save_object_type",
  "group": "objects",
  "inputFields": [
    {
      "name": "websiteId",
      "required": true
    },
    {
      "name": "objectTypeId",
      "required": false
    },
    {
      "name": "label",
      "required": false
    },
    {
      "name": "kind",
      "required": false
    },
    {
      "name": "fieldSchema",
      "required": false
    },
    {
      "name": "slug",
      "required": false
    },
    {
      "name": "detailRouteParam",
      "required": false
    },
    {
      "name": "identifierFieldKey",
      "required": false,
      "description": "Text field key used as the public URL identity segment on dynamic_object pages and as the admin entry identifier. Independent of a page's slugParamName."
    },
    {
      "name": "overlaysByLocale",
      "required": false
    },
    {
      "name": "dryRun",
      "required": false
    }
  ]
}

Maps to

  • POST /api/v1/{locale}/{websiteId}/objects → API
  • PATCH /api/v1/{locale}/{websiteId}/objects/{objectTypeId}/definition → API
  • PUT /api/v1/{locale}/{websiteId}/objects/{objectTypeId}/locale-overlays → API