---
title: "Fetch Upstream Ratios"
method: POST
path: "/api/ratio_sync/fetch"
tags: ["RatioSync"]
---

# Fetch Upstream Ratios

`POST /api/ratio_sync/fetch`

## Request

- Base URL: `https://api.unorouter.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.unorouter.com/api/ratio_sync/fetch`
- Auth: one of:
  - API key in header `Authorization` and API key in header `New-Api-User`
  - API key in header `New-Api-User` and API key in cookie `session`

## Request body

- FetchUpstreamRatiosRequest: FetchUpstreamRatiosRequest schema
  - `channel_ids` integer[], nullable, required
  - `include_unchanged` boolean, required
  - `timeout` integer, required
  - `upstreams` UpstreamDTO[], nullable, required
    - `base_url` string, required
    - `endpoint` string, required
    - `id` integer
    - `name` string, required

## Response `200`

OK

- ResponseDtoFetchUpstreamRatiosResult: Response_dto.FetchUpstreamRatiosResult schema
  - `data` FetchUpstreamRatiosResult, required
    - `differences` object, nullable, required
    - `prices` unknown, required
    - `test_results` TestResult[], nullable, required
      - `error` string
      - `name` string, required
      - `status` string, required
  - `message` string, required
  - `success` boolean, required

## Changes

- **2026-10-29** `cce00298fee5`: 1 breaking
  - added the new required request property `include_unchanged`

[Operation history](https://skmtc.dev/unorouter/apis/new-api/changes/api/ratio_sync/fetch/post.md)

---

[API](https://skmtc.dev/unorouter/apis/new-api.md) - [All operations](https://skmtc.dev/unorouter/apis/new-api/llms.txt) - [OpenAPI document](https://skmtc.dev/unorouter/apis/new-api/revisions/1b50ada14f59?raw)
