Skip to main content

Queries

  • checkoutAbTest (Experimental) — A checkout A/B test by id. Null if it doesn’t exist.
  • checkoutAbTestQueue (Experimental) — The store’s queue of checkout A/B tests, next up first. Change the order with checkoutAbTestQueueReorder.
  • checkoutAbTestResults (Experimental) — Statistical results of one checkout A/B test. This is an expensive call that runs several warehouse queries, so fetch one test at a time rather than sweeping a list. Null if the test doesn’t exist.
  • checkoutAbTests (Experimental) — The store’s checkout A/B tests of every status, newest first, at most 50 at a time. For older ones, pass the last id as before. Post-purchase tests aren’t included.
  • checkoutAbTestSegmentResults (Experimental) — One checkout A/B test’s results per checkout segment, as the merchant’s test page shows them. Expensive: it runs warehouse queries. Null if the test doesn’t exist. CHECKOUT_AB_TEST_SEGMENTS_UNAVAILABLE when the store lacks advanced checkout analytics, or the test hasn’t started or started before they were collected; checkoutAbTestResults works for every test.
  • checkoutDiscountRule (Experimental) — Get one checkout discount rule. An id from another account, or one that does not exist, is null.
  • checkoutDiscountRules (Experimental) — The store’s checkout discount rules: whether they are on, whether they can be turned on, the active rules in evaluation order, and the inactive rules.
  • checkoutExperience — Get a checkout experience with the full configuration of each shipping method: prices and the cart conditions they apply to, carrier services, markups, price constraints, and fulfillment delays. An id from another account, or one that does not exist, is null. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • checkoutExperiences — List the store’s checkout experiences with a summary of each one’s shipping methods. For prices, carriers, conditions, and fulfillment delays, get the experience with checkoutExperience(id:). active tells you whether an experience is reachable in the store’s live checkout tree, which decides which shoppers see which experience. Experiences belonging to another account are not included. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • checkoutTree (Experimental) — 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. To see one of its experiences or A/B test treatments at checkout, read guide/preview in checkoutTreeCatalog.
  • checkoutTreeCatalog (Experimental) — Read checkout tree docs by path: one entry per path, in order, null for an unknown path. "" is the index; start with guide/, then workspaceCreate(resourceType: CHECKOUT_TREE) to edit the live tree. guide/preview shows how to see a given checkout experience or A/B test treatment at checkout. At most 50 paths.
  • checkoutTreeCheck (Experimental) — Check a checkout tree as saving and publishing would, without saving it. For an editor that changes CheckoutTree.definition and saves it with checkoutTreeCreate.
  • checkoutTreeRevision (Experimental) — The store’s checkout tree revision: it changes whenever a tree is published, by anyone. Pass it as expectedRevision to checkoutTreeCreate and checkoutTreePublish. "none" when no tree is live.
  • checkoutTrees (Experimental) — The store’s saved checkout trees, newest first, at most 50 at a time. For older ones, pass the last id as before.
  • checkoutWidget (Experimental) — Get one checkout widget. An id from another account, or one that does not exist, is null.
  • checkoutWidgets (Experimental) — The store’s checkout widgets, and whether it can add more.
  • customShippingMethodCode (Experimental) — Get what is needed to write or edit a custom shipping method: the custom rate contract’s TypeScript type definitions, starter code, and a sample input. Send shippingMethodId and checkoutExperienceId together to also get that method’s current source. A shipping method that is not CUSTOM is null. An id from another account, or one that does not exist, is null.
  • postPurchaseAbTests (Experimental) — The store’s post-purchase A/B tests, newest first, at most 50 at a time. For older ones, pass the last id as before.
  • postPurchaseFlow (Experimental) — The store’s post-purchase flow. Null without a Shopify integration. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • postPurchaseFlowCheck (Experimental) — Check a post-purchase flow as publishing would, without publishing it. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • postPurchaseFlowRevision (Experimental) — The store’s post-purchase flow revision, a hash of the stored flow: it changes whenever the flow does, by anyone. Pass it as expectedRevision to postPurchaseFlowPublish and postPurchaseAbTestConclude. "none" with no flow. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • postPurchaseProviderStatus (Experimental) — Whether Redo is the store’s post-purchase app, asked of Shopify. POST_PURCHASE_PROVIDER_UNAVAILABLE (502) when Shopify doesn’t answer: try again shortly.
  • shippingAiExperienceResults (Experimental) — One checkout experience’s AI shipping results per shipping method: checkouts by shipping price and shipping margin by order value, as lifetime totals since it launched. Expensive: it runs warehouse queries. Null if the checkout experience doesn’t exist.
  • shippingAiResults (Experimental) — AI shipping pricing results: revenue captured and price combinations, as lifetime totals since each experience launched. Without checkoutExperienceId, totals across every AI shipping experience of the store, which are zeros for a store with none. Expensive: it runs warehouse queries. Null if the checkout experience doesn’t exist.
  • storefrontDeliveryEstimate (Experimental) — The store’s storefront delivery estimate settings. A store that never set them reads as off, with the defaults.
  • storefrontProgressBar (Experimental) — The store’s cart progress bar. Null while it’s off.
  • subscriptionDeliveryProfile (Experimental) — The store’s Shopify delivery profile for subscriptions and pre-orders. Null if the store has no Shopify integration.
  • upsellPage (Experimental) — An upsell page by id. An id from another store is null, as is one that doesn’t exist. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • upsellPages (Experimental) — The store’s upsell pages, newest first, at most 50 at a time. For older ones, pass the last id as before. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.

