---
title: "查询商品在各市场的价格范围"
description: "查询商品在指定国家或地区所对应市场的价格范围。"
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/market/query-the-market-price-ranges-of-the-product'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/market/query-the-market-price-ranges-of-the-product.md'
---
# 查询商品在各市场的价格范围

查询商品在指定国家或地区所对应市场的价格范围。

- **Base URL:** `https://{handle}.myshopline.com/admin/openapi`
- **Required Scopes:** `read_products`
- **API Version:** v20270301
- **API Type:** Admin
- **API Protocol:** RESTful

## Endpoint

```http
GET /markets/:product_id/price/range.json
```

## Base URL

* `https://{handle}.myshopline.com/admin/openapi`

  * `{handle}`: `handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。

## Required Permissions

* `read_products`

## Request

### Path Parameters

* `product_id`

  string (required)

  商品的唯一标识 ID。<br/>
  最大长度限制：64 

### Query Parameters

* `country_codes`

  string (required)

  遵循 [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) 国际标准的二位国家或地区码，用于识别市场所在的国家或地区。多个码用英文逗号分隔。最多支持 10 个码。

### Request Headers

* `Content-Type`

  string (required)

  字段值固定为 `application/json; charset=utf-8`。

* `Authorization`

  string (required)

  资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。

## Response

### Status Codes

* `200`

  更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。

### Response Body

#### 200

* `market_prices`

  array<object>

  所查询的市场及对应的商品价格范围。

  * `min_market_price`

    object

    当前市场下的商品最低售价。

    * `amount`

      string

      市场售价金额。金额单位为对应币种的最小货币单位。

    * `currency_code`

      string

      三位币种码，遵循 [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) 国际标准。

  * `country_code`

    string

    遵循 [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) 国际标准的二位国家或地区码，用于识别市场所在的国家或地区。

  * `max_market_price`

    object

    当前市场下的商品最高售价。

    * `amount`

      string

      市场售价金额。金额单位为对应币种的最小货币单位。

    * `currency_code`

      string

      三位币种码，遵循 [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) 国际标准。


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "查询商品在各市场的价格范围"
  ],
  "description": "查询商品在指定国家或地区所对应市场的价格范围。",
  "externalDocs": {
    "description": "接口使用的权限点: `read_products` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "RjZhMx8P",
  "parameters": [
    {
      "name": "product_id",
      "in": "path",
      "description": "商品的唯一标识 ID。<br/>\n最大长度限制：64 ",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "product_id",
        "description": "商品的唯一标识 ID。<br/>\n最大长度限制：64 ",
        "type": "string",
        "example": "16060895302856191591063144"
      },
      "example": "16060895302856191591063144",
      "examples": {
        "查询商品在各市场的价格范围": {
          "value": "16060895302856191591063144"
        }
      }
    },
    {
      "name": "country_codes",
      "in": "query",
      "description": "遵循 [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) 国际标准的二位国家或地区码，用于识别市场所在的国家或地区。多个码用英文逗号分隔。最多支持 10 个码。",
      "required": true,
      "style": "form",
      "explode": true,
      "schema": {
        "name": "country_codes",
        "description": "遵循 [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) 国际标准的二位国家或地区码，用于识别市场所在的国家或地区。多个码用英文逗号分隔。最多支持 10 个码。",
        "type": "string",
        "example": "CN,US"
      },
      "example": "CN,US",
      "examples": {
        "查询商品在各市场的价格范围": {
          "value": "SG,US"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "字段值固定为 `application/json; charset=utf-8`。",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": "资源的访问令牌。参考 [应用授权](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/app-authorization.md?lang=zh-hans-cn) 获取访问令牌，然后将获取到的访问令牌以 Bearer 格式传入。",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "更多状态码信息，参考 [HTTP 状态码](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/http-status-code.md?lang=zh-hans-cn)。",
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "market_prices": {
                "name": "market_prices",
                "description": "所查询的市场及对应的商品价格范围。",
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "min_market_price": {
                      "name": "min_market_price",
                      "description": "当前市场下的商品最低售价。",
                      "type": "object",
                      "properties": {
                        "amount": {
                          "name": "amount",
                          "description": "市场售价金额。金额单位为对应币种的最小货币单位。",
                          "type": "string",
                          "example": "1099"
                        },
                        "currency_code": {
                          "name": "currency_code",
                          "description": "三位币种码，遵循 [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) 国际标准。",
                          "type": "string",
                          "example": "CNY"
                        }
                      },
                      "example": {
                        "amount": "1099",
                        "currency_code": "CNY"
                      }
                    },
                    "country_code": {
                      "name": "country_code",
                      "description": "遵循 [ISO 3166-1](https://www.iso.org/iso-3166-country-codes.html) 国际标准的二位国家或地区码，用于识别市场所在的国家或地区。",
                      "type": "string",
                      "example": "CN"
                    },
                    "max_market_price": {
                      "name": "max_market_price",
                      "description": "当前市场下的商品最高售价。",
                      "type": "object",
                      "properties": {
                        "amount": {
                          "name": "amount",
                          "description": "市场售价金额。金额单位为对应币种的最小货币单位。",
                          "type": "string",
                          "example": "2099"
                        },
                        "currency_code": {
                          "name": "currency_code",
                          "description": "三位币种码，遵循 [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) 国际标准。",
                          "type": "string",
                          "example": "CNY"
                        }
                      },
                      "example": {
                        "amount": "2099",
                        "currency_code": "CNY"
                      }
                    }
                  },
                  "example": {
                    "country_code": "CN",
                    "max_market_price": {
                      "amount": "2099",
                      "currency_code": "CNY"
                    },
                    "min_market_price": {
                      "amount": "1099",
                      "currency_code": "CNY"
                    }
                  }
                },
                "example": [
                  {
                    "max_market_price": {
                      "amount": "2099",
                      "currency_code": "CNY"
                    },
                    "min_market_price": {
                      "amount": "1099",
                      "currency_code": "CNY"
                    },
                    "country_code": "CN"
                  }
                ]
              }
            },
            "example": {
              "market_prices": [
                {
                  "country_code": "CN",
                  "max_market_price": {
                    "amount": "2099",
                    "currency_code": "CNY"
                  },
                  "min_market_price": {
                    "amount": "1099",
                    "currency_code": "CNY"
                  }
                }
              ]
            }
          },
          "examples": {
            "查询商品在各市场的价格范围": {
              "description": "查询商品在各市场的价格范围。",
              "value": {
                "market_prices": [
                  {
                    "max_market_price": {
                      "amount": "13500",
                      "currency_code": "SGD"
                    },
                    "min_market_price": {
                      "currency_code": "SGD",
                      "amount": "12200"
                    },
                    "country_code": "SG"
                  },
                  {
                    "country_code": "US",
                    "max_market_price": {
                      "amount": "10000",
                      "currency_code": "USD"
                    },
                    "min_market_price": {
                      "amount": "9000",
                      "currency_code": "USD"
                    }
                  }
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "错误描述。",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/markets/:product_id/price/range.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` ：店铺的唯一标识符，值为店铺域名的前缀。例如，域名为 `open001.myshopline.com` 的店铺，其 `handle` 是 `open001` 。"
        }
      }
    }
  ],
  "info": {
    "title": "查询商品在各市场的价格范围",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_products"
  ]
}
```