{
  "info": {
    "_postman_id": "f8a0d550-c74b-4eb7-bcf9-b8a728f7f6e5",
    "name": "Ascent Account API",
    "description": "Import this collection, then set the collection variables: baseUrl, apiKey, and sku. GET requests are listed first and include the new filters/sorts for listings, orders, and pricing history. PATCH requests change live account data, so run read-only requests before write testing.",
    "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
  },
  "item": [
    {
      "name": "GET requests",
      "description": "Read-only requests first. Use an API key with read scope, except /health which is public.",
      "item": [
        {
          "name": "Health check",
          "request": {
            "auth": {
              "type": "noauth"
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/health",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "health"
              ]
            },
            "description": "No authentication required. Expected response: { \"status\": \"ok\" }."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 200', function () { pm.response.to.have.status(200); });",
                  "pm.test('Health is ok', function () { pm.expect(pm.response.json().status).to.eql('ok'); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Account metrics",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/metrics?recent_days={{recentDays}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "metrics"
              ],
              "query": [
                {
                  "key": "recent_days",
                  "value": "{{recentDays}}",
                  "description": "Optional. Defaults to 31, max 3650."
                }
              ]
            },
            "description": "Returns country, enabled marketplaces, Buy Box win percentage, listing metrics, and order metrics for the requested recent period. recent_days defaults to 31 and maxes at 3650."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Read repricing settings",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/repricing-settings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "repricing-settings"
              ]
            },
            "description": "Returns { settings: ... } with VAT, VAT-on-fees, Auto COG, repricing state, country, prep fee, standard rules, and custom rules when custom mode is enabled."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "List in-stock listings",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/listings?limit=50&offset=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "listings"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Optional. Defaults to 100, max 1000."
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Optional pagination offset."
                },
                {
                  "key": "search",
                  "value": "{{search}}",
                  "disabled": true,
                  "description": "Optional text search across listing fields."
                },
                {
                  "key": "country",
                  "value": "{{country}}",
                  "disabled": true,
                  "description": "Optional marketplace code, e.g. GB, US, DE, FR."
                },
                {
                  "key": "filter",
                  "value": "missingcogs",
                  "disabled": true,
                  "description": "Optional: missingcogs, minimums, fbm, bbwins, notrepricing, suppressedbb, or rule names Sicilian/Vienna/Gambit/Marshall."
                },
                {
                  "key": "sort",
                  "value": "value",
                  "disabled": true,
                  "description": "Optional: qty, value, or age."
                }
              ]
            },
            "description": "Returns { total, limit, offset, items } for in-stock listing rows, newest first by default. Optional filter/sort params are included disabled for easy toggling."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "List listings - missing COGs sorted by value",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/listings?filter=missingcogs&sort=value&limit=50",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "listings"
              ],
              "query": [
                {
                  "key": "filter",
                  "value": "missingcogs",
                  "description": "Filter listings with missing COG."
                },
                {
                  "key": "sort",
                  "value": "value",
                  "description": "Sort by inventory value descending."
                },
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Optional. Defaults to 100, max 1000."
                }
              ]
            },
            "description": "Example listing filter/sort request. filter accepts missingcogs, minimums, fbm, bbwins, notrepricing, suppressedbb, or rule names. sort accepts qty, value, or age."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Recent orders",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders?limit=25&offset=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Optional. Defaults to 100, max 1000."
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Optional pagination offset."
                },
                {
                  "key": "search",
                  "value": "{{search}}",
                  "disabled": true,
                  "description": "Optional text search."
                },
                {
                  "key": "status",
                  "value": "{{orderStatus}}",
                  "disabled": true,
                  "description": "Optional exact order status filter."
                },
                {
                  "key": "since",
                  "value": "{{since}}",
                  "disabled": true,
                  "description": "Optional date/time filter."
                },
                {
                  "key": "country",
                  "value": "{{country}}",
                  "disabled": true,
                  "description": "Optional marketplace code."
                },
                {
                  "key": "rule",
                  "value": "Vienna",
                  "disabled": true,
                  "description": "Optional rule filter. Alias: filter. Values: 1-4 or Sicilian/Vienna/Gambit/Marshall."
                },
                {
                  "key": "sort",
                  "value": "newest",
                  "disabled": true,
                  "description": "Optional: newest/date_desc/default or oldest/date_asc."
                }
              ]
            },
            "description": "Returns { items } with non-cancelled order and linked listing fields. Optional rule filter and sort params are included disabled for easy toggling."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Recent orders - Vienna newest first",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/orders?rule=Vienna&sort=newest&limit=25",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "orders"
              ],
              "query": [
                {
                  "key": "rule",
                  "value": "Vienna",
                  "description": "Rule filter."
                },
                {
                  "key": "sort",
                  "value": "newest",
                  "description": "Newest first."
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Optional. Defaults to 100, max 1000."
                }
              ]
            },
            "description": "Example order rule/sort request. Use rule or filter with 1-4 or Sicilian/Vienna/Gambit/Marshall. sort accepts newest/date_desc/default or oldest/date_asc."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Pricing history",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/pricing-history?limit=50&offset=0",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "pricing-history"
              ],
              "query": [
                {
                  "key": "limit",
                  "value": "50",
                  "description": "Optional. Defaults to 100, max 1000."
                },
                {
                  "key": "offset",
                  "value": "0",
                  "description": "Optional pagination offset."
                },
                {
                  "key": "country",
                  "value": "{{country}}",
                  "disabled": true,
                  "description": "Optional marketplace code."
                },
                {
                  "key": "searchCountry",
                  "value": "{{country}}",
                  "disabled": true,
                  "description": "Optional legacy country selector."
                },
                {
                  "key": "search",
                  "value": "{{search}}",
                  "disabled": true,
                  "description": "Optional text search."
                },
                {
                  "key": "sku",
                  "value": "{{sku}}",
                  "disabled": true,
                  "description": "Optional exact SKU filter."
                },
                {
                  "key": "asin",
                  "value": "{{asin}}",
                  "disabled": true,
                  "description": "Optional exact ASIN filter."
                },
                {
                  "key": "rule",
                  "value": "Sicilian",
                  "disabled": true,
                  "description": "Optional rule filter. Alias: filter. Values: 1-4 or Sicilian/Vienna/Gambit/Marshall."
                },
                {
                  "key": "sort",
                  "value": "newest",
                  "disabled": true,
                  "description": "Optional: newest/file_desc/default or oldest/file_asc."
                }
              ]
            },
            "description": "Returns { items } with repricing actions. Optional SKU, ASIN, country, rule filter, and sort params are included disabled for easy toggling."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Pricing history - SKU and rule oldest first",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "GET",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              }
            ],
            "url": {
              "raw": "{{baseUrl}}/pricing-history?sku={{sku}}&filter=Sicilian&sort=oldest&limit=25",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "pricing-history"
              ],
              "query": [
                {
                  "key": "sku",
                  "value": "{{sku}}",
                  "description": "Exact SKU filter."
                },
                {
                  "key": "filter",
                  "value": "Sicilian",
                  "description": "Rule filter."
                },
                {
                  "key": "sort",
                  "value": "oldest",
                  "description": "Oldest first."
                },
                {
                  "key": "limit",
                  "value": "25",
                  "description": "Optional. Defaults to 100, max 1000."
                }
              ]
            },
            "description": "Example pricing-history filter/sort request. Use rule or filter with 1-4 or rule names. sort accepts newest/file_desc/default or oldest/file_asc."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        }
      ]
    },
    {
      "name": "PATCH requests - live changes",
      "description": "These requests require a write-scoped API key and change live account data. Test one SKU or one setting first.",
      "item": [
        {
          "name": "Update repricing settings - country and switches",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"country\": \"GB\",\n  \"repricing\": true,\n  \"auto_cog\": true,\n  \"vat\": \"standard\",\n  \"prep_fee\": \"0.30\"\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/repricing-settings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "repricing-settings"
              ]
            },
            "description": "Updates account-level country and switch-style settings. country accepts marketplace codes such as GB, US, DE, FR; UK normalises to GB. vat accepts numbers or labels such as standard, not registered, and not applicable."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Update repricing settings - standard rules",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"standard_rules\": [\n    {\n      \"rule\": \"Sicilian\",\n      \"profit\": \"3.00\",\n      \"roi_percent\": \"25\",\n      \"automation_days\": \"7\"\n    },\n    {\n      \"rule\": \"Vienna\",\n      \"profit\": \"2.00\",\n      \"roi_percent\": \"20\",\n      \"automation_days\": \"14\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/repricing-settings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "repricing-settings"
              ]
            },
            "description": "Updates standard rule criteria. rule can be 1-4 or Sicilian, Vienna, Gambit, Marshall. automation_days applies to standard rules 1-3."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Update repricing settings - custom mode and custom rules",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"custom_mode\": true,\n  \"custom_rules\": [\n    {\n      \"slot\": 1,\n      \"rule\": \"Sicilian\",\n      \"profit\": \"4.00\",\n      \"roi_percent\": \"30\",\n      \"automation_days\": \"7\"\n    },\n    {\n      \"slot\": 2,\n      \"rule\": \"Vienna\",\n      \"profit\": \"3.00\",\n      \"roi_percent\": \"25\"\n    }\n  ]\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/repricing-settings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "repricing-settings"
              ]
            },
            "description": "Enables custom-rule mode and updates custom rule slots 1-6. Each custom rule can set rule, profit, roi or roi_percent, and automation_days."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Update one SKU by body",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"sku\": \"{{sku}}\",\n  \"cog\": \"12.50\",\n  \"min_price\": \"19.99\",\n  \"max_price\": \"34.99\",\n  \"rule\": \"Vienna\",\n  \"repricing\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/listings",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "listings"
              ]
            },
            "description": "Updates one listing using the sku field in the JSON body. Omitted fields are left unchanged."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        },
        {
          "name": "Update one SKU by path",
          "request": {
            "auth": {
              "type": "bearer",
              "bearer": [
                {
                  "key": "token",
                  "value": "{{apiKey}}",
                  "type": "string"
                }
              ]
            },
            "method": "PATCH",
            "header": [
              {
                "key": "Accept",
                "value": "application/json",
                "type": "text"
              },
              {
                "key": "Content-Type",
                "value": "application/json",
                "type": "text"
              }
            ],
            "body": {
              "mode": "raw",
              "raw": "{\n  \"cog\": \"12.50\",\n  \"min_price\": \"19.99\",\n  \"max_price\": \"34.99\",\n  \"rule\": \"Vienna\",\n  \"repricing\": true\n}",
              "options": {
                "raw": {
                  "language": "json"
                }
              }
            },
            "url": {
              "raw": "{{baseUrl}}/listings/{{sku}}",
              "host": [
                "{{baseUrl}}"
              ],
              "path": [
                "listings",
                "{{sku}}"
              ]
            },
            "description": "Updates one listing using the SKU in the URL path. Omitted fields are left unchanged."
          },
          "event": [
            {
              "listen": "test",
              "script": {
                "type": "text/javascript",
                "exec": [
                  "pm.test('Status is 2xx', function () { pm.expect(pm.response.code).to.be.within(200, 299); });"
                ]
              }
            }
          ]
        }
      ]
    }
  ],
  "variable": [
    {
      "key": "baseUrl",
      "value": "https://account-api.ascentrepricer.com/api/v1",
      "type": "string"
    },
    {
      "key": "apiKey",
      "value": "asc_live_your_api_key_here",
      "type": "string"
    },
    {
      "key": "sku",
      "value": "EXAMPLE-SKU-001",
      "type": "string"
    },
    {
      "key": "recentDays",
      "value": "31",
      "type": "string"
    },
    {
      "key": "country",
      "value": "GB",
      "type": "string"
    },
    {
      "key": "search",
      "value": "nike",
      "type": "string"
    },
    {
      "key": "orderStatus",
      "value": "Shipped",
      "type": "string"
    },
    {
      "key": "since",
      "value": "2026-05-01T00:00:00Z",
      "type": "string"
    },
    {
      "key": "asin",
      "value": "B000EXAMPLE",
      "type": "string"
    }
  ]
}
