{
  "openapi": "3.1.0",
  "info": {
    "title": "Sniffopotamus Partner API",
    "version": "1.0.0",
    "description": "Server-to-server fragrance cards. Operations marked planned are not released. Deployment and access are checked separately."
  },
  "servers": [
    {
      "url": "https://www.sniffopotamus.com/api/partner/v1"
    }
  ],
  "paths": {
    "/whoami": {
      "get": {
        "operationId": "getWhoami",
        "summary": "Check your key and usage",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Whoami"
                }
              }
            }
          },
          "400": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "401": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "403": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "404": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "409": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "410": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "413": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "422": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "429": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "500": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "503": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          }
        },
        "x-status": "implemented",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/whoami'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "const key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/whoami\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/whoami');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          }
        ]
      }
    },
    "/capabilities": {
      "get": {
        "operationId": "getCapabilities",
        "summary": "Check your workspace capabilities",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Capabilities"
                }
              }
            }
          },
          "400": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "401": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "403": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "404": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "409": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "410": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "413": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "422": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "429": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "500": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "503": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          }
        },
        "x-status": "implemented",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/capabilities'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "const key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/capabilities\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/capabilities');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          }
        ]
      }
    },
    "/fragrances/{id}/card": {
      "get": {
        "operationId": "getCard",
        "summary": "Read a fragrance card in a saved look or export a PNG",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful answer",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PartnerCardAnswer"
                    },
                    {
                      "$ref": "#/components/schemas/PartnerError"
                    }
                  ]
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "Escaped card fragment with inline styles. Use JSON and your own markup if your content security policy forbids inline styles."
                }
              }
            }
          },
          "304": {
            "description": "Unchanged card; no body and no call charged."
          },
          "400": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "401": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "403": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "404": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "409": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "410": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "413": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "422": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "429": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "500": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "503": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          }
        },
        "x-status": "implemented",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "const key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          },
          {
            "lang": "curl",
            "label": "curl PNG",
            "source": "# Save a square look named Square in your workspace before running this example.\n# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card?look=Square&format=png'"
          },
          {
            "lang": "Node",
            "label": "node PNG",
            "source": "// Save a square look named Square in your workspace before running this example.\nconst key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card?look=Square&format=png\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php PNG",
            "source": "<?php\n// Save a square look named Square in your workspace before running this example.\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/fragrances/03c188b7-74aa-469d-ae40-caa8c45673b7/card?look=Square&format=png');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          }
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "look",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Saved look id, current name or earlier name."
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "png",
                "html"
              ],
              "default": "json"
            }
          }
        ]
      }
    },
    "/products/{ref}/card": {
      "get": {
        "operationId": "getProductCard",
        "summary": "Read a card using your approved product reference",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful answer",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PartnerCardAnswer"
                    },
                    {
                      "$ref": "#/components/schemas/PartnerError"
                    }
                  ]
                }
              },
              "image/png": {
                "schema": {
                  "type": "string",
                  "format": "binary"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string",
                  "description": "Escaped card fragment with inline styles. Use JSON and your own markup if your content security policy forbids inline styles."
                }
              }
            }
          },
          "304": {
            "description": "Unchanged card; no body and no call charged."
          },
          "400": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "401": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "403": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "404": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "409": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "410": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "413": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "422": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "429": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "500": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "503": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          }
        },
        "x-status": "implemented",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# Approve product-1 in your business account before running this example.\n# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/products/product-1/card'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "// Approve product-1 in your business account before running this example.\nconst key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/products/product-1/card\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n// Approve product-1 in your business account before running this example.\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/products/product-1/card');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          },
          {
            "lang": "curl",
            "label": "curl",
            "source": "# Approve product-1 in your business account before running this example.\n# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/products/product-1/card?format=html'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "// Approve product-1 in your business account before running this example.\nconst key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/products/product-1/card?format=html\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n// Approve product-1 in your business account before running this example.\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/products/product-1/card?format=html');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          }
        ],
        "parameters": [
          {
            "name": "ref",
            "in": "path",
            "required": true,
            "schema": {
              "$schema": "https://json-schema.org/draft/2020-12/schema",
              "type": "string",
              "minLength": 1,
              "maxLength": 200,
              "pattern": "\\S",
              "description": "Your approved product reference, URL encoded."
            }
          },
          {
            "name": "look",
            "in": "query",
            "schema": {
              "type": "string",
              "description": "Saved look id, current name or earlier name."
            }
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "json",
                "png",
                "html"
              ],
              "default": "json"
            }
          }
        ]
      }
    },
    "/search": {
      "get": {
        "operationId": "searchPerfumes",
        "summary": "Find public perfumes by brand and name",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SearchAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "401": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "403": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "404": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "409": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "410": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "413": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "422": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "429": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "500": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "503": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          }
        },
        "x-status": "implemented",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/search?q=casafutura+xerjoff'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "const key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/search?q=casafutura+xerjoff\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/search?q=casafutura+xerjoff');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          }
        ],
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 25,
              "default": 10
            }
          }
        ]
      }
    },
    "/match": {
      "post": {
        "operationId": "matchProducts",
        "summary": "Suggest product links for review",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MatchAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "401": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "403": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "404": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "409": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "410": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "413": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "422": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "429": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "500": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "503": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          }
        },
        "x-status": "implemented",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request POST   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --header 'Content-Type: application/json' --data '{\"rows\":[{\"ref\":\"product-1\",\"brand\":\"Xerjoff\",\"name\":\"Casafutura\",\"strength\":\"Eau de Parfum\"},{\"ref\":\"product-2\",\"brand\":\"Dior\",\"name\":\"Sauvage\"},{\"ref\":\"product-3\",\"name\":\"A perfume that is not recorded\"}]}'   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/match'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "const key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/match\", { method: \"POST\", headers: { Authorization: \"Bearer \" + key, \"Content-Type\": \"application/json\" }, body: \"{\\\"rows\\\":[{\\\"ref\\\":\\\"product-1\\\",\\\"brand\\\":\\\"Xerjoff\\\",\\\"name\\\":\\\"Casafutura\\\",\\\"strength\\\":\\\"Eau de Parfum\\\"},{\\\"ref\\\":\\\"product-2\\\",\\\"brand\\\":\\\"Dior\\\",\\\"name\\\":\\\"Sauvage\\\"},{\\\"ref\\\":\\\"product-3\\\",\\\"name\\\":\\\"A perfume that is not recorded\\\"}]}\" });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/match');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'POST', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key, 'Content-Type: application/json'], CURLOPT_POSTFIELDS => '{\"rows\":[{\"ref\":\"product-1\",\"brand\":\"Xerjoff\",\"name\":\"Casafutura\",\"strength\":\"Eau de Parfum\"},{\"ref\":\"product-2\",\"brand\":\"Dior\",\"name\":\"Sauvage\"},{\"ref\":\"product-3\",\"name\":\"A perfume that is not recorded\"}]}']);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MatchRequest"
              }
            }
          }
        }
      }
    },
    "/looks": {
      "get": {
        "operationId": "listLooks",
        "summary": "List your own saved looks",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "Successful answer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LooksAnswer"
                }
              }
            }
          },
          "400": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "401": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "403": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "404": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "409": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "410": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "413": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "422": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "429": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "500": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          },
          "503": {
            "description": "The shared refusal shape; inspect error.code.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PartnerError"
                }
              }
            }
          }
        },
        "x-status": "implemented",
        "x-codeSamples": [
          {
            "lang": "curl",
            "label": "curl",
            "source": "# For a terminal session, paste at the silent prompt: read -rs SNIFF_PARTNER_KEY\ncurl --silent --show-error --fail-with-body --request GET   --header \"Authorization: Bearer ${SNIFF_PARTNER_KEY:?Set SNIFF_PARTNER_KEY in your server environment}\"   --write-out '\n%{http_code}' 'https://www.sniffopotamus.com/api/partner/v1/looks'"
          },
          {
            "lang": "Node",
            "label": "node",
            "source": "const key = process.env.SNIFF_PARTNER_KEY;\nif (!key) throw new Error(\"Set SNIFF_PARTNER_KEY in your server environment\");\nconst res = await fetch(\"https://www.sniffopotamus.com/api/partner/v1/looks\", { method: \"GET\", headers: { Authorization: \"Bearer \" + key } });\nif (res.headers.get(\"content-type\")?.includes(\"image/png\")) { process.stdout.write(Buffer.from(await res.arrayBuffer())); process.stdout.write(String.fromCharCode(10)); }\nelse console.log(await res.text());\nconsole.log(res.status);"
          },
          {
            "lang": "PHP",
            "label": "php",
            "source": "<?php\n$key = getenv('SNIFF_PARTNER_KEY');\nif (!$key) throw new RuntimeException('Set SNIFF_PARTNER_KEY in your server environment');\n$ch = curl_init('https://www.sniffopotamus.com/api/partner/v1/looks');\ncurl_setopt_array($ch, [CURLOPT_RETURNTRANSFER => true, CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $key]]);\n$body = curl_exec($ch);\nif ($body === false) throw new RuntimeException(curl_error($ch));\n$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);\ncurl_close($ch);\necho $body . PHP_EOL;\necho $status . PHP_EOL;"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "PartnerError": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": false
          },
          "status": {
            "type": "string",
            "enum": [
              "in_review",
              "not_found",
              "moved"
            ]
          },
          "moved_to": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
          },
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "product_not_linked",
                  "invalid_product_ref",
                  "person_only",
                  "not_a_candidate",
                  "invalid_rows",
                  "too_many_rows",
                  "body_too_large",
                  "invalid_query",
                  "draft_needs_preview",
                  "not_in_library_shape",
                  "remove_not_on_card",
                  "too_many_notes",
                  "order_not_on_card",
                  "order_duplicate",
                  "description_too_long",
                  "description_has_link",
                  "description_has_price",
                  "description_has_gender_label",
                  "moved",
                  "bad_format",
                  "bad_settings",
                  "picture_not_for_place",
                  "no_key",
                  "unknown_key",
                  "revoked",
                  "expired",
                  "suspended",
                  "not_entitled",
                  "over_allowance",
                  "rate_limited",
                  "invalid_id",
                  "in_review",
                  "not_found",
                  "card_failed",
                  "unavailable",
                  "use_key_tool",
                  "keys_by_code",
                  "unknown_claim",
                  "claim_used",
                  "claim_expired",
                  "claim_refused",
                  "not_from_a_browser",
                  "email_not_confirmed",
                  "too_many_businesses",
                  "website_not_allowed"
                ]
              },
              "message": {
                "type": "string"
              },
              "docs": {
                "type": "string",
                "format": "uri"
              },
              "resets_at": {
                "type": "string"
              }
            },
            "required": [
              "code",
              "message",
              "docs"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "ok",
          "error"
        ],
        "additionalProperties": false
      },
      "Whoami": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "api_version": {
            "type": "string"
          },
          "partner": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "today": {
            "type": "object",
            "properties": {
              "calls": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "public_hits": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "in_review": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "not_found": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "refused": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "calls",
              "public_hits",
              "in_review",
              "not_found",
              "refused"
            ],
            "additionalProperties": false
          },
          "month": {
            "type": "object",
            "properties": {
              "used": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "allowance": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "refused": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "resets_at": {
                "type": "string"
              }
            },
            "required": [
              "used",
              "allowance",
              "refused",
              "resets_at"
            ],
            "additionalProperties": false
          },
          "next": {
            "type": "object",
            "properties": {
              "capabilities": {
                "type": "string"
              },
              "docs": {
                "type": "string"
              }
            },
            "required": [
              "capabilities",
              "docs"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "ok",
          "api_version",
          "partner",
          "tier",
          "today",
          "month",
          "next"
        ],
        "additionalProperties": false
      },
      "Capabilities": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "api_version": {
            "type": "string"
          },
          "base_url": {
            "type": "string"
          },
          "docs": {
            "type": "string"
          },
          "console": {
            "type": "string"
          },
          "business": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              "name": {
                "type": "string"
              },
              "tier": {
                "type": "string"
              },
              "tier_name": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "tier",
              "tier_name"
            ],
            "additionalProperties": false
          },
          "usage": {
            "type": "object",
            "properties": {
              "used_this_month": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "allowance": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "resets_at": {
                "type": "string"
              },
              "counter": {
                "type": "string",
                "enum": [
                  "live",
                  "not_switched_on",
                  "unavailable"
                ]
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "used_this_month",
              "allowance",
              "resets_at",
              "counter"
            ],
            "additionalProperties": false
          },
          "endpoints": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "method": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "path": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "live",
                    "planned",
                    "not_switched_on"
                  ]
                },
                "costs": {
                  "type": "string"
                },
                "what": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "title",
                "method",
                "path",
                "status",
                "costs",
                "what"
              ],
              "additionalProperties": false
            }
          },
          "card_fields": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "strength": {
                "type": "string"
              },
              "year": {
                "type": "string"
              },
              "brand": {
                "type": "string"
              },
              "perfumers": {
                "type": "string"
              },
              "tiers": {
                "type": "string"
              },
              "families": {
                "type": "string"
              },
              "relationships": {
                "type": "string"
              },
              "description": {
                "type": "string"
              },
              "availability": {
                "type": "string"
              }
            },
            "required": [
              "id",
              "name",
              "strength",
              "year",
              "brand",
              "perfumers",
              "tiers",
              "families",
              "relationships",
              "description",
              "availability"
            ],
            "additionalProperties": false
          },
          "caching": {
            "type": "object",
            "properties": {
              "rule": {
                "type": "string"
              },
              "fresh_hours": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "keep_on_error_days": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "drop_on": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "http": {
                "type": "string"
              }
            },
            "required": [
              "rule",
              "fresh_hours",
              "keep_on_error_days",
              "drop_on",
              "http"
            ],
            "additionalProperties": false
          },
          "finding_ids": {
            "type": "string"
          },
          "test_ids": {
            "type": "object",
            "properties": {
              "public": {
                "type": "string"
              },
              "not_found": {
                "type": "string"
              },
              "invalid_id": {
                "type": "string"
              },
              "in_review": {
                "type": "null"
              },
              "note": {
                "type": "string"
              }
            },
            "required": [
              "public",
              "not_found",
              "invalid_id",
              "in_review",
              "note"
            ],
            "additionalProperties": false
          },
          "error_shape": {
            "type": "object",
            "properties": {
              "example": {
                "type": "object",
                "properties": {
                  "ok": {
                    "type": "boolean",
                    "const": false
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "in_review",
                      "not_found",
                      "moved"
                    ]
                  },
                  "moved_to": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                  },
                  "error": {
                    "type": "object",
                    "properties": {
                      "code": {
                        "type": "string",
                        "enum": [
                          "product_not_linked",
                          "invalid_product_ref",
                          "person_only",
                          "not_a_candidate",
                          "invalid_rows",
                          "too_many_rows",
                          "body_too_large",
                          "invalid_query",
                          "draft_needs_preview",
                          "not_in_library_shape",
                          "remove_not_on_card",
                          "too_many_notes",
                          "order_not_on_card",
                          "order_duplicate",
                          "description_too_long",
                          "description_has_link",
                          "description_has_price",
                          "description_has_gender_label",
                          "moved",
                          "bad_format",
                          "bad_settings",
                          "picture_not_for_place",
                          "no_key",
                          "unknown_key",
                          "revoked",
                          "expired",
                          "suspended",
                          "not_entitled",
                          "over_allowance",
                          "rate_limited",
                          "invalid_id",
                          "in_review",
                          "not_found",
                          "card_failed",
                          "unavailable",
                          "use_key_tool",
                          "keys_by_code",
                          "unknown_claim",
                          "claim_used",
                          "claim_expired",
                          "claim_refused",
                          "not_from_a_browser",
                          "email_not_confirmed",
                          "too_many_businesses",
                          "website_not_allowed"
                        ]
                      },
                      "message": {
                        "type": "string"
                      },
                      "docs": {
                        "type": "string",
                        "format": "uri"
                      },
                      "resets_at": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "code",
                      "message",
                      "docs"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "ok",
                  "error"
                ],
                "additionalProperties": false
              },
              "codes": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "product_not_linked",
                    "invalid_product_ref",
                    "person_only",
                    "not_a_candidate",
                    "invalid_rows",
                    "too_many_rows",
                    "body_too_large",
                    "invalid_query",
                    "draft_needs_preview",
                    "not_in_library_shape",
                    "remove_not_on_card",
                    "too_many_notes",
                    "order_not_on_card",
                    "order_duplicate",
                    "description_too_long",
                    "description_has_link",
                    "description_has_price",
                    "description_has_gender_label",
                    "moved",
                    "bad_format",
                    "bad_settings",
                    "picture_not_for_place",
                    "no_key",
                    "unknown_key",
                    "revoked",
                    "expired",
                    "suspended",
                    "not_entitled",
                    "over_allowance",
                    "rate_limited",
                    "invalid_id",
                    "in_review",
                    "not_found",
                    "card_failed",
                    "unavailable",
                    "use_key_tool",
                    "keys_by_code",
                    "unknown_claim",
                    "claim_used",
                    "claim_expired",
                    "claim_refused",
                    "not_from_a_browser",
                    "email_not_confirmed",
                    "too_many_businesses",
                    "website_not_allowed"
                  ]
                }
              },
              "docs": {
                "type": "string"
              }
            },
            "required": [
              "example",
              "codes",
              "docs"
            ],
            "additionalProperties": false
          },
          "rules": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "setup": {
            "type": "object",
            "properties": {
              "steps": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "keys_managed_by": {
                "type": "string"
              },
              "plan_checked_on": {
                "type": "string"
              },
              "prices": {
                "type": "string"
              },
              "contact": {
                "type": "string"
              }
            },
            "required": [
              "steps",
              "keys_managed_by",
              "plan_checked_on",
              "prices",
              "contact"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "ok",
          "api_version",
          "base_url",
          "docs",
          "console",
          "business",
          "usage",
          "endpoints",
          "card_fields",
          "caching",
          "finding_ids",
          "test_ids",
          "error_shape",
          "rules",
          "setup"
        ],
        "additionalProperties": false
      },
      "PartnerCardAnswer": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "anyOf": [
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "const": true
              },
              "status": {
                "type": "string",
                "const": "public"
              },
              "card": {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                  },
                  "name": {
                    "type": "string"
                  },
                  "strength": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "year": {
                    "anyOf": [
                      {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "brand": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "anyOf": [
                          {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "name": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "slug": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "countryCode": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "country": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "name",
                      "slug",
                      "countryCode",
                      "country"
                    ],
                    "additionalProperties": false
                  },
                  "perfumers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "slug": {
                          "anyOf": [
                            {
                              "type": "string"
                            },
                            {
                              "type": "null"
                            }
                          ]
                        }
                      },
                      "required": [
                        "name",
                        "slug"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "tiers": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "tier": {
                          "type": "string",
                          "enum": [
                            "top",
                            "heart",
                            "base",
                            "unknown"
                          ]
                        },
                        "heading": {
                          "type": "string"
                        },
                        "notes": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "anyOf": [
                                  {
                                    "type": "string",
                                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "name": {
                                "type": "string"
                              },
                              "slug": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "picture": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "shortDescription": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "linked": {
                                "type": "boolean"
                              }
                            },
                            "required": [
                              "id",
                              "name",
                              "slug",
                              "picture",
                              "shortDescription",
                              "linked"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "tier",
                        "heading",
                        "notes"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "families": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "name": {
                          "type": "string"
                        }
                      },
                      "required": [
                        "name"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "relationships": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "heading": {
                          "type": "string"
                        },
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "string",
                                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                              },
                              "brand": {
                                "type": "string"
                              },
                              "name": {
                                "type": "string"
                              },
                              "strength": {
                                "anyOf": [
                                  {
                                    "type": "string"
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              },
                              "year": {
                                "anyOf": [
                                  {
                                    "type": "integer",
                                    "minimum": -9007199254740991,
                                    "maximum": 9007199254740991
                                  },
                                  {
                                    "type": "null"
                                  }
                                ]
                              }
                            },
                            "required": [
                              "id",
                              "brand",
                              "name",
                              "strength",
                              "year"
                            ],
                            "additionalProperties": false
                          }
                        }
                      },
                      "required": [
                        "heading",
                        "items"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "description": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "text": {
                            "type": "string"
                          },
                          "brandWords": {
                            "type": "boolean"
                          }
                        },
                        "required": [
                          "text",
                          "brandWords"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "availability": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "words": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "words"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "id",
                  "name",
                  "strength",
                  "year",
                  "brand",
                  "perfumers",
                  "tiers",
                  "families",
                  "relationships",
                  "description",
                  "availability"
                ],
                "additionalProperties": false
              },
              "looked": {
                "type": "object",
                "properties": {
                  "fragranceId": {
                    "type": "string",
                    "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                  },
                  "lookId": {
                    "type": "string"
                  },
                  "lookVersion": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "place": {
                    "type": "string",
                    "enum": [
                      "listing_column",
                      "square_1080",
                      "post_4x5",
                      "story_1080x1920",
                      "email_600",
                      "sheet_a4",
                      "phone"
                    ]
                  },
                  "ground": {
                    "anyOf": [
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "enum": [
                              "cream",
                              "clear",
                              "brand"
                            ]
                          },
                          "colours": {
                            "anyOf": [
                              {
                                "type": "object",
                                "properties": {
                                  "ink": {
                                    "type": "string"
                                  },
                                  "ground": {
                                    "type": "string"
                                  },
                                  "accent": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "ink",
                                  "ground",
                                  "accent"
                                ],
                                "additionalProperties": false
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "kind",
                          "colours"
                        ],
                        "additionalProperties": false
                      },
                      {
                        "type": "object",
                        "properties": {
                          "kind": {
                            "type": "string",
                            "const": "palette"
                          },
                          "paletteId": {
                            "type": "string",
                            "enum": [
                              "cream_ink",
                              "paper_forest",
                              "sand_plum",
                              "fog_navy",
                              "night_gold",
                              "clear_ink"
                            ]
                          },
                          "colours": {
                            "type": "object",
                            "properties": {
                              "ink": {
                                "type": "string"
                              },
                              "ground": {
                                "type": "string"
                              },
                              "accent": {
                                "type": "string"
                              }
                            },
                            "required": [
                              "ink",
                              "ground",
                              "accent"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "required": [
                          "kind",
                          "paletteId",
                          "colours"
                        ],
                        "additionalProperties": false
                      }
                    ]
                  },
                  "type": {
                    "type": "object",
                    "properties": {
                      "heading": {
                        "type": "object",
                        "properties": {
                          "family": {
                            "type": "string"
                          },
                          "px": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "weight": {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 400
                              },
                              {
                                "type": "number",
                                "const": 700
                              }
                            ]
                          }
                        },
                        "required": [
                          "family",
                          "px",
                          "weight"
                        ],
                        "additionalProperties": false
                      },
                      "body": {
                        "type": "object",
                        "properties": {
                          "family": {
                            "type": "string"
                          },
                          "px": {
                            "type": "number",
                            "exclusiveMinimum": 0
                          },
                          "weight": {
                            "anyOf": [
                              {
                                "type": "number",
                                "const": 400
                              },
                              {
                                "type": "number",
                                "const": 700
                              }
                            ]
                          }
                        },
                        "required": [
                          "family",
                          "px",
                          "weight"
                        ],
                        "additionalProperties": false
                      },
                      "lineHeight": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "cssStack": {
                        "type": "object",
                        "properties": {
                          "heading": {
                            "type": "string"
                          },
                          "body": {
                            "type": "string"
                          }
                        },
                        "required": [
                          "heading",
                          "body"
                        ],
                        "additionalProperties": false
                      },
                      "uploaded": {
                        "type": "object",
                        "properties": {
                          "fontId": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          },
                          "partnerId": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          }
                        },
                        "required": [
                          "fontId",
                          "partnerId"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "heading",
                      "body",
                      "lineHeight",
                      "cssStack"
                    ],
                    "additionalProperties": false
                  },
                  "noteDesign": {
                    "type": "object",
                    "properties": {
                      "size": {
                        "type": "string",
                        "enum": [
                          "sm",
                          "md",
                          "lg"
                        ]
                      },
                      "shape": {
                        "type": "string",
                        "enum": [
                          "circle",
                          "rounded",
                          "square"
                        ]
                      },
                      "showNames": {
                        "type": "boolean"
                      },
                      "layout": {
                        "type": "string",
                        "enum": [
                          "row",
                          "stacked",
                          "across_2",
                          "across_3",
                          "across_4"
                        ]
                      }
                    },
                    "required": [
                      "size",
                      "shape",
                      "showNames",
                      "layout"
                    ],
                    "additionalProperties": false
                  },
                  "blocks": {
                    "type": "array",
                    "items": {
                      "anyOf": [
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "brand_name"
                            },
                            "blockId": {
                              "type": "string"
                            },
                            "brand": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "name": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "blockId",
                            "brand",
                            "name"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "strength_year"
                            },
                            "blockId": {
                              "type": "string"
                            },
                            "strength": {
                              "anyOf": [
                                {
                                  "type": "string"
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            },
                            "year": {
                              "anyOf": [
                                {
                                  "type": "integer",
                                  "minimum": -9007199254740991,
                                  "maximum": 9007199254740991
                                },
                                {
                                  "type": "null"
                                }
                              ]
                            }
                          },
                          "required": [
                            "kind",
                            "blockId",
                            "strength",
                            "year"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "perfumers"
                            },
                            "blockId": {
                              "type": "string"
                            },
                            "names": {
                              "type": "array",
                              "items": {
                                "type": "string"
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "blockId",
                            "names"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "description"
                            },
                            "blockId": {
                              "type": "string"
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "blockId",
                            "text"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "notes"
                            },
                            "blockId": {
                              "type": "string"
                            },
                            "tiers": {
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "heading": {
                                    "type": "string"
                                  },
                                  "notes": {
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "id": {
                                          "type": "string"
                                        },
                                        "name": {
                                          "type": "string"
                                        },
                                        "picture": {
                                          "anyOf": [
                                            {
                                              "type": "string"
                                            },
                                            {
                                              "type": "null"
                                            }
                                          ]
                                        },
                                        "blockId": {
                                          "type": "string"
                                        }
                                      },
                                      "required": [
                                        "id",
                                        "name",
                                        "picture",
                                        "blockId"
                                      ],
                                      "additionalProperties": false
                                    }
                                  },
                                  "more": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 9007199254740991
                                  },
                                  "blockId": {
                                    "type": "string"
                                  }
                                },
                                "required": [
                                  "heading",
                                  "notes",
                                  "more",
                                  "blockId"
                                ],
                                "additionalProperties": false
                              }
                            }
                          },
                          "required": [
                            "kind",
                            "blockId",
                            "tiers"
                          ],
                          "additionalProperties": false
                        },
                        {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "const": "quiet_line"
                            },
                            "blockId": {
                              "type": "string"
                            },
                            "forBlock": {
                              "type": "string",
                              "enum": [
                                "brand_name",
                                "strength_year",
                                "perfumers",
                                "description",
                                "notes"
                              ]
                            },
                            "text": {
                              "type": "string"
                            }
                          },
                          "required": [
                            "kind",
                            "blockId",
                            "forBlock",
                            "text"
                          ],
                          "additionalProperties": false
                        }
                      ]
                    }
                  }
                },
                "required": [
                  "fragranceId",
                  "lookId",
                  "lookVersion",
                  "place",
                  "ground",
                  "type",
                  "blocks"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "ok",
              "status",
              "card",
              "looked"
            ],
            "additionalProperties": false
          },
          {
            "type": "object",
            "properties": {
              "ok": {
                "type": "boolean",
                "const": false
              },
              "status": {
                "type": "string",
                "const": "moved"
              },
              "moved_to": {
                "type": "string",
                "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
              },
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "const": "moved"
                  },
                  "message": {
                    "type": "string"
                  },
                  "docs": {
                    "type": "string",
                    "format": "uri"
                  }
                },
                "required": [
                  "code",
                  "message",
                  "docs"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "ok",
              "status",
              "moved_to",
              "error"
            ],
            "additionalProperties": false
          }
        ]
      },
      "SearchRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "q": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200
          },
          "limit": {
            "default": 10,
            "type": "integer",
            "minimum": 1,
            "maximum": 25
          }
        },
        "required": [
          "q"
        ],
        "additionalProperties": false
      },
      "SearchAnswer": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "brand": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "strength": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "year": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "brand",
                "name",
                "strength",
                "year"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ok",
          "results"
        ],
        "additionalProperties": false
      },
      "MatchRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "rows": {
            "minItems": 1,
            "maxItems": 100,
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "brand": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "strength": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "year": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "ref",
                    "name"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "brand": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "strength": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "year": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "text": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    }
                  },
                  "required": [
                    "ref",
                    "text"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "propose_links": {
            "type": "boolean"
          }
        },
        "required": [
          "rows"
        ],
        "additionalProperties": false
      },
      "MatchAnswer": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "rows": {
            "type": "array",
            "items": {
              "anyOf": [
                {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "candidates": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "strength": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "name",
                          "strength",
                          "year"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "const": "matched"
                    },
                    "fragrance_id": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                    },
                    "suggested_id": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "ref",
                    "candidates",
                    "reason",
                    "status",
                    "fragrance_id",
                    "suggested_id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "candidates": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "strength": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "name",
                          "strength",
                          "year"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "const": "suggested"
                    },
                    "fragrance_id": {
                      "type": "null"
                    },
                    "suggested_id": {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                    }
                  },
                  "required": [
                    "ref",
                    "candidates",
                    "reason",
                    "status",
                    "fragrance_id",
                    "suggested_id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "candidates": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "strength": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "name",
                          "strength",
                          "year"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "const": "unmatched"
                    },
                    "fragrance_id": {
                      "type": "null"
                    },
                    "suggested_id": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "ref",
                    "candidates",
                    "reason",
                    "status",
                    "fragrance_id",
                    "suggested_id"
                  ],
                  "additionalProperties": false
                },
                {
                  "type": "object",
                  "properties": {
                    "ref": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 200
                    },
                    "candidates": {
                      "maxItems": 5,
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "id": {
                            "type": "string",
                            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                          },
                          "brand": {
                            "type": "string"
                          },
                          "name": {
                            "type": "string"
                          },
                          "strength": {
                            "anyOf": [
                              {
                                "type": "string"
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "year": {
                            "anyOf": [
                              {
                                "type": "integer",
                                "minimum": -9007199254740991,
                                "maximum": 9007199254740991
                              },
                              {
                                "type": "null"
                              }
                            ]
                          }
                        },
                        "required": [
                          "id",
                          "brand",
                          "name",
                          "strength",
                          "year"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "reason": {
                      "type": "string"
                    },
                    "status": {
                      "type": "string",
                      "const": "not_checked"
                    },
                    "fragrance_id": {
                      "type": "null"
                    },
                    "suggested_id": {
                      "type": "null"
                    }
                  },
                  "required": [
                    "ref",
                    "candidates",
                    "reason",
                    "status",
                    "fragrance_id",
                    "suggested_id"
                  ],
                  "additionalProperties": false
                }
              ]
            }
          },
          "calls_used": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "resets_at": {
            "type": "string"
          },
          "proposals": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "ok": {
                    "type": "boolean",
                    "const": true
                  },
                  "proposed": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "unchanged": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "ok",
                  "proposed",
                  "unchanged"
                ],
                "additionalProperties": false
              },
              {
                "type": "object",
                "properties": {
                  "ok": {
                    "type": "boolean",
                    "const": false
                  },
                  "status": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "code": {
                    "type": "string"
                  }
                },
                "required": [
                  "ok",
                  "status",
                  "code"
                ],
                "additionalProperties": false
              }
            ]
          }
        },
        "required": [
          "ok",
          "rows",
          "calls_used"
        ],
        "additionalProperties": false
      },
      "LooksAnswer": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "looks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string"
                },
                "place": {
                  "type": "string",
                  "enum": [
                    "listing_column",
                    "square_1080",
                    "post_4x5",
                    "story_1080x1920",
                    "email_600",
                    "sheet_a4",
                    "phone"
                  ]
                },
                "version": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "updated_at": {
                  "type": "string"
                }
              },
              "required": [
                "name",
                "place",
                "version",
                "updated_at"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ok",
          "looks"
        ],
        "additionalProperties": false
      },
      "ProductLinksAnswer": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ok": {
            "type": "boolean",
            "const": true
          },
          "links": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "orgId": {
                  "type": "string",
                  "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                },
                "productRef": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200
                },
                "productLabel": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "fragranceId": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "matchStatus": {
                  "type": "string",
                  "enum": [
                    "matched",
                    "suggested",
                    "unmatched"
                  ]
                },
                "candidates": {
                  "maxItems": 5,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "id": {
                        "type": "string",
                        "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                      },
                      "brand": {
                        "type": "string"
                      },
                      "name": {
                        "type": "string"
                      },
                      "strength": {
                        "anyOf": [
                          {
                            "type": "string"
                          },
                          {
                            "type": "null"
                          }
                        ]
                      },
                      "year": {
                        "anyOf": [
                          {
                            "type": "integer",
                            "minimum": -9007199254740991,
                            "maximum": 9007199254740991
                          },
                          {
                            "type": "null"
                          }
                        ]
                      }
                    },
                    "required": [
                      "id",
                      "brand",
                      "name",
                      "strength",
                      "year"
                    ],
                    "additionalProperties": false
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "proposed",
                    "approved",
                    "rejected",
                    "archived"
                  ]
                },
                "proposedAt": {
                  "type": "string"
                },
                "decidedBy": {
                  "anyOf": [
                    {
                      "type": "string",
                      "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "archivedReason": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "orgId",
                "productRef",
                "productLabel",
                "fragranceId",
                "matchStatus",
                "candidates",
                "status",
                "proposedAt",
                "decidedBy",
                "archivedReason"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ok",
          "links"
        ],
        "additionalProperties": false
      }
    }
  }
}
