{
  "info": {
    "name": "Price2Spy REST API",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
    "description": "All 43 endpoints of the Price2Spy REST API (/api/v1). Signing (HMAC-SHA256) is automatic: a collection-level pre-request script signs every request.\n\nSetup: also import the \"Price2Spy\" environment, enter host, clientId and clientSecret, then select that environment in the top right.\n\nSet the ID variables (productId, urlId, siteId, metaId, automatchUrlId) in the environment before updates and deletes.\n\nTo inspect the signature, set p2sDebug to true and open the Postman Console (View > Show Postman Console)."
  },
  "auth": {
    "type": "noauth"
  },
  "event": [
    {
      "listen": "prerequest",
      "script": {
        "type": "text/javascript",
        "exec": [
          "// Price2Spy REST API: HMAC-SHA256 signing, runs automatically before every request in this collection.",
          "// Required variables (in the environment): host, clientId, clientSecret. Optional: p2sDebug = true.",
          "const sdk = require('postman-collection');",
          "const cryptoJs = require('crypto-js');",
          "",
          "const clientId = pm.variables.get('clientId');",
          "const clientSecret = pm.variables.get('clientSecret');",
          "if (!clientId || !clientSecret) {",
          "    throw new Error('Price2Spy: set clientId and clientSecret in the environment (Environments) and select that environment.');",
          "}",
          "",
          "// 1. URL: resolve variables and pre-encode the characters Postman would encode when sending,",
          "//    so the signed string is identical to what goes on the wire (e.g. ' -> %27, space -> %20).",
          "const ALLOWED = /[A-Za-z0-9\\-._~!$&()*+,;=:@\\/?%]/;",
          "function preEncode(s) {",
          "    return Array.from(s).map(ch => ALLOWED.test(ch) ? ch : (ch === \"'\" ? '%27' : encodeURIComponent(ch))).join('');",
          "}",
          "const resolvedUrl = pm.variables.replaceIn(pm.request.url.toString());",
          "const schemeEnd = resolvedUrl.indexOf('://') + 3;",
          "pm.request.url.update(resolvedUrl.slice(0, schemeEnd) + preEncode(resolvedUrl.slice(schemeEnd)));",
          "",
          "const host = pm.request.url.getRemote();          // e.g. api.example.com or localhost:8080",
          "const resource = pm.request.url.getPathWithQuery(); // e.g. /api/v1/products?page=1&size=20",
          "const method = pm.request.method.toUpperCase();",
          "",
          "// 2. Body: resolve variables once and write the resolved body back into the request,",
          "//    so dynamic variables ({{$randomInt}} etc.) don't produce a different value when sent.",
          "let body = '';",
          "if (pm.request.body && !pm.request.body.isEmpty()) {",
          "    if (pm.request.body.mode !== 'raw') {",
          "        throw new Error('Price2Spy: the request body must be \"raw\" JSON.');",
          "    }",
          "    body = pm.variables.replaceIn(pm.request.body.raw || '');",
          "    pm.request.body.update({ mode: 'raw', raw: body, options: { raw: { language: 'json' } } });",
          "}",
          "",
          "// 3. Content-Type: signed only on POST/PATCH/DELETE and only when the header is sent.",
          "let contentType = null;",
          "if (method === 'GET' || body === '') {",
          "    pm.request.headers.remove('Content-Type');",
          "} else {",
          "    contentType = pm.variables.replaceIn(pm.request.headers.get('Content-Type') || '');",
          "    if (!contentType) contentType = 'application/json';",
          "    pm.request.headers.upsert({ key: 'Content-Type', value: contentType });",
          "}",
          "",
          "// 4. String to sign: METHOD\\nHOST\\n[CONTENT-TYPE\\n]RESOURCE\\nDATE\\nBODY",
          "const date = Math.floor(Date.now() / 1000).toString();",
          "const fields = [method, host].concat(contentType ? [contentType] : [], [resource, date, body]);",
          "const stringToSign = fields.join('\\n');",
          "",
          "const signature = cryptoJs.enc.Base64.stringify(cryptoJs.HmacSHA256(stringToSign, clientSecret));",
          "",
          "pm.request.headers.upsert({ key: 'X-P2S-Date', value: date });",
          "pm.request.headers.upsert({ key: 'Authorization', value: 'HmacSHA256 ' + clientId + ':' + signature });",
          "",
          "if (String(pm.variables.get('p2sDebug')) === 'true') {",
          "    console.log('Price2Spy string to sign:\\n' + stringToSign.replace(/\\n/g, '\\\\n\\n'));",
          "    console.log('Price2Spy signature: ' + signature);",
          "}",
          ""
        ]
      }
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://connect.price2spy.com/api/v1"
    }
  ],
  "item": [
    {
      "name": "Products",
      "description": "Products",
      "item": [
        {
          "name": "GET /products – search products",
          "request": {
            "method": "GET",
            "header": [],
            "description": "Searches products, ordered by product ID. Enable the filters you want (tick them in the Params tab); all filters combine with AND.",
            "url": {
              "raw": "{{baseUrl}}/products?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                },
                {
                  "key": "productName",
                  "value": "kettle",
                  "disabled": true
                },
                {
                  "key": "sku",
                  "value": "KET-001",
                  "disabled": true
                },
                {
                  "key": "searchMode",
                  "value": "EQUAL",
                  "disabled": true
                },
                {
                  "key": "active",
                  "value": "true",
                  "disabled": true
                },
                {
                  "key": "categoryId",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "brandId",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "url",
                  "value": "",
                  "disabled": true
                },
                {
                  "key": "dateChangeFrom",
                  "value": "2026-10-01",
                  "disabled": true
                },
                {
                  "key": "dateChangeTo",
                  "value": "2026-10-31",
                  "disabled": true
                },
                {
                  "key": "frequencyType",
                  "value": "DAYS",
                  "disabled": true
                },
                {
                  "key": "frequencyInterval",
                  "value": "1",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "POST /products – create a product",
          "request": {
            "method": "POST",
            "header": [],
            "description": "Only productName is required (unique in your account). Check frequency: send both fields or neither.",
            "url": {
              "raw": "{{baseUrl}}/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productName\": \"Blue kettle 1.7 l\",\n  \"sku\": \"KET-001\",\n  \"checkFrequencyType\": \"DAYS\",\n  \"checkFrequencyInterval\": 1,\n  \"brandName\": \"Acme\",\n  \"costPrice\": 18.5,\n  \"targetPrice\": 29.99\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "PATCH /products – update a product",
          "request": {
            "method": "PATCH",
            "header": [],
            "description": "Send productId and only the fields to change. null clears a field (except productName and active).",
            "url": {
              "raw": "{{baseUrl}}/products",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productId\": \"{{productId}}\",\n  \"targetPrice\": 27.99\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "DELETE /products/{id} – delete a product",
          "request": {
            "method": "DELETE",
            "header": [],
            "description": "CAUTION: deletes the product, all its URLs and their price history. Cannot be undone.",
            "url": {
              "raw": "{{baseUrl}}/products/{{productId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "products",
                "{{productId}}"
              ],
              "query": []
            }
          }
        }
      ]
    },
    {
      "name": "URLs",
      "description": "URLs: competitor pages tracked for a product",
      "item": [
        {
          "name": "GET /urls – search URLs",
          "request": {
            "method": "GET",
            "header": [],
            "description": "Ordered by product ID, then URL ID.",
            "url": {
              "raw": "{{baseUrl}}/urls?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "urls"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                },
                {
                  "key": "productId",
                  "value": "{{productId}}",
                  "disabled": true
                },
                {
                  "key": "query",
                  "value": "kettle",
                  "disabled": true
                },
                {
                  "key": "active",
                  "value": "true",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "POST /urls – add a URL",
          "request": {
            "method": "POST",
            "header": [],
            "description": "A product can have only one URL per site.",
            "url": {
              "raw": "{{baseUrl}}/urls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "urls"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"productId\": \"{{productId}}\",\n  \"url\": \"https://shop.example.com/kettle-blue\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "PATCH /urls – update a URL",
          "request": {
            "method": "PATCH",
            "header": [],
            "description": "Send urlId and the fields to change. The address must stay on the same site.",
            "url": {
              "raw": "{{baseUrl}}/urls",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "urls"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"urlId\": \"{{urlId}}\",\n  \"note1\": \"Check pack size\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        },
        {
          "name": "DELETE /urls/{id} – delete a URL",
          "request": {
            "method": "DELETE",
            "header": [],
            "description": "Deletes the URL and its price history. A URL created from automatch cannot be deleted; demote it instead.",
            "url": {
              "raw": "{{baseUrl}}/urls/{{urlId}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "urls",
                "{{urlId}}"
              ],
              "query": []
            }
          }
        }
      ]
    },
    {
      "name": "Sites",
      "description": "Sites",
      "item": [
        {
          "name": "GET /sites – list sites",
          "request": {
            "method": "GET",
            "header": [],
            "description": "Only sites where you have at least one URL.",
            "url": {
              "raw": "{{baseUrl}}/sites?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sites"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                },
                {
                  "key": "searchTerm",
                  "value": "shop",
                  "disabled": true
                },
                {
                  "key": "countryCode",
                  "value": "RS",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "PATCH /sites – name, priority, alerts",
          "request": {
            "method": "PATCH",
            "header": [],
            "description": "customName (null clears), priority, ignoreEmailAlerts.",
            "url": {
              "raw": "{{baseUrl}}/sites",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "sites"
              ],
              "query": []
            },
            "body": {
              "mode": "raw",
              "raw": "{\n  \"id\": \"{{siteId}}\",\n  \"customName\": \"Main competitor\",\n  \"priority\": 1\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            }
          }
        }
      ]
    },
    {
      "name": "Measurements",
      "description": "Measurements",
      "item": [
        {
          "name": "GET /measurements – price checks for a URL",
          "request": {
            "method": "GET",
            "header": [],
            "description": "urlId is required. Newest first.",
            "url": {
              "raw": "{{baseUrl}}/measurements?urlId={{urlId}}&page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "measurements"
              ],
              "query": [
                {
                  "key": "urlId",
                  "value": "{{urlId}}",
                  "disabled": false
                },
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                },
                {
                  "key": "dateCheckedFrom",
                  "value": "2026-10-01",
                  "disabled": true
                },
                {
                  "key": "dateCheckedTo",
                  "value": "2026-10-31",
                  "disabled": true
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Pricing data",
      "description": "Pricing data. Dates at most one year in the past; ranges at most one year wide.",
      "item": [
        {
          "name": "GET last-price-change – latest price changes",
          "request": {
            "method": "GET",
            "header": [],
            "description": "Without dates: last 30 days.",
            "url": {
              "raw": "{{baseUrl}}/pricing-data/last-price-change?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "pricing-data",
                "last-price-change"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                },
                {
                  "key": "type",
                  "value": "INCREASE",
                  "disabled": true
                },
                {
                  "key": "latestChangeDateFrom",
                  "value": "2026-10-01",
                  "disabled": true
                },
                {
                  "key": "latestChangeDateTo",
                  "value": "2026-10-31",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET product-price-history/{id} – product price history",
          "request": {
            "method": "GET",
            "header": [],
            "description": "Without dates: last year.",
            "url": {
              "raw": "{{baseUrl}}/pricing-data/product-price-history/{{productId}}?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "pricing-data",
                "product-price-history",
                "{{productId}}"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                },
                {
                  "key": "dateCheckedFrom",
                  "value": "2026-10-01",
                  "disabled": true
                },
                {
                  "key": "dateCheckedTo",
                  "value": "2026-10-31",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "GET current-pricing-data – current prices",
          "request": {
            "method": "GET",
            "header": [],
            "description": "size is at most 50.",
            "url": {
              "raw": "{{baseUrl}}/pricing-data/current-pricing-data?page=1&size=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "pricing-data",
                "current-pricing-data"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "50",
                  "disabled": false
                },
                {
                  "key": "productName",
                  "value": "kettle",
                  "disabled": true
                },
                {
                  "key": "dateChangeFrom",
                  "value": "2026-10-01",
                  "disabled": true
                },
                {
                  "key": "dateChangeTo",
                  "value": "2026-10-31",
                  "disabled": true
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Price buckets",
      "description": "Price buckets",
      "item": [
        {
          "name": "GET /price-buckets – price ranges",
          "request": {
            "method": "GET",
            "header": [],
            "description": "",
            "url": {
              "raw": "{{baseUrl}}/price-buckets?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "price-buckets"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                }
              ]
            }
          }
        }
      ]
    },
    {
      "name": "Metadata",
      "description": "Brands, categories, suppliers and your three custom lists. The entry ID for updates and deletes is the metaId variable.",
      "item": [
        {
          "name": "Brands",
          "description": "/brands",
          "item": [
            {
              "name": "GET /brands",
              "request": {
                "method": "GET",
                "header": [],
                "description": "Lists the entries.",
                "url": {
                  "raw": "{{baseUrl}}/brands?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "brands"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "1",
                      "disabled": false
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "disabled": false
                    },
                    {
                      "key": "name",
                      "value": "Acme",
                      "disabled": true
                    },
                    {
                      "key": "active",
                      "value": "true",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "POST /brands",
              "request": {
                "method": "POST",
                "header": [],
                "description": "The request field is emailRecipient (singular).",
                "url": {
                  "raw": "{{baseUrl}}/brands",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "brands"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme\",\n  \"priority\": 5,\n  \"emailRecipient\": [\n    \"pricing@example.com\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "PATCH /brands",
              "request": {
                "method": "PATCH",
                "header": [],
                "description": "null or a missing field keeps the value. emailRecipient: [] removes all recipients.",
                "url": {
                  "raw": "{{baseUrl}}/brands",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "brands"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"id\": \"{{metaId}}\",\n  \"priority\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "DELETE /brands/{id}",
              "request": {
                "method": "DELETE",
                "header": [],
                "description": "Only an entry no product uses.",
                "url": {
                  "raw": "{{baseUrl}}/brands/{{metaId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "brands",
                    "{{metaId}}"
                  ],
                  "query": []
                }
              }
            }
          ]
        },
        {
          "name": "Categories",
          "description": "/categories",
          "item": [
            {
              "name": "GET /categories",
              "request": {
                "method": "GET",
                "header": [],
                "description": "Lists the entries.",
                "url": {
                  "raw": "{{baseUrl}}/categories?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "categories"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "1",
                      "disabled": false
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "disabled": false
                    },
                    {
                      "key": "name",
                      "value": "Acme",
                      "disabled": true
                    },
                    {
                      "key": "active",
                      "value": "true",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "POST /categories",
              "request": {
                "method": "POST",
                "header": [],
                "description": "The request field is emailRecipient (singular).",
                "url": {
                  "raw": "{{baseUrl}}/categories",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "categories"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme\",\n  \"priority\": 5,\n  \"emailRecipient\": [\n    \"pricing@example.com\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "PATCH /categories",
              "request": {
                "method": "PATCH",
                "header": [],
                "description": "null or a missing field keeps the value. emailRecipient: [] removes all recipients.",
                "url": {
                  "raw": "{{baseUrl}}/categories",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "categories"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"id\": \"{{metaId}}\",\n  \"priority\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "DELETE /categories/{id}",
              "request": {
                "method": "DELETE",
                "header": [],
                "description": "Only an entry no product uses.",
                "url": {
                  "raw": "{{baseUrl}}/categories/{{metaId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "categories",
                    "{{metaId}}"
                  ],
                  "query": []
                }
              }
            }
          ]
        },
        {
          "name": "Suppliers",
          "description": "/suppliers",
          "item": [
            {
              "name": "GET /suppliers",
              "request": {
                "method": "GET",
                "header": [],
                "description": "Lists the entries.",
                "url": {
                  "raw": "{{baseUrl}}/suppliers?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "suppliers"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "1",
                      "disabled": false
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "disabled": false
                    },
                    {
                      "key": "name",
                      "value": "Acme",
                      "disabled": true
                    },
                    {
                      "key": "active",
                      "value": "true",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "POST /suppliers",
              "request": {
                "method": "POST",
                "header": [],
                "description": "The request field is emailRecipient (singular).",
                "url": {
                  "raw": "{{baseUrl}}/suppliers",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "suppliers"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme\",\n  \"priority\": 5,\n  \"emailRecipient\": [\n    \"pricing@example.com\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "PATCH /suppliers",
              "request": {
                "method": "PATCH",
                "header": [],
                "description": "null or a missing field keeps the value. emailRecipient: [] removes all recipients.",
                "url": {
                  "raw": "{{baseUrl}}/suppliers",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "suppliers"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"id\": \"{{metaId}}\",\n  \"priority\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "DELETE /suppliers/{id}",
              "request": {
                "method": "DELETE",
                "header": [],
                "description": "Only an entry no product uses.",
                "url": {
                  "raw": "{{baseUrl}}/suppliers/{{metaId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "suppliers",
                    "{{metaId}}"
                  ],
                  "query": []
                }
              }
            }
          ]
        },
        {
          "name": "Account metadata 1",
          "description": "/metadata/one",
          "item": [
            {
              "name": "GET /metadata/one",
              "request": {
                "method": "GET",
                "header": [],
                "description": "Lists the entries.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/one?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "one"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "1",
                      "disabled": false
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "disabled": false
                    },
                    {
                      "key": "name",
                      "value": "Acme",
                      "disabled": true
                    },
                    {
                      "key": "active",
                      "value": "true",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "POST /metadata/one",
              "request": {
                "method": "POST",
                "header": [],
                "description": "The request field is emailRecipient (singular).",
                "url": {
                  "raw": "{{baseUrl}}/metadata/one",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "one"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme\",\n  \"priority\": 5,\n  \"emailRecipient\": [\n    \"pricing@example.com\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "PATCH /metadata/one",
              "request": {
                "method": "PATCH",
                "header": [],
                "description": "null or a missing field keeps the value. emailRecipient: [] removes all recipients.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/one",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "one"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"id\": \"{{metaId}}\",\n  \"priority\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "DELETE /metadata/one/{id}",
              "request": {
                "method": "DELETE",
                "header": [],
                "description": "Only an entry no product uses.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/one/{{metaId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "one",
                    "{{metaId}}"
                  ],
                  "query": []
                }
              }
            }
          ]
        },
        {
          "name": "Account metadata 2",
          "description": "/metadata/two",
          "item": [
            {
              "name": "GET /metadata/two",
              "request": {
                "method": "GET",
                "header": [],
                "description": "Lists the entries.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/two?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "two"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "1",
                      "disabled": false
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "disabled": false
                    },
                    {
                      "key": "name",
                      "value": "Acme",
                      "disabled": true
                    },
                    {
                      "key": "active",
                      "value": "true",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "POST /metadata/two",
              "request": {
                "method": "POST",
                "header": [],
                "description": "The request field is emailRecipient (singular).",
                "url": {
                  "raw": "{{baseUrl}}/metadata/two",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "two"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme\",\n  \"priority\": 5,\n  \"emailRecipient\": [\n    \"pricing@example.com\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "PATCH /metadata/two",
              "request": {
                "method": "PATCH",
                "header": [],
                "description": "null or a missing field keeps the value. emailRecipient: [] removes all recipients.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/two",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "two"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"id\": \"{{metaId}}\",\n  \"priority\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "DELETE /metadata/two/{id}",
              "request": {
                "method": "DELETE",
                "header": [],
                "description": "Only an entry no product uses.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/two/{{metaId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "two",
                    "{{metaId}}"
                  ],
                  "query": []
                }
              }
            }
          ]
        },
        {
          "name": "Account metadata 3",
          "description": "/metadata/three",
          "item": [
            {
              "name": "GET /metadata/three",
              "request": {
                "method": "GET",
                "header": [],
                "description": "Lists the entries.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/three?page=1&size=20",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "three"
                  ],
                  "query": [
                    {
                      "key": "page",
                      "value": "1",
                      "disabled": false
                    },
                    {
                      "key": "size",
                      "value": "20",
                      "disabled": false
                    },
                    {
                      "key": "name",
                      "value": "Acme",
                      "disabled": true
                    },
                    {
                      "key": "active",
                      "value": "true",
                      "disabled": true
                    }
                  ]
                }
              }
            },
            {
              "name": "POST /metadata/three",
              "request": {
                "method": "POST",
                "header": [],
                "description": "The request field is emailRecipient (singular).",
                "url": {
                  "raw": "{{baseUrl}}/metadata/three",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "three"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"name\": \"Acme\",\n  \"priority\": 5,\n  \"emailRecipient\": [\n    \"pricing@example.com\"\n  ]\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "PATCH /metadata/three",
              "request": {
                "method": "PATCH",
                "header": [],
                "description": "null or a missing field keeps the value. emailRecipient: [] removes all recipients.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/three",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "three"
                  ],
                  "query": []
                },
                "body": {
                  "mode": "raw",
                  "raw": "{\n  \"id\": \"{{metaId}}\",\n  \"priority\": 10\n}",
                  "options": {
                    "raw": {
                      "language": "json"
                    }
                  }
                }
              }
            },
            {
              "name": "DELETE /metadata/three/{id}",
              "request": {
                "method": "DELETE",
                "header": [],
                "description": "Only an entry no product uses.",
                "url": {
                  "raw": "{{baseUrl}}/metadata/three/{{metaId}}",
                  "host": [
                    "{{baseUrl}}"
                  ],
                  "path": [
                    "metadata",
                    "three",
                    "{{metaId}}"
                  ],
                  "query": []
                }
              }
            }
          ]
        }
      ]
    },
    {
      "name": "Automatch",
      "description": "Competitor pages Price2Spy found that may match your products.",
      "item": [
        {
          "name": "GET /automatch – list suggestions",
          "request": {
            "method": "GET",
            "header": [],
            "description": "The order is not fixed.",
            "url": {
              "raw": "{{baseUrl}}/automatch?page=1&size=20",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "automatch"
              ],
              "query": [
                {
                  "key": "page",
                  "value": "1",
                  "disabled": false
                },
                {
                  "key": "size",
                  "value": "20",
                  "disabled": false
                },
                {
                  "key": "status",
                  "value": "UNPROCESSED",
                  "disabled": true
                },
                {
                  "key": "productId",
                  "value": "{{productId}}",
                  "disabled": true
                }
              ]
            }
          }
        },
        {
          "name": "POST promote – accept a suggestion",
          "request": {
            "method": "POST",
            "header": [],
            "description": "No body. Returns {\"urlId\": ...}.",
            "url": {
              "raw": "{{baseUrl}}/automatch/{{automatchUrlId}}/promote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "automatch",
                "{{automatchUrlId}}",
                "promote"
              ],
              "query": []
            }
          }
        },
        {
          "name": "POST demote – undo a promotion",
          "request": {
            "method": "POST",
            "header": [],
            "description": "Takes the URL ID (not the suggestion ID). Deletes the URL and its price history.",
            "url": {
              "raw": "{{baseUrl}}/automatch/{{urlId}}/demote",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "automatch",
                "{{urlId}}",
                "demote"
              ],
              "query": []
            }
          }
        },
        {
          "name": "POST reject – reject a suggestion",
          "request": {
            "method": "POST",
            "header": [],
            "description": "No body.",
            "url": {
              "raw": "{{baseUrl}}/automatch/{{automatchUrlId}}/reject",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "automatch",
                "{{automatchUrlId}}",
                "reject"
              ],
              "query": []
            }
          }
        }
      ]
    }
  ]
}