{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rutter/json-schema/rutter-create-entity-with-custom-fields-page-schema.json",
  "title": "CreateEntityWithCustomFieldsPage",
  "x-generated": "2026-11-05",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rutter-accounting-api-openapi.yml#/components/schemas/CreateEntityWithCustomFieldsPage",
  "type": "object",
  "properties": {
    "other_entity_fields": {
      "type": "string",
      "description": "Other fields for this entity."
    },
    "custom_fields": {
      "type": "object",
      "properties": {
        "custom_field_key": {
          "type": "string",
          "description": "The value for this entity top-level custom field that should match the type specified on the structured schema of this entity."
        }
      },
      "additionalProperties": false,
      "description": "Custom fields on the entity. Note: for field type 'select', please use the values from options presented through 'GET /accounting/:entityType/custom_fields' endpoint. For field type 'boolean', please pass in a boolean value."
    },
    "line_items": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "other_line_item_fields": {
            "type": "string",
            "description": "Other fields for this entity line items."
          },
          "custom_fields": {
            "type": "object",
            "properties": {
              "line_item_custom_field_key": {
                "type": "string",
                "description": "The value for this line item custom field that should match the type specified on the structured schema of this entity."
              }
            },
            "additionalProperties": false,
            "description": "Custom fields on the entity. Note: for field type 'select', please use the values from options presented through 'GET /accounting/:entityType/custom_fields' endpoint. For field type 'boolean', please pass in a boolean value."
          }
        },
        "required": [
          "other_line_item_fields"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "other_entity_fields",
    "line_items"
  ]
}