---
updatedAt: 2025-05-20T21:54:18.000Z
agentTools:
  projectIndex: https://shop-and-pay.readme.io/llms.txt
---

# Retrieve Designs

**Note for NodeJS**: You need to install the following modules:\
*npm i axios crypto-js qs*

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "api-settings",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://api.shop-and-pay.com/v1.0"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/Design/": {
      "get": {
        "summary": "Retrieve Designs",
        "description": "",
        "operationId": "retrieve-all-designs",
        "parameters": [
          {
            "name": "instance",
            "in": "query",
            "description": "Your Shop & Pay instance name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/x-www-form-urlencoded": {
              "schema": {
                "type": "object",
                "properties": {
                  "offset": {
                    "type": "integer",
                    "description": "Row count to be used as offset",
                    "format": "int32"
                  },
                  "limit": {
                    "type": "integer",
                    "description": "Max row count",
                    "format": "int32"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Raw": {
                    "value": "{  \n    \"status\":\"success\",\n    \"data\":[  \n        {  \n            \"uuid\":\"f45aff72\",\n            \"default\":0,\n            \"name\":\"Example Design (via API)\",\n            \"fontFamily\":\"Arial\",\n            \"fontSize\":\"14\",\n            \"textColor\":\"24363A\",\n            \"textColorVPOS\":\"24363a\",\n            \"linkColor\":\"0074D6\",\n            \"linkHoverColor\":\"2A6496\",\n            \"buttonColor\":\"99CC33\",\n            \"buttonHoverColor\":\"19B8F2\",\n            \"background\":\"color\",\n            \"backgroundColor\":\"F9FAFA\",\n            \"headerBackground\":\"color\",\n            \"headerBackgroundColor\":\"00AFF0\",\n            \"emailHeaderBackgroundColor\":\"FAFAFA\",\n            \"headerImageShape\":\"square\",\n            \"useIndividualEmailLogo\":0,\n            \"logoBackgroundColor\":\"FFFFFF\",\n            \"logoBorderColor\":\"DDDDDD\",\n            \"VPOSGradientColor1\":\"00AFF0\",\n            \"VPOSGradientColor2\":\"00AFF0\",\n            \"enableRoundedCorners\":1,\n            \"headerImage\":\"shopandpay\n          -logo.png\",\n            \"backgroundImage\":\"\",\n            \"headerBackgroundImage\":\"\",\n            \"emailHeaderImage\":\"\"\n        }\n    ]\n}"
                  }
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "apiSignature=`echo -n \"\" | openssl dgst -sha256 -hmac \"INSTANCE_API_SECRET\" -binary | openssl enc -base64`\ncurl --request GET \"https://api.shop-and-pay.com/v1.0/Design/?instance=INSTANCE_NAME\" --data-urlencode \"ApiSignature=$apiSignature\""
            },
            {
              "language": "php",
              "code": "<?php\n\nuse Shopandpay\\Models\\Request\\Design;\nuse Shopandpay\\Shopandpay;\nuse Shopandpay\\ShopandpayException;\n\nspl_autoload_register(function ($class) {\n    $root = dirname(__DIR__);\n    $classFile = $root . '/lib/' . str_replace('\\\\', '/', $class) . '.php';\n    if (file_exists($classFile)) {\n        require_once $classFile;\n    }\n});\n\n// $instanceName is a part of the url where you access your shopandpay installation.\n// https://{$instanceName}.shop-and-pay.com\n$instanceName = 'YOUR_INSTANCE_NAME';\n\n// $secret is the shopandpay secret for the communication between the applications\n// if you think someone got your secret, just regenerate it in the shopandpay administration\n$secret = 'YOUR_SECRET';\n\n$shopandpay = new Shopandpay($instanceName, $secret);\n\n$design = new Design();\n\ntry {\n    $response = $shopandpay->getAll();\n    var_dump($response);\n} catch (ShopandpayException $e) {\n    print $e->getMessage();\n}\n"
            },
            {
              "language": "python",
              "code": "import urllib.request\nimport hmac\nimport hashlib\nimport base64\nimport json\n\npost_data = {}\n\ndata = urllib.parse.urlencode(post_data).encode('UTF-8')\n\ndig = hmac.new(b'INSTANCE_API_SECRET', msg=data, digestmod=hashlib.sha256).digest()\npost_data['ApiSignature'] = base64.b64encode(dig).decode()\npost_data['instance'] = 'INSTANCE_NAME'\n\ndata = urllib.parse.urlencode(post_data, quote_via=urllib.parse.quote).encode('UTF-8')\n\nresult = urllib.request.urlopen('https://api.shop-and-pay.com/v1.0/Design/?' + data)\ncontent = result.read().decode('UTF-8')\nresponse = json.loads(content)\ndesigns = response['data']\nprint(designs)"
            },
            {
              "language": "node",
              "code": "// shopandpay.js module content:\nconst qs = require('qs')\nconst axios = require('axios')\nconst Base64 = require('crypto-js/enc-base64')\nconst hmacSHA256 = require('crypto-js/hmac-sha256')\n\nconst baseUrl = 'https://api.shop-and-pay.com/v1.0/'\n\nexports.init = function (instance, secret) {\n\n  function buildSignature (query = '') {\n    return Base64.stringify(hmacSHA256(query, secret))\n  }\n\n  function buildBaseUrl (path) {\n    return baseUrl + path + '?instance=' + instance\n  }\n\n  return {\n    getDesigns: function () {\n      const baseUrl = buildBaseUrl('Design/')\n      const url = baseUrl + '&ApiSignature=' + buildSignature()\n      return axios.get(url)\n    }\n  }\n}\n\n// where you want to consume the shopandpay module:\nconst shopandpay = shopandpay.init(instance, api_secret)\nconst response = await shopandpay.getDesigns()\n\nif (response.status === 200) {\n  const designs = response.data\n  // here you will get the design\n}",
              "name": "NodeJS"
            }
          ],
          "samples-languages": [
            "curl",
            "php",
            "python",
            "node"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": false,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```