Mutations

  • checkoutAbTestConclude (Experimental) — Conclude a running checkout A/B test to one arm: the live tree is republished with the test replaced by that arm, and every open checkout uses it from its next shipping-rate request. It records the winner, which billing’s proven-lift attestations rely on, and saves the winner’s progress bar to the store. This can’t be undone. Concluding to the control records no winner. CHECKOUT_AB_TEST_NOT_RUNNING, CHECKOUT_AB_TEST_TREATMENT_INVALID and CHECKOUT_AB_TEST_ALREADY_CONCLUDED when it can’t be concluded. CHECKOUT_TREE_REVISION_STALE when a tree went live meanwhile and the test is still running. CHECKOUT_AB_TEST_CONCLUDED_NOT_LIVE when the winner is recorded but the live tree still contains the test: call again with the same treatment to take it out, which doesn’t conclude it twice. Null if the test doesn’t exist.
  • checkoutAbTestDelete (Experimental) — Delete a checkout A/B test that hasn’t started, and take it out of the queue. Returns false if the test doesn’t exist or has started.
  • checkoutAbTestQueueReorder (Experimental) — Put the queue of checkout A/B tests in a new order. Pass every queued test exactly once, next up first; CHECKOUT_AB_TEST_QUEUE_MISMATCH otherwise. Returns the queue.
  • checkoutAbTestSchedule (Experimental) — Add a checkout A/B test to the queue, to start from a saved checkout tree that contains it. A saved test never joins the queue on its own. Scheduling a queued test again replaces its tree and keeps its place. CHECKOUT_AB_TEST_ALREADY_STARTED and CHECKOUT_AB_TEST_NOT_IN_TREE when it can’t be scheduled. Null if the test or tree doesn’t exist.
  • checkoutAbTestStart (Experimental) — Start a scheduled checkout A/B test: its tree goes live, and every open checkout uses it from its next shipping-rate request. Call without acknowledgedRisks first to see the risks; nothing changes until each is acknowledged. Null if the test doesn’t exist.
  • checkoutDiscountRuleCreate (Experimental) — Create a checkout discount rule. It is created inactive; turn it on with checkoutDiscountRuleSetActive. Amounts must be in the shop’s currency. Numeric Shopify product and collection ids are saved as GIDs, and empty condition blocks are dropped. An invalid rule fails with INVALID_CHECKOUT_DISCOUNT_RULE (400).
  • checkoutDiscountRuleDelete (Experimental) — Permanently delete a checkout discount rule. When discount rules are on, the store’s live checkout discount is updated right away. If that update fails, the change is still saved and the request fails with CHECKOUT_DISCOUNT_RULES_NOT_SYNCED (409); send the same request again to retry. After that failure the rule is already deleted, so the repeat returns false and still updates the live checkout. An id from another account, or one that does not exist, returns false.
  • checkoutDiscountRuleSetActive (Experimental) — Turn a checkout discount rule on or off. A rule turned on is tried after every other active rule; reorder with checkoutDiscountRulesReorder. When discount rules are on, the store’s live checkout discount is updated right away. If that update fails, the change is still saved and the request fails with CHECKOUT_DISCOUNT_RULES_NOT_SYNCED (409); send the same request again to retry. An id from another account, or one that does not exist, is null.
  • checkoutDiscountRulesReorder (Experimental) — Set the evaluation order of the active rules. At checkout the first active rule whose conditions match wins. Returns the active rules in their new order. When discount rules are on, the store’s live checkout discount is updated right away. If that update fails, the change is still saved and the request fails with CHECKOUT_DISCOUNT_RULES_NOT_SYNCED (409); send the same request again to retry. ids must list every active rule exactly once; otherwise the request fails with INVALID_CHECKOUT_DISCOUNT_RULE_ORDER (400).
  • checkoutDiscountRulesSetEnabled (Experimental) — Turn the store’s checkout discount rules on or off. This changes the live checkout: on installs the active rules as the store’s shipping discount, off removes it. Rules keep their active state while off. Turning them on while eligibility.eligible is false fails with CHECKOUT_DISCOUNT_RULES_NOT_ELIGIBLE (409). If turning rules on or off is saved but the store’s checkout is not updated, the request fails with CHECKOUT_DISCOUNT_RULES_NOT_SYNCED (409); send the same request again to retry.
  • checkoutDiscountRuleUpdate (Experimental) — Change a checkout discount rule. Each field you send replaces that whole field: send all of conditions to change one condition. When discount rules are on, the store’s live checkout discount is updated right away. If that update fails, the change is still saved and the request fails with CHECKOUT_DISCOUNT_RULES_NOT_SYNCED (409); send the same request again to retry. An id from another account, or one that does not exist, is null. An invalid rule fails with INVALID_CHECKOUT_DISCOUNT_RULE (400).
  • checkoutExperienceUpsellPageSet (Experimental) — Attach, swap or remove a checkout experience’s upsell page. Its page wins over the post-purchase flow, and over any A/B test in it, for orders placed through that experience. Changing a live experience needs confirmLiveChange, or fails with CHECKOUT_EXPERIENCE_LIVE (409). Null if the experience or the page doesn’t exist, or belongs to another store. CONVERSION_FEATURE_LOCKED (409) when post-purchase is locked for the store.
  • checkoutExperienceWidgetsSet (Experimental) — Replace the widgets a checkout experience shows, and return them. This changes checkout right away for an experience in the live checkout tree, so confirmLiveChange must be true or it fails with CHECKOUT_WIDGET_LIVE (409). Fails with CHECKOUT_WIDGETS_UNAVAILABLE (409) while availability.available is false, unless the list only removes widgets the experience already has. A shipping option widget fails with INVALID_CHECKOUT_WIDGET (400). Null when the experience or any widget is from another account or does not exist.
  • checkoutTreeCreate (Experimental) — Save a whole checkout tree as a new tree. It doesn’t go live until checkoutTreePublish. New A/B tests are created but don’t start; tests that have started can’t be changed here. CHECKOUT_TREE_REVISION_STALE when a tree was published since expectedRevision; CHECKOUT_TREE_DEFINITION_INVALID, with diagnostics, while a diagnostic blocks saving.
  • checkoutTreePublish (Experimental) — Make a saved checkout tree live: every open checkout uses it from its next shipping-rate request. Call without acknowledgedRisks first to see the risks; nothing changes until each is acknowledged. A running A/B test the tree removes needs its winner in splitConclusions, and concludes. Publishing an older tree rolls back to it. Null if the tree doesn’t exist.
  • checkoutWidgetCreate (Experimental) — Create a checkout widget. It reaches shoppers once it is global or assigned to an experience; see checkoutExperienceWidgetsSet. Fails with CHECKOUT_WIDGETS_UNAVAILABLE (409) while availability.available is false. A store can have one global widget per type; a second fails with CHECKOUT_WIDGET_GLOBAL_EXISTS (409). A write that reaches shoppers right away fails with CHECKOUT_WIDGET_LIVE (409) unless confirmLiveChange is true. An invalid widget fails with INVALID_CHECKOUT_WIDGET (400).
  • checkoutWidgetDelete (Experimental) — Permanently delete a checkout widget. A widget that is global or used by an experience fails with CHECKOUT_WIDGET_IN_USE (409): turn it off or unassign it first. An id from another account, or one that does not exist, returns false.
  • checkoutWidgetDuplicate (Experimental) — Copy a checkout widget. The copy is named “<name> (copy)”, isn’t global, and isn’t assigned to any experience. Fails with CHECKOUT_WIDGETS_UNAVAILABLE (409) while availability.available is false. An id from another account, or one that does not exist, is null.
  • checkoutWidgetUpdate (Experimental) — Change a checkout widget. Fields you leave out keep their values. config, when sent, replaces all of the widget’s settings, and a widget’s type can’t change. A write that reaches shoppers right away fails with CHECKOUT_WIDGET_LIVE (409) unless confirmLiveChange is true. That applies to a widget that is global, is becoming global, or is assigned to an experience. A store can have one global widget per type; a second fails with CHECKOUT_WIDGET_GLOBAL_EXISTS (409). Turning global on fails with CHECKOUT_WIDGETS_UNAVAILABLE (409) while availability.available is false. An id from another account, or one that does not exist, is null. An invalid widget fails with INVALID_CHECKOUT_WIDGET (400).
  • createCheckoutExperience — Create an empty checkout experience. It has no shipping methods and is not live until the store’s checkout tree routes shoppers to it; add methods with createShippingMethod. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • createShippingMethod — Add a shipping method to a checkout experience. - A FIXED method is a price you set, served by Redo with no carrier involved. It needs rates. - A DYNAMIC method quotes live carrier rates through Redo. It needs carrierServices or a serviceLevel, and every carrier must be one the store has an account or setting for. - A CUSTOM method is priced per cart by the TypeScript in code, which is type-checked against the custom rate contract before anything is saved. Read customShippingMethodCode (experimental) for the contract and starter code. An agent or an automation cannot send code. Per-method shipping discounts cannot be set here; discount shipping with the store’s checkout discount rules instead (checkoutDiscountRuleCreate, experimental). An id from another account, or one that does not exist, is null. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • deleteCheckoutExperience — Permanently delete a checkout experience and its shipping methods. An experience that is live in the store’s checkout tree cannot be deleted, because checkout would be left pointing at an experience that no longer exists. First publish a checkout tree that no longer serves this experience (checkoutTreePublish, experimental), then delete it. An id from another account, or one that does not exist, returns false. Deleting an experience that is live in the checkout tree fails with CHECKOUT_EXPERIENCE_LIVE (409). An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • deleteShippingMethod — Permanently remove a shipping method from a checkout experience. If the experience is live, shoppers stop seeing the method as soon as the change propagates. An id from another account, or one that does not exist, returns false. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • duplicateCheckoutExperience — Copy a checkout experience, including its settings and shipping methods. The copy’s shipping methods get new IDs, and the copy is not live until the store’s checkout tree routes shoppers to it. An id from another account, or one that does not exist, is null. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • postPurchaseAbTestConclude (Experimental) — End a running post-purchase A/B test: its winner takes its place in the live flow at once, for every order from now on, and this can’t be undone. It is the only way a running test leaves the flow. Null if the test doesn’t exist, or belongs to another store. POST_PURCHASE_FLOW_REVISION_STALE (409) when the flow changed since expectedRevision: a running test keeps running, so read the flow and call again with the new revision; INVALID_POST_PURCHASE_REQUEST (400) for a treatment that isn’t in the test, or a test that hasn’t started. CONVERSION_FEATURE_LOCKED (409) when post-purchase is locked for the store. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • postPurchaseFlowPublish (Experimental) — Replace the store’s post-purchase flow. It is live at once, for every order, with no draft and no rollback: to undo a publish, publish the old flow, after concluding any A/B test it started. Call without acknowledgedRisks first to see the risks; nothing changes until each is acknowledged. A running A/B test can’t leave the flow or change here, only be rerouted: conclude it with postPurchaseAbTestConclude. A SPLIT step with no split.id starts a new test. A page attached to a checkout experience still wins over this flow. Null without a Shopify integration. CONVERSION_FEATURE_LOCKED (409) when post-purchase is locked for the store. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • setAutoSelectedShippingMethods — Choose which shipping methods are shown first at checkout, in priority order. The first one available is pre-selected for the shopper, and methods not listed follow in their usual order. Send only the methods to put first, not every method. The list replaces the current one; send an empty list to turn auto-selection off. Read the current list from autoSelectedShippingMethodIds on the checkout experience. An id from another account, or one that does not exist, is null. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • storefrontDeliveryEstimateUpdate (Experimental) — Change the storefront delivery estimate and return it. Fields you leave out keep their values. Changing a setting that’s on, or turning one on or off, reaches shoppers right away, so it fails with STOREFRONT_SETTING_LIVE (409) and changes nothing unless confirmLiveChange is true. An invalid value fails with INVALID_STOREFRONT_SETTING (400).
  • storefrontProgressBarUpdate (Experimental) — Change the cart progress bar and return it, or null after turning it off. While it’s on, fields you leave out keep their values. Turning it on from off needs threshold, belowThresholdText, reachedThresholdText and color. Changing a setting that’s on, or turning one on or off, reaches shoppers right away, so it fails with STOREFRONT_SETTING_LIVE (409) and changes nothing unless confirmLiveChange is true. An invalid value fails with INVALID_STOREFRONT_SETTING (400).
  • subscriptionDeliveryProfileUpdate (Experimental) — Turn the Shopify delivery profile for subscriptions and pre-orders on or off, and return it. Turning it on writes to Shopify: it reuses the stored profile if that still exists there, so it’s safe to retry after a failure. Turning it off leaves the profile on Shopify and only stops Redo updating it. Changing a setting that’s on, or turning one on or off, reaches shoppers right away, so it fails with STOREFRONT_SETTING_LIVE (409) and changes nothing unless confirmLiveChange is true. Null if the store has no Shopify integration.
  • updateCheckoutExperience — Change a checkout experience’s settings. Only the fields you send are changed. Changes to an experience that is live in the checkout tree take effect for shoppers immediately. An id from another account, or one that does not exist, is null. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • updateShippingMethod — Replace a shipping method’s configuration. The request replaces the whole method, so read it from the experience first and send it back with your changes applied. Configuration the API does not expose, such as shipping discount rules, is kept from the existing method, as is priceConstraints when you omit it. Any other optional field you leave out is cleared. A method’s type can be changed. On a CUSTOM method, omit code to keep the current script; moving to CUSTOM from another type needs code. Read the current script from customShippingMethodCode (experimental). An agent or an automation cannot send code. An id from another account, or one that does not exist, is null. An invalid request fails with INVALID_CHECKOUT_REQUEST (400).
  • upsellPageCreate (Experimental) — Create an upsell page. Nobody sees it until the flow or a checkout experience uses it. INVALID_UPSELL_PAGE (400) for a bad page; CONVERSION_FEATURE_LOCKED (409) when post-purchase is locked for the store. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • upsellPageDelete (Experimental) — Permanently delete an upsell page. False if it doesn’t exist, or belongs to another store. A page in use can’t be deleted: UPSELL_PAGE_IN_USE (409). CONVERSION_FEATURE_LOCKED (409) when post-purchase is locked for the store. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • upsellPageDuplicate (Experimental) — Copy an upsell page, adding “(copy)” to its name. Nobody sees the copy until the flow or a checkout experience uses it. An id from another store is null, as is one that doesn’t exist. CONVERSION_FEATURE_LOCKED (409) when post-purchase is locked for the store. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.
  • upsellPageUpdate (Experimental) — Replace a whole upsell page. A page in use (inUse) changes for shoppers at once, so that needs confirmLiveChange, or fails with UPSELL_PAGE_LIVE (409). An id from another store is null, as is one that doesn’t exist. INVALID_UPSELL_PAGE (400) for a bad page; CONVERSION_FEATURE_LOCKED (409) when post-purchase is locked for the store. POST_PURCHASE_FLOW_UNREADABLE (409) when the stored flow can’t be read.

Objects

Input objects

Enums