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

# Retrieve a Design

**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/{uuid}/": {
      "get": {
        "summary": "Retrieve a Design",
        "description": "",
        "operationId": "retrieve-a-design",
        "parameters": [
          {
            "name": "uuid",
            "in": "path",
            "description": "UUID of design to retrieve.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "instance",
            "in": "query",
            "description": "Your Shop & Pay instance name",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "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-logo.png\",\n            \"backgroundImage\":\"\",\n            \"headerBackgroundImage\":\"\",\n            \"emailHeaderImage\":\"\"\n        }\n    ]\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "example": "success"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "uuid": {
                            "type": "string",
                            "example": "f45aff72"
                          },
                          "default": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "name": {
                            "type": "string",
                            "example": "Example Design (via API)"
                          },
                          "fontFamily": {
                            "type": "string",
                            "example": "Arial"
                          },
                          "fontSize": {
                            "type": "string",
                            "example": "14"
                          },
                          "textColor": {
                            "type": "string",
                            "example": "24363A"
                          },
                          "textColorVPOS": {
                            "type": "string",
                            "example": "24363a"
                          },
                          "linkColor": {
                            "type": "string",
                            "example": "0074D6"
                          },
                          "linkHoverColor": {
                            "type": "string",
                            "example": "2A6496"
                          },
                          "buttonColor": {
                            "type": "string",
                            "example": "99CC33"
                          },
                          "buttonHoverColor": {
                            "type": "string",
                            "example": "19B8F2"
                          },
                          "background": {
                            "type": "string",
                            "example": "color"
                          },
                          "backgroundColor": {
                            "type": "string",
                            "example": "F9FAFA"
                          },
                          "headerBackground": {
                            "type": "string",
                            "example": "color"
                          },
                          "headerBackgroundColor": {
                            "type": "string",
                            "example": "00AFF0"
                          },
                          "emailHeaderBackgroundColor": {
                            "type": "string",
                            "example": "FAFAFA"
                          },
                          "headerImageShape": {
                            "type": "string",
                            "example": "square"
                          },
                          "useIndividualEmailLogo": {
                            "type": "integer",
                            "example": 0,
                            "default": 0
                          },
                          "logoBackgroundColor": {
                            "type": "string",
                            "example": "FFFFFF"
                          },
                          "logoBorderColor": {
                            "type": "string",
                            "example": "DDDDDD"
                          },
                          "VPOSGradientColor1": {
                            "type": "string",
                            "example": "00AFF0"
                          },
                          "VPOSGradientColor2": {
                            "type": "string",
                            "example": "00AFF0"
                          },
                          "enableRoundedCorners": {
                            "type": "integer",
                            "example": 1,
                            "default": 0
                          },
                          "headerImage": {
                            "type": "string",
                            "example": "shopandpay-logo.png"
                          },
                          "backgroundImage": {
                            "type": "string",
                            "example": ""
                          },
                          "headerBackgroundImage": {
                            "type": "string",
                            "example": ""
                          },
                          "emailHeaderImage": {
                            "type": "string",
                            "example": ""
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "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/1/?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$design->setId(1);\n\ntry {\n    $response = $shopandpay->getOne($design);\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/1/?' + data)\ncontent = result.read().decode('UTF-8')\nresponse = json.loads(content)\ndesign = response['data'][0]\nprint(design)"
            },
            {
              "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    getDesign: function (id) {\n      const baseUrl = buildBaseUrl('Design/' + id + '/')\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.getDesign(1)\n\nif (response.status === 200) {\n  const design = response.data.data[0]\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
}
```