> ## Documentation Index
> Fetch the complete documentation index at: https://developers.redo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# checkoutTree

> A saved checkout tree by id, or the live one when `id` is omitted. Null if it doesn't exist, or the store has no live tree.

**Required scopes:** [`checkout_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-checkout_read)

## Arguments

**id** `ID`

The tree's id; omit for the live tree.

## Returns

**checkoutTree** `[CheckoutTree](/docs/api-reference/v3/reference/checkout/checkout-tree)`

A saved checkout tree: which checkout experience each shopper sees. Saving never changes a tree; it creates a new one. One tree per store is live; make another live with `checkoutTreePublish`.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When it was saved.

**definition** `[CheckoutTreeDefinition!](/docs/api-reference/v3/reference/checkout/checkout-tree-definition)` *required*

Its steps and edges.

**fields**

**edges** `[\[CheckoutTreeEdge!\]!](/docs/api-reference/v3/pagination)` *required*

Its edges, in port order.

**fields**

**from** `String!` *required*

The step it leaves, or `"trigger"` for the start.

**port** `String!` *required*

The port it leaves by: `next` from the start; `matching`, `nonMatching` or an edge id from a segment; a treatment id from a split.

**to** `String!` *required*

The step it leads to.

**steps** `[\[CheckoutTreeStep!\]!](/docs/api-reference/v3/reference/checkout/checkout-tree-step)` *required*

Its steps.

**fields**

**config** `[JSON!](/docs/api-reference/v3/reference/common/json)` *required*

The step's settings, matching `configJsonSchema` on its `steps/<type>` page in `checkoutTreeCatalog`.

**id** `String!` *required*

The step's id, unique in the tree. It is also the id node analytics are reported under, so keep it when you edit the step.

**title** `String`

A name the merchant gave the step.

**type** `[CheckoutTreeStepType!](/docs/api-reference/v3/reference/checkout/checkout-tree-step-type)` *required*

What the step does.

**id** `ID!` *required*

The tree's id.

**live** `Boolean!` *required*

Whether shoppers see this tree now.

**script** `String!` *required*

The tree as CheckoutTreeScript. To change it, open a workspace with `workspaceCreate(resourceType: CHECKOUT_TREE)`.

## Example

```graphql theme={null}
query {
  checkoutTree(id: "...") {
    createdAt
    id
    live
    script
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.