---
updatedAt: 2025-10-11T20:16:23.000Z
agentTools:
  projectIndex: https://docs.getgreenspark.com/llms.txt
---

# Spend level widget

Fetching a widget that describes a given store’s spend level impact settings.

<Image title="Spend Level Widget.png" alt={247} width="smart" src="https://files.readme.io/d07450d-Spend_Level_Widget.png">
  Widget example
</Image>

<Image title="popup.png" alt={578} src="https://files.readme.io/c230346-popup.png">
  Popup example
</Image>

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "widget-api",
    "version": "2.2.0"
  },
  "servers": [
    {
      "url": "https://api.getgreenspark.com/"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/widgets/spend-level-widget": {
      "post": {
        "summary": "Spend level widget",
        "description": "Fetching a widget that describes a given store’s spend level impact settings.",
        "operationId": "spend-level-widget",
        "parameters": [
          {
            "name": "lng",
            "in": "query",
            "description": "Set the widget's language. Currently supported languages are: English (en), German (de)",
            "schema": {
              "type": "string",
              "default": "en"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "shopUniqueName",
                  "color",
                  "currency"
                ],
                "properties": {
                  "shopUniqueName": {
                    "type": "string",
                    "description": "The name of your store as it is saved in Greenspark. For example: example.myshopify.com",
                    "default": "YOUR-SHOP-NAME"
                  },
                  "color": {
                    "type": "string",
                    "description": "Set the widget colour. Current options include: \"beige\" | \"green\" | \"blue\" | \"white\" | \"black\"",
                    "default": "green"
                  },
                  "currency": {
                    "type": "string",
                    "description": "This is the customer or shop currency. For example: \"USD\" | \"GBP\" | \"EUR\" | \"AUD\" | \"NZD\"",
                    "default": "USD"
                  },
                  "withPopup": {
                    "type": "boolean",
                    "description": "Adds a popup for the response, triggered by clicking on the widget",
                    "default": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```