checkout Branding Upsertmutation
Requires access to checkout branding settings and the shop must be on a Plus plan or a Development store plan. User must have preferences
permission to modify.
Updates the checkout branding settings for a checkout profile.
If the settings don't exist, then new settings are created. The checkout branding settings applied to a published checkout profile will be immediately visible within the store's checkout. The checkout branding settings applied to a draft checkout profile could be previewed within the admin checkout editor.
To learn more about updating checkout branding settings, refer to the checkout branding tutorial.
Arguments
Anchor to checkoutBrandingInputcheckoutBrandingInputThe input fields to use to upsert the checkout branding settings (pass null to reset them to default).
A globally-unique identifier.
CheckoutBrandingUpsertPayload returns
Returns the new checkout branding settings.
The list of errors that occurred from executing the mutation.
Code examples for MUTATION: checkoutBrandingUpsert
Query Reference for MUTATION: checkoutBrandingUpsert
"mutation checkoutBrandingUpsert($checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n # CheckoutBranding fields\n }\n userErrors {\n field\n message\n }\n }\n}"
Input Reference for MUTATION: checkoutBrandingUpsert
"{\n \"checkoutBrandingInput\": {\n \"customizations\": {\n \"buyerJourney\": {\n \"visibility\": \"HIDDEN\"\n },\n \"cartLink\": {\n \"visibility\": \"HIDDEN\"\n },\n \"checkbox\": {\n \"cornerRadius\": \"BASE\"\n },\n \"choiceList\": {\n \"group\": {\n \"spacing\": \"BASE\"\n }\n },\n \"content\": {\n \"divider\": {\n \"borderStyle\": \"BASE\",\n \"borderWidth\": \"BASE\",\n \"visibility\": \"HIDDEN\"\n }\n },\n \"control\": {\n \"border\": \"FULL\",\n \"color\": \"TRANSPARENT\",\n \"cornerRadius\": \"BASE\",\n \"labelPosition\": \"INSIDE\"\n },\n \"divider\": {\n \"borderStyle\": \"BASE\",\n \"borderWidth\": \"BASE\"\n },\n \"expressCheckout\": {\n \"button\": {\n \"cornerRadius\": \"BASE\"\n }\n },\n \"favicon\": {\n \"mediaImageId\": \"gid://shopify/<objectName>/10079785100\"\n },\n \"footer\": {\n \"alignment\": \"CENTER\",\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"content\": {\n \"visibility\": \"HIDDEN\"\n },\n \"divided\": true,\n \"padding\": \"BASE\",\n \"position\": \"END\"\n },\n \"global\": {\n \"cornerRadius\": \"NONE\",\n \"typography\": {\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\"\n }\n },\n \"header\": {\n \"alignment\": \"CENTER\",\n \"banner\": {\n \"mediaImageId\": \"gid://shopify/<objectName>/10079785100\"\n },\n \"cartLink\": {\n \"contentType\": \"ICON\",\n \"image\": {\n \"mediaImageId\": \"gid://shopify/<objectName>/10079785100\"\n }\n },\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"divided\": true,\n \"logo\": {\n \"image\": {\n \"mediaImageId\": \"gid://shopify/<objectName>/10079785100\"\n },\n \"maxWidth\": 1,\n \"visibility\": \"HIDDEN\"\n },\n \"padding\": \"BASE\",\n \"position\": \"INLINE\"\n },\n \"headingLevel1\": {\n \"typography\": {\n \"font\": \"PRIMARY\",\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\",\n \"size\": \"BASE\",\n \"weight\": \"BASE\"\n }\n },\n \"headingLevel2\": {\n \"typography\": {\n \"font\": \"PRIMARY\",\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\",\n \"size\": \"BASE\",\n \"weight\": \"BASE\"\n }\n },\n \"headingLevel3\": {\n \"typography\": {\n \"font\": \"PRIMARY\",\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\",\n \"size\": \"BASE\",\n \"weight\": \"BASE\"\n }\n },\n \"main\": {\n \"backgroundImage\": {\n \"mediaImageId\": \"gid://shopify/<objectName>/10079785100\"\n },\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"divider\": {\n \"borderStyle\": \"BASE\",\n \"borderWidth\": \"BASE\",\n \"visibility\": \"HIDDEN\"\n },\n \"section\": {\n \"background\": \"BASE\",\n \"border\": \"FULL\",\n \"borderStyle\": \"BASE\",\n \"borderWidth\": \"BASE\",\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"cornerRadius\": \"BASE\",\n \"padding\": \"BASE\",\n \"shadow\": \"BASE\"\n }\n },\n \"merchandiseThumbnail\": {\n \"border\": \"FULL\",\n \"cornerRadius\": \"BASE\"\n },\n \"orderSummary\": {\n \"backgroundImage\": {\n \"mediaImageId\": \"gid://shopify/<objectName>/10079785100\"\n },\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"divider\": {\n \"borderStyle\": \"BASE\",\n \"borderWidth\": \"BASE\",\n \"visibility\": \"HIDDEN\"\n },\n \"section\": {\n \"background\": \"BASE\",\n \"border\": \"FULL\",\n \"borderStyle\": \"BASE\",\n \"borderWidth\": \"BASE\",\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"cornerRadius\": \"BASE\",\n \"padding\": \"BASE\",\n \"shadow\": \"BASE\"\n }\n },\n \"primaryButton\": {\n \"background\": \"NONE\",\n \"blockPadding\": \"BASE\",\n \"border\": \"FULL\",\n \"cornerRadius\": \"BASE\",\n \"inlinePadding\": \"BASE\",\n \"typography\": {\n \"font\": \"PRIMARY\",\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\",\n \"size\": \"BASE\",\n \"weight\": \"BASE\"\n }\n },\n \"secondaryButton\": {\n \"background\": \"NONE\",\n \"blockPadding\": \"BASE\",\n \"border\": \"FULL\",\n \"cornerRadius\": \"BASE\",\n \"inlinePadding\": \"BASE\",\n \"typography\": {\n \"font\": \"PRIMARY\",\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\",\n \"size\": \"BASE\",\n \"weight\": \"BASE\"\n }\n },\n \"select\": {\n \"border\": \"BLOCK_END\",\n \"typography\": {\n \"font\": \"PRIMARY\",\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\",\n \"size\": \"BASE\",\n \"weight\": \"BASE\"\n }\n },\n \"textField\": {\n \"border\": \"BLOCK_END\",\n \"typography\": {\n \"font\": \"PRIMARY\",\n \"kerning\": \"BASE\",\n \"letterCase\": \"LOWER\",\n \"size\": \"BASE\",\n \"weight\": \"BASE\"\n }\n }\n },\n \"designSystem\": {\n \"colors\": {\n \"global\": {\n \"accent\": \"<your-accent>\",\n \"brand\": \"<your-brand>\",\n \"critical\": \"<your-critical>\",\n \"decorative\": \"<your-decorative>\",\n \"info\": \"<your-info>\",\n \"success\": \"<your-success>\",\n \"warning\": \"<your-warning>\"\n },\n \"schemes\": {\n \"scheme1\": {\n \"base\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"control\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"selected\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"text\": \"<your-text>\"\n },\n \"primaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"secondaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n }\n },\n \"scheme2\": {\n \"base\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"control\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"selected\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"text\": \"<your-text>\"\n },\n \"primaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"secondaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n }\n },\n \"scheme3\": {\n \"base\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"control\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"selected\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"text\": \"<your-text>\"\n },\n \"primaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"secondaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n }\n },\n \"scheme4\": {\n \"base\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"control\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"selected\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"text\": \"<your-text>\"\n },\n \"primaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"secondaryButton\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"hover\": {\n \"accent\": \"<your-accent>\",\n \"background\": \"<your-background>\",\n \"border\": \"<your-border>\",\n \"decorative\": \"<your-decorative>\",\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n },\n \"icon\": \"<your-icon>\",\n \"text\": \"<your-text>\"\n }\n }\n }\n },\n \"cornerRadius\": {\n \"base\": 1,\n \"large\": 1,\n \"small\": 1\n },\n \"typography\": {\n \"primary\": {\n \"customFontGroup\": {\n \"base\": {\n \"genericFileId\": \"gid://shopify/<objectName>/10079785100\",\n \"weight\": 1\n },\n \"bold\": {\n \"genericFileId\": \"gid://shopify/<objectName>/10079785100\",\n \"weight\": 1\n },\n \"loadingStrategy\": \"AUTO\"\n },\n \"shopifyFontGroup\": {\n \"baseWeight\": 1,\n \"boldWeight\": 1,\n \"loadingStrategy\": \"AUTO\",\n \"name\": \"<your-name>\"\n }\n },\n \"secondary\": {\n \"customFontGroup\": {\n \"base\": {\n \"genericFileId\": \"gid://shopify/<objectName>/10079785100\",\n \"weight\": 1\n },\n \"bold\": {\n \"genericFileId\": \"gid://shopify/<objectName>/10079785100\",\n \"weight\": 1\n },\n \"loadingStrategy\": \"AUTO\"\n },\n \"shopifyFontGroup\": {\n \"baseWeight\": 1,\n \"boldWeight\": 1,\n \"loadingStrategy\": \"AUTO\",\n \"name\": \"<your-name>\"\n }\n },\n \"size\": {\n \"base\": 1.1,\n \"ratio\": 1.1\n }\n }\n }\n },\n \"checkoutProfileId\": \"gid://shopify/<objectName>/10079785100\"\n}"
Schema Reference for MUTATION: checkoutBrandingUpsert
"input CheckoutBrandingInput {\n customizations: CheckoutBrandingCustomizationsInput\n designSystem: CheckoutBrandingDesignSystemInput\n}\n\ninput CheckoutBrandingCustomizationsInput {\n buyerJourney: CheckoutBrandingBuyerJourneyInput\n cartLink: CheckoutBrandingCartLinkInput\n checkbox: CheckoutBrandingCheckboxInput\n choiceList: CheckoutBrandingChoiceListInput\n content: CheckoutBrandingContentInput\n control: CheckoutBrandingControlInput\n divider: CheckoutBrandingDividerStyleInput\n expressCheckout: CheckoutBrandingExpressCheckoutInput\n favicon: CheckoutBrandingImageInput\n footer: CheckoutBrandingFooterInput\n global: CheckoutBrandingGlobalInput\n header: CheckoutBrandingHeaderInput\n headingLevel1: CheckoutBrandingHeadingLevelInput\n headingLevel2: CheckoutBrandingHeadingLevelInput\n headingLevel3: CheckoutBrandingHeadingLevelInput\n main: CheckoutBrandingMainInput\n merchandiseThumbnail: CheckoutBrandingMerchandiseThumbnailInput\n orderSummary: CheckoutBrandingOrderSummaryInput\n primaryButton: CheckoutBrandingButtonInput\n secondaryButton: CheckoutBrandingButtonInput\n select: CheckoutBrandingSelectInput\n textField: CheckoutBrandingTextFieldInput\n}\n\ninput CheckoutBrandingDesignSystemInput {\n colors: CheckoutBrandingColorsInput\n cornerRadius: CheckoutBrandingCornerRadiusVariablesInput\n typography: CheckoutBrandingTypographyInput\n}\n"
Display Examples for MUTATION: checkoutBrandingUpsert
[ { "example": { "type_name": "checkoutbrandingupsert", "title": "Apply section styles to main and order summary", "query_string": "mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n main {\n section {\n cornerRadius\n colorScheme\n shadow\n padding\n }\n }\n orderSummary {\n section {\n colorScheme\n shadow\n padding\n border\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}", "variables": { "checkoutProfileId": "gid://shopify/CheckoutProfile/235093654", "input": { "customizations": { "main": { "section": { "cornerRadius": "LARGE", "colorScheme": "COLOR_SCHEME2", "shadow": "LARGE_200", "padding": "LARGE_400" } }, "orderSummary": { "section": { "colorScheme": "COLOR_SCHEME1", "shadow": "LARGE_200", "padding": "LARGE_400", "border": "FULL" } } } } }, "response": { "data": { "checkoutBrandingUpsert": { "checkoutBranding": { "customizations": { "main": { "section": { "cornerRadius": "LARGE", "colorScheme": "COLOR_SCHEME2", "shadow": "LARGE_200", "padding": "LARGE_400" } }, "orderSummary": { "section": { "colorScheme": "COLOR_SCHEME1", "shadow": "LARGE_200", "padding": "LARGE_400", "border": "FULL" } } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2024-04", "maximum_api_version": "unstable", "location": "/components/checkouts/graph_api/test/unit/graph_api/admin/mutations/checkout_branding_upsert_tests/checkout_branding_upsert_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) { checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) { checkoutBranding { customizations { main { section { cornerRadius colorScheme shadow padding } } orderSummary { section { colorScheme shadow padding border } } } } userErrors { field message } } }\",\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"main\": {\n \"section\": {\n \"cornerRadius\": \"LARGE\",\n \"colorScheme\": \"COLOR_SCHEME2\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\"\n }\n },\n \"orderSummary\": {\n \"section\": {\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\",\n \"border\": \"FULL\"\n }\n }\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n main {\n section {\n cornerRadius\n colorScheme\n shadow\n padding\n }\n }\n orderSummary {\n section {\n colorScheme\n shadow\n padding\n border\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"main\": {\n \"section\": {\n \"cornerRadius\": \"LARGE\",\n \"colorScheme\": \"COLOR_SCHEME2\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\"\n }\n },\n \"orderSummary\": {\n \"section\": {\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\",\n \"border\": \"FULL\"\n }\n }\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n main {\n section {\n cornerRadius\n colorScheme\n shadow\n padding\n }\n }\n orderSummary {\n section {\n colorScheme\n shadow\n padding\n border\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"main\": {\n \"section\": {\n \"cornerRadius\": \"LARGE\",\n \"colorScheme\": \"COLOR_SCHEME2\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\"\n }\n },\n \"orderSummary\": {\n \"section\": {\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\",\n \"border\": \"FULL\"\n }\n }\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n main {\n section {\n cornerRadius\n colorScheme\n shadow\n padding\n }\n }\n orderSummary {\n section {\n colorScheme\n shadow\n padding\n border\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"main\": {\n \"section\": {\n \"cornerRadius\": \"LARGE\",\n \"colorScheme\": \"COLOR_SCHEME2\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\"\n }\n },\n \"orderSummary\": {\n \"section\": {\n \"colorScheme\": \"COLOR_SCHEME1\",\n \"shadow\": \"LARGE_200\",\n \"padding\": \"LARGE_400\",\n \"border\": \"FULL\"\n }\n }\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation ApplySectionStyles($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n main {\n section {\n cornerRadius\n colorScheme\n shadow\n padding\n }\n }\n orderSummary {\n section {\n colorScheme\n shadow\n padding\n border\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"checkoutProfileId\" => \"gid://shopify/CheckoutProfile/235093654\",\n \"input\" => [\n \"customizations\" => [\n \"main\" => [\n \"section\" => [\n \"cornerRadius\" => \"LARGE\",\n \"colorScheme\" => \"COLOR_SCHEME2\",\n \"shadow\" => \"LARGE_200\",\n \"padding\" => \"LARGE_400\",\n ],\n ],\n \"orderSummary\" => [\n \"section\" => [\n \"colorScheme\" => \"COLOR_SCHEME1\",\n \"shadow\" => \"LARGE_200\",\n \"padding\" => \"LARGE_400\",\n \"border\" => \"FULL\",\n ],\n ],\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "checkoutProfileId", "description": "A globally-unique identifier.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutProfileId", "argValue": " \"gid://shopify/CheckoutProfile/235093654\"", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "checkoutbrandingupsert", "title": "Modify a color scheme", "query_string": "mutation ChangeScheme2Colors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme2 {\n base {\n background\n text\n }\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n}", "variables": { "checkoutProfileId": "gid://shopify/CheckoutProfile/235093654", "input": { "designSystem": { "colors": { "schemes": { "scheme2": { "base": { "background": "#cdf7f3", "text": "#1f2928" } } } } } } }, "response": { "data": { "checkoutBrandingUpsert": { "checkoutBranding": { "designSystem": { "colors": { "schemes": { "scheme2": { "base": { "background": "#cdf7f3", "text": "#1f2928" } } } } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/checkouts/graph_api/test/unit/graph_api/admin/mutations/checkout_branding_upsert_tests/checkout_branding_upsert_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation ChangeScheme2Colors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) { checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) { checkoutBranding { designSystem { colors { schemes { scheme2 { base { background text } } } } } } userErrors { message } } }\",\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": {\n \"scheme2\": {\n \"base\": {\n \"background\": \"#cdf7f3\",\n \"text\": \"#1f2928\"\n }\n }\n }\n }\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation ChangeScheme2Colors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme2 {\n base {\n background\n text\n }\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n {\n variables: {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": {\n \"scheme2\": {\n \"base\": {\n \"background\": \"#cdf7f3\",\n \"text\": \"#1f2928\"\n }\n }\n }\n }\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation ChangeScheme2Colors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme2 {\n base {\n background\n text\n }\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": {\n \"scheme2\": {\n \"base\": {\n \"background\": \"#cdf7f3\",\n \"text\": \"#1f2928\"\n }\n }\n }\n }\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation ChangeScheme2Colors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme2 {\n base {\n background\n text\n }\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": {\n \"scheme2\": {\n \"base\": {\n \"background\": \"#cdf7f3\",\n \"text\": \"#1f2928\"\n }\n }\n }\n }\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation ChangeScheme2Colors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme2 {\n base {\n background\n text\n }\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"checkoutProfileId\" => \"gid://shopify/CheckoutProfile/235093654\",\n \"input\" => [\n \"designSystem\" => [\n \"colors\" => [\n \"schemes\" => [\n \"scheme2\" => [\n \"base\" => [\n \"background\" => \"#cdf7f3\",\n \"text\" => \"#1f2928\",\n ],\n ],\n ],\n ],\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "checkoutProfileId", "description": "A globally-unique identifier.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutProfileId", "argValue": " \"gid://shopify/CheckoutProfile/235093654\"", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "checkoutbrandingupsert", "title": "Modify checkout font settings", "query_string": "mutation SetShopifyFonts($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n typography {\n size {\n base\n ratio\n }\n primary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n secondary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n}", "variables": { "checkoutProfileId": "gid://shopify/CheckoutProfile/235093654", "input": { "designSystem": { "typography": { "primary": { "shopifyFontGroup": { "name": "Univers Next" } }, "secondary": { "shopifyFontGroup": { "name": "Univers Next" } } } } } }, "response": { "data": { "checkoutBrandingUpsert": { "checkoutBranding": { "designSystem": { "typography": { "size": { "base": 14, "ratio": 1.2 }, "primary": { "name": "Univers Next", "base": { "weight": 400 }, "bold": { "weight": 700 } }, "secondary": { "name": "Univers Next", "base": { "weight": 400 }, "bold": { "weight": 700 } } } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/checkouts/graph_api/test/unit/graph_api/admin/mutations/checkout_branding_upsert_tests/checkout_branding_upsert_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation SetShopifyFonts($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) { checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) { checkoutBranding { designSystem { typography { size { base ratio } primary { name base { weight } bold { weight } } secondary { name base { weight } bold { weight } } } } } userErrors { message } } }\",\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"typography\": {\n \"primary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n },\n \"secondary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n }\n }\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation SetShopifyFonts($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n typography {\n size {\n base\n ratio\n }\n primary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n secondary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n {\n variables: {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"typography\": {\n \"primary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n },\n \"secondary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n }\n }\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation SetShopifyFonts($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n typography {\n size {\n base\n ratio\n }\n primary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n secondary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"typography\": {\n \"primary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n },\n \"secondary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n }\n }\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation SetShopifyFonts($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n typography {\n size {\n base\n ratio\n }\n primary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n secondary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"typography\": {\n \"primary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n },\n \"secondary\": {\n \"shopifyFontGroup\": {\n \"name\": \"Univers Next\"\n }\n }\n }\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation SetShopifyFonts($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n typography {\n size {\n base\n ratio\n }\n primary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n secondary {\n name\n base {\n weight\n }\n bold {\n weight\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"checkoutProfileId\" => \"gid://shopify/CheckoutProfile/235093654\",\n \"input\" => [\n \"designSystem\" => [\n \"typography\" => [\n \"primary\" => [\n \"shopifyFontGroup\" => [\n \"name\" => \"Univers Next\",\n ],\n ],\n \"secondary\" => [\n \"shopifyFontGroup\" => [\n \"name\" => \"Univers Next\",\n ],\n ],\n ],\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "checkoutProfileId", "description": "A globally-unique identifier.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutProfileId", "argValue": " \"gid://shopify/CheckoutProfile/235093654\"", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "checkoutbrandingupsert", "title": "Modify global colors", "query_string": "mutation ChangeGlobalColors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n global {\n success\n warning\n critical\n info\n brand\n accent\n decorative\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n}", "variables": { "checkoutProfileId": "gid://shopify/CheckoutProfile/235093654", "input": { "designSystem": { "colors": { "global": { "success": "#38e004", "warning": "#e0e004", "critical": "#e00404", "info": "#04e0e0", "brand": "#e004e0", "accent": "#04e004", "decorative": "#e0e0e0" } } } } }, "response": { "data": { "checkoutBrandingUpsert": { "checkoutBranding": { "designSystem": { "colors": { "global": { "success": "#38e004", "warning": "#e0e004", "critical": "#e00404", "info": "#04e0e0", "brand": "#e004e0", "accent": "#04e004", "decorative": "#e0e0e0" } } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/checkouts/graph_api/test/unit/graph_api/admin/mutations/checkout_branding_upsert_tests/checkout_branding_upsert_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation ChangeGlobalColors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) { checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) { checkoutBranding { designSystem { colors { global { success warning critical info brand accent decorative } } } } userErrors { message } } }\",\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"global\": {\n \"success\": \"#38e004\",\n \"warning\": \"#e0e004\",\n \"critical\": \"#e00404\",\n \"info\": \"#04e0e0\",\n \"brand\": \"#e004e0\",\n \"accent\": \"#04e004\",\n \"decorative\": \"#e0e0e0\"\n }\n }\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation ChangeGlobalColors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n global {\n success\n warning\n critical\n info\n brand\n accent\n decorative\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n {\n variables: {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"global\": {\n \"success\": \"#38e004\",\n \"warning\": \"#e0e004\",\n \"critical\": \"#e00404\",\n \"info\": \"#04e0e0\",\n \"brand\": \"#e004e0\",\n \"accent\": \"#04e004\",\n \"decorative\": \"#e0e0e0\"\n }\n }\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation ChangeGlobalColors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n global {\n success\n warning\n critical\n info\n brand\n accent\n decorative\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"global\": {\n \"success\": \"#38e004\",\n \"warning\": \"#e0e004\",\n \"critical\": \"#e00404\",\n \"info\": \"#04e0e0\",\n \"brand\": \"#e004e0\",\n \"accent\": \"#04e004\",\n \"decorative\": \"#e0e0e0\"\n }\n }\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation ChangeGlobalColors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n global {\n success\n warning\n critical\n info\n brand\n accent\n decorative\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"designSystem\": {\n \"colors\": {\n \"global\": {\n \"success\": \"#38e004\",\n \"warning\": \"#e0e004\",\n \"critical\": \"#e00404\",\n \"info\": \"#04e0e0\",\n \"brand\": \"#e004e0\",\n \"accent\": \"#04e004\",\n \"decorative\": \"#e0e0e0\"\n }\n }\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation ChangeGlobalColors($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n designSystem {\n colors {\n global {\n success\n warning\n critical\n info\n brand\n accent\n decorative\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"checkoutProfileId\" => \"gid://shopify/CheckoutProfile/235093654\",\n \"input\" => [\n \"designSystem\" => [\n \"colors\" => [\n \"global\" => [\n \"success\" => \"#38e004\",\n \"warning\" => \"#e0e004\",\n \"critical\" => \"#e00404\",\n \"info\" => \"#04e0e0\",\n \"brand\" => \"#e004e0\",\n \"accent\" => \"#04e004\",\n \"decorative\" => \"#e0e0e0\",\n ],\n ],\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "checkoutProfileId", "description": "A globally-unique identifier.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutProfileId", "argValue": " \"gid://shopify/CheckoutProfile/235093654\"", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "checkoutbrandingupsert", "title": "Reset all styling to defaults", "description": "Remove all checkout branding customizations and reset to the defaults.\n", "query_string": "mutation ChangeColorSchemeAndOrderSummary($checkoutBrandingInput: CheckoutBrandingInput, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n }\n }\n }\n }\n customizations {\n orderSummary {\n colorScheme\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}", "variables": { "checkoutProfileId": "gid://shopify/CheckoutProfile/235093654", "checkoutBrandingInput": null }, "response": { "data": { "checkoutBrandingUpsert": { "checkoutBranding": { "designSystem": null, "customizations": null }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2024-01", "maximum_api_version": "unstable", "location": "/components/checkouts/graph_api/test/unit/graph_api/admin/mutations/checkout_branding_upsert_tests/checkout_branding_upsert_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation ChangeColorSchemeAndOrderSummary($checkoutBrandingInput: CheckoutBrandingInput, $checkoutProfileId: ID!) { checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) { checkoutBranding { designSystem { colors { schemes { scheme1 { base { background text } } } } } customizations { orderSummary { colorScheme } } } userErrors { field message } } }\",\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": null\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation ChangeColorSchemeAndOrderSummary($checkoutBrandingInput: CheckoutBrandingInput, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n }\n }\n }\n }\n customizations {\n orderSummary {\n colorScheme\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": null\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation ChangeColorSchemeAndOrderSummary($checkoutBrandingInput: CheckoutBrandingInput, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n }\n }\n }\n }\n customizations {\n orderSummary {\n colorScheme\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": nil\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation ChangeColorSchemeAndOrderSummary($checkoutBrandingInput: CheckoutBrandingInput, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n }\n }\n }\n }\n customizations {\n orderSummary {\n colorScheme\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": null\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation ChangeColorSchemeAndOrderSummary($checkoutBrandingInput: CheckoutBrandingInput, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n }\n }\n }\n }\n customizations {\n orderSummary {\n colorScheme\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"checkoutProfileId\" => \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\" => null,\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "checkoutProfileId", "description": "A globally-unique identifier.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutProfileId", "argValue": " \"gid://shopify/CheckoutProfile/235093654\"", "typeKind": "MUTATION" }, { "arg": { "name": "checkoutBrandingInput", "description": "The input fields to use to upsert the checkout branding settings (pass null to reset them to default).", "type": { "kind": "INPUT_OBJECT", "name": "CheckoutBrandingInput", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "CheckoutBrandingInput", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutBrandingInput", "argValue": " null", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "checkoutbrandingupsert", "title": "Reset color schemes to the defaults", "description": "Remove the customizations made to a color scheme and reset the scheme to the defaults.\n", "query_string": "mutation ChangeColorScheme1($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n control {\n background\n border\n selected {\n background\n border\n }\n }\n primaryButton {\n hover {\n background\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n}", "variables": { "checkoutProfileId": "gid://shopify/CheckoutProfile/235093654", "checkoutBrandingInput": { "designSystem": { "colors": { "schemes": null } } } }, "response": { "data": { "checkoutBrandingUpsert": { "checkoutBranding": { "designSystem": { "colors": { "schemes": null } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/checkouts/graph_api/test/unit/graph_api/admin/mutations/checkout_branding_upsert_tests/checkout_branding_upsert_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation ChangeColorScheme1($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) { checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) { checkoutBranding { designSystem { colors { schemes { scheme1 { base { background text } control { background border selected { background border } } primaryButton { hover { background } } } } } } } userErrors { field message } } }\",\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": null\n }\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation ChangeColorScheme1($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n control {\n background\n border\n selected {\n background\n border\n }\n }\n primaryButton {\n hover {\n background\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n {\n variables: {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": null\n }\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation ChangeColorScheme1($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n control {\n background\n border\n selected {\n background\n border\n }\n }\n primaryButton {\n hover {\n background\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": null\n }\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation ChangeColorScheme1($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n control {\n background\n border\n selected {\n background\n border\n }\n }\n primaryButton {\n hover {\n background\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }`,\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\": {\n \"designSystem\": {\n \"colors\": {\n \"schemes\": null\n }\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation ChangeColorScheme1($checkoutBrandingInput: CheckoutBrandingInput!, $checkoutProfileId: ID!) {\n checkoutBrandingUpsert(checkoutBrandingInput: $checkoutBrandingInput, checkoutProfileId: $checkoutProfileId) {\n checkoutBranding {\n designSystem {\n colors {\n schemes {\n scheme1 {\n base {\n background\n text\n }\n control {\n background\n border\n selected {\n background\n border\n }\n }\n primaryButton {\n hover {\n background\n }\n }\n }\n }\n }\n }\n }\n userErrors {\n field\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"checkoutProfileId\" => \"gid://shopify/CheckoutProfile/235093654\",\n \"checkoutBrandingInput\" => [\n \"designSystem\" => [\n \"colors\" => [\n \"schemes\" => null,\n ],\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "checkoutProfileId", "description": "A globally-unique identifier.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutProfileId", "argValue": " \"gid://shopify/CheckoutProfile/235093654\"", "typeKind": "MUTATION" }, { "arg": { "name": "checkoutBrandingInput", "description": "The input fields to use to upsert the checkout branding settings (pass null to reset them to default).", "type": { "kind": "INPUT_OBJECT", "name": "CheckoutBrandingInput", "list": false, "non_null": false }, "defaultValue": null, "typeSignature": "CheckoutBrandingInput", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutBrandingInput", "argValue": " {\"designSystem\":{\"colors\":{\"schemes\":null}}}", "typeKind": "MUTATION" } ] }, { "example": { "type_name": "checkoutbrandingupsert", "title": "Set a checkout logo", "description": "Modify the logo for checkout branding settings with a file already uploaded to Shopify (must not be of SVG format). Use the [fileCreate](/api/admin-graphql/unstable/mutations/fileCreate) mutation to upload a new image to Shopify.\n", "query_string": "mutation SetLogo($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n header {\n logo {\n image {\n url\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n}", "variables": { "checkoutProfileId": "gid://shopify/CheckoutProfile/235093654", "input": { "customizations": { "header": { "logo": { "image": { "mediaImageId": null } } } } } }, "response": { "data": { "checkoutBrandingUpsert": { "checkoutBranding": { "customizations": { "header": { "logo": { "image": null } } } }, "userErrors": [] } } }, "api_name": "admin", "minimum_api_version": "2023-10", "maximum_api_version": "unstable", "location": "/components/checkouts/graph_api/test/unit/graph_api/admin/mutations/checkout_branding_upsert_tests/checkout_branding_upsert_test.rb", "curl_example": "curl -X POST \\\nhttps://your-development-store.myshopify.com/admin/api/2024-10/graphql.json \\\n-H 'Content-Type: application/json' \\\n-H 'X-Shopify-Access-Token: {access_token}' \\\n-d '{\n\"query\": \"mutation SetLogo($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) { checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) { checkoutBranding { customizations { header { logo { image { url } } } } } userErrors { message } } }\",\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"header\": {\n \"logo\": {\n \"image\": {\n \"mediaImageId\": null\n }\n }\n }\n }\n }\n }\n}'\n", "remix_example": "const { admin } = await authenticate.admin(request);\n\nconst response = await admin.graphql(\n `#graphql\n mutation SetLogo($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n header {\n logo {\n image {\n url\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n {\n variables: {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"header\": {\n \"logo\": {\n \"image\": {\n \"mediaImageId\": null\n }\n }\n }\n }\n }\n },\n },\n);\n\nconst data = await response.json();\n", "ruby_example": "session = ShopifyAPI::Auth::Session.new(\n shop: \"your-development-store.myshopify.com\",\n access_token: access_token\n)\nclient = ShopifyAPI::Clients::Graphql::Admin.new(\n session: session\n)\n\nquery = <<~QUERY\n mutation SetLogo($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n header {\n logo {\n image {\n url\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY\n\nvariables = {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"header\": {\n \"logo\": {\n \"image\": {\n \"mediaImageId\": null\n }\n }\n }\n }\n }\n}\n\nresponse = client.query(query: query, variables: variables)\n", "node_example": "const client = new shopify.clients.Graphql({session});\nconst data = await client.query({\n data: {\n \"query\": `mutation SetLogo($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n header {\n logo {\n image {\n url\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }`,\n \"variables\": {\n \"checkoutProfileId\": \"gid://shopify/CheckoutProfile/235093654\",\n \"input\": {\n \"customizations\": {\n \"header\": {\n \"logo\": {\n \"image\": {\n \"mediaImageId\": null\n }\n }\n }\n }\n }\n },\n },\n});\n", "php_example": "use Shopify\\Clients\\Graphql;\n\n$client = new Graphql(\"your-development-store.myshopify.com\", $accessToken);\n$query = <<<QUERY\n mutation SetLogo($checkoutProfileId: ID!, $input: CheckoutBrandingInput!) {\n checkoutBrandingUpsert(checkoutProfileId: $checkoutProfileId, checkoutBrandingInput: $input) {\n checkoutBranding {\n customizations {\n header {\n logo {\n image {\n url\n }\n }\n }\n }\n }\n userErrors {\n message\n }\n }\n }\nQUERY;\n\n$variables = [\n \"checkoutProfileId\" => \"gid://shopify/CheckoutProfile/235093654\",\n \"input\" => [\n \"customizations\" => [\n \"header\" => [\n \"logo\" => [\n \"image\" => [\n \"mediaImageId\" => null,\n ],\n ],\n ],\n ],\n ],\n];\n\n$response = $client->query([\"query\" => $query, \"variables\" => $variables]);\n" }, "titleStringKey": "variables", "inputVariableEntries": [ { "arg": { "name": "checkoutProfileId", "description": "A globally-unique identifier.", "type": { "kind": "SCALAR", "name": "ID", "list": false, "non_null": true }, "defaultValue": null, "typeSignature": "ID!", "isDeprecated": false, "deprecationReason": null, "kind": "ARGUMENT" }, "key": "checkoutProfileId", "argValue": " \"gid://shopify/CheckoutProfile/235093654\"", "typeKind": "MUTATION" } ] } ]