# tables.getProperties

> Retrieve layout and style properties of a table.



- Member path: `doc.tables.getProperties(…)`
- Mutates document: no
- Idempotency: `idempotent`
- Supports tracked mode: no
- Supports dry run: no

## Expected result

Returns a TablesGetPropertiesOutput with direct table layout and style state, including style options, borders, default cell margins, and cell spacing when explicitly set.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "TableAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "const": "table"
        },
        "nodeId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    }
  },
  "type": "object",
  "properties": {
    "target": {
      "$ref": "#/$defs/TableAddress"
    },
    "nodeId": {
      "type": "string"
    }
  },
  "additionalProperties": false,
  "oneOf": [
    {
      "required": [
        "target"
      ]
    },
    {
      "required": [
        "nodeId"
      ]
    }
  ]
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$defs": {
    "TableAddress": {
      "type": "object",
      "properties": {
        "kind": {
          "const": "block"
        },
        "nodeType": {
          "const": "table"
        },
        "nodeId": {
          "type": "string"
        }
      },
      "additionalProperties": false,
      "required": [
        "kind",
        "nodeType",
        "nodeId"
      ]
    }
  },
  "type": "object",
  "properties": {
    "nodeId": {
      "type": "string"
    },
    "address": {
      "$ref": "#/$defs/TableAddress"
    },
    "styleId": {
      "type": "string"
    },
    "alignment": {
      "enum": [
        "left",
        "center",
        "right"
      ]
    },
    "direction": {
      "enum": [
        "ltr",
        "rtl"
      ]
    },
    "preferredWidth": {
      "type": "number"
    },
    "preferredWidthType": {
      "enum": [
        "dxa",
        "auto",
        "pct"
      ]
    },
    "autoFitMode": {
      "enum": [
        "fixedWidth",
        "fitContents",
        "fitWindow"
      ]
    },
    "styleOptions": {
      "type": "object",
      "properties": {
        "headerRow": {
          "type": "boolean"
        },
        "lastRow": {
          "type": "boolean"
        },
        "firstColumn": {
          "type": "boolean"
        },
        "lastColumn": {
          "type": "boolean"
        },
        "bandedRows": {
          "type": "boolean"
        },
        "bandedColumns": {
          "type": "boolean"
        }
      },
      "additionalProperties": false
    },
    "borders": {
      "type": "object",
      "properties": {
        "top": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "color": {
                  "type": "string",
                  "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                }
              },
              "additionalProperties": false,
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "bottom": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "color": {
                  "type": "string",
                  "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                }
              },
              "additionalProperties": false,
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "left": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "color": {
                  "type": "string",
                  "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                }
              },
              "additionalProperties": false,
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "right": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "color": {
                  "type": "string",
                  "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                }
              },
              "additionalProperties": false,
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "insideH": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "color": {
                  "type": "string",
                  "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                }
              },
              "additionalProperties": false,
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "insideV": {
          "oneOf": [
            {
              "type": "object",
              "properties": {
                "lineStyle": {
                  "type": "string"
                },
                "lineWeightPt": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "color": {
                  "type": "string",
                  "pattern": "^(#?([0-9A-Fa-f]{6}|[0-9A-Fa-f]{3})|auto)$"
                }
              },
              "additionalProperties": false,
              "required": [
                "lineStyle",
                "lineWeightPt",
                "color"
              ]
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "additionalProperties": false
    },
    "defaultCellMargins": {
      "type": "object",
      "properties": {
        "topPt": {
          "type": "number"
        },
        "rightPt": {
          "type": "number"
        },
        "bottomPt": {
          "type": "number"
        },
        "leftPt": {
          "type": "number"
        }
      },
      "additionalProperties": false
    },
    "cellSpacingPt": {
      "type": "number"
    }
  },
  "additionalProperties": false,
  "required": [
    "nodeId",
    "address"
  ]
}
```

## Pre-apply throws

- `TARGET_NOT_FOUND`

## Non-applied receipt codes

- None

