> ## 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.

# postPurchaseFlowCheck

> Check a post-purchase flow as publishing would, without publishing it. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can't be read.

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

## Arguments

**definition** `[PostPurchaseFlowDefinitionInput!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-definition-input)` *required*

The whole flow to check.

**fields**

**edges** `[\[PostPurchaseFlowEdgeInput!\]!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-edge-input)` *required*

Its edges. A port leads to at most one step.

**fields**

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

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

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

`next` from the start; `accept` or `decline` from a page; `matching` or `nonMatching` from a segment; a treatment's id (or, for one you're adding, its name) from a split.

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

The step it leads to.

**steps** `[\[PostPurchaseFlowStepInput!\]!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-step-input)` *required*

Its steps.

**fields**

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

Any id, unique in the flow. The edges name steps by it.

**segment** `[PostPurchaseSegmentInput](/docs/api-reference/v3/reference/checkout/post-purchase-segment-input)`

Which orders a SEGMENT step matches.

**split** `[PostPurchaseFlowSplitInput](/docs/api-reference/v3/reference/checkout/post-purchase-flow-split-input)`

A SPLIT step's A/B test.

**title** `String`

A SEGMENT step's name.

**type** `[PostPurchaseFlowStepType!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-step-type)` *required*

What the step does.

**upsellPageId** `String`

A PAGE step's page.

## Returns

**postPurchaseFlowCheck** `[PostPurchaseFlowCheck!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-check)` *required*

What publishing a post-purchase flow would do.

**fields**

**diagnostics** `[\[PostPurchaseFlowDiagnostic!\]!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-diagnostic)` *required*

Problems in the flow.

**fields**

**blocks** `[PostPurchaseFlowDiagnosticBlocks!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-diagnostic-blocks)` *required*

What it stops.

**code** `String!` *required*

A stable code.

**message** `String!` *required*

What is wrong.

**stepId** `String`

The step it is on; null for the flow as a whole.

**risks** `[\[PostPurchaseFlowRisk!\]!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-risk)` *required*

The consequences of publishing it. Empty while a diagnostic blocks it.

**fields**

**code** `[PostPurchaseFlowRiskCode!](/docs/api-reference/v3/reference/checkout/post-purchase-flow-risk-code)` *required*

What kind of consequence.

**message** `String!` *required*

What happens.

**splitIds** `[String!]!` *required*

The stored A/B tests it concerns.

## Example

```graphql theme={null}
query {
  postPurchaseFlowCheck(definition: { ... })
}
```


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