---
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/get-markets-published-products'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/market/get-markets-published-products.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/:markets_id/products.json
```

## Base URL

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

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

## Required Permissions

* `read_products`

## Request

### Path Parameters

* `markets_id`

  string (required)

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

### Query Parameters

* `limit`

  string (optional)

  要查询的商品 ID 的数量限制。 <br/>
  取值范围：1-250  <br/>
  默认值：`50`  

* `page_info`

  string (optional)

  分页查询的唯一标识，用于定位特定页面。
  
  该字段值需要在你已经查询完分页信息后，在该接口响应头中的 `link` 字段值中获取。例如，你获取到的 `link` 的值为 `<https://{handle}.myshopline.com/admin/openapi/{version}/markets/:markets_id/products.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel="next"` ，那么 `page_info `的值为 `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9` 。
  
  关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。

### 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

* `link`

  提供分页数据的 URL 链接。你可以获取该字段值中的 `page_info` 信息用于下一次分页请求中。
  
  当你请求的页面存在上一页或下一页的时候，该字段会被返回。关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。

* `traceId`

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

### Response Body

#### 200

* `products_count`

  integer

  在市场中发布的商品数量。

* `product_ids`

  array<string>

  在市场中发布的商品 ID 列表。


#### 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": "UeBInMTT",
  "parameters": [
    {
      "name": "markets_id",
      "in": "path",
      "description": "市场的唯一标识 ID。<br/>\n最大长度限制：64 ",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "markets_id",
        "description": "市场的唯一标识 ID。<br/>\n最大长度限制：64 ",
        "type": "string",
        "example": "2805879435494983497000"
      },
      "example": "2805879435494983497000",
      "examples": {
        "查询市场发布的商品列表": {
          "value": "6608773158211162343"
        }
      }
    },
    {
      "name": "limit",
      "in": "query",
      "description": "要查询的商品 ID 的数量限制。 <br/>\n取值范围：1-250  <br/>\n默认值：`50`  ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "limit",
        "description": "要查询的商品 ID 的数量限制。 <br/>\n取值范围：1-250  <br/>\n默认值：`50`  ",
        "type": "string"
      },
      "examples": {
        "查询市场发布的商品列表": {
          "value": "50"
        }
      }
    },
    {
      "name": "page_info",
      "in": "query",
      "description": "分页查询的唯一标识，用于定位特定页面。\n\n该字段值需要在你已经查询完分页信息后，在该接口响应头中的 `link` 字段值中获取。例如，你获取到的 `link` 的值为 `<https://{handle}.myshopline.com/admin/openapi/{version}/markets/:markets_id/products.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel=\"next\"` ，那么 `page_info `的值为 `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9` 。\n\n关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "page_info",
        "description": "分页查询的唯一标识，用于定位特定页面。 该字段值需要在你已经查询完分页信息后，在该接口响应头中的 `link` 字段值中获取。例如，你获取到的 `link` 的值为 `<https://\\{handle\\}.myshopline.com/admin/openapi/\\{version\\}/products/products.json?limit=1&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel=\"next\"`，那么 `page_info` 的值为 `eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9`。  \n\n关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。",
        "type": "string"
      },
      "examples": {
        "查询市场发布的商品列表": {
          "value": "eyJzaW5jZUlkIjoiMTYwNjYyMTQ5NDMwNDQ1NTUzMjI0MTI2MDAiLCJkaXJlY3Rpb24iOiJuZXh0In0"
        }
      }
    },
    {
      "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": {
        "link": {
          "description": "提供分页数据的 URL 链接。你可以获取该字段值中的 `page_info` 信息用于下一次分页请求中。\n\n当你请求的页面存在上一页或下一页的时候，该字段会被返回。关于更多如何使用分页信息，请参考 [分页机制](https://developer.shopline.com/zh-hans-cn/docs/apps/api-instructions-for-use/paging-mechanism.md)。",
          "example": "\\<https://{handle}.myshopline.com/admin/openapi/{version}/markets/:markets_id/products.json?limit=20&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJuZXh0IiwibGltaXQiOjF9>; rel='previous',<https://{handle}.myshopline.com/admin/openapi/{version}/markets/:markets_id/products.json?limit=20&page_info=eyJzaW5jZUlkIjoiMTYwNTc1OTAxNTM4OTA4Mjk1MjExMTI3ODgiLCJkaXJlY3Rpb24iOiJwcmUiLCJsaW1pdCI6MX0=\\>; rel='next'"
        },
        "traceId": {
          "description": "请求的全局唯一标识符。用于追踪请求在系统中的流转，以便于问题发生时进行定位和调试。"
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "products_count": {
                "name": "products_count",
                "description": "在市场中发布的商品数量。",
                "type": "integer",
                "example": 50
              },
              "product_ids": {
                "name": "product_ids",
                "description": "在市场中发布的商品 ID 列表。",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "16057850264845250791280282",
                  "16057850264845250333280282"
                ]
              }
            },
            "example": {
              "product_ids": [
                "16057850264845250791280282",
                "16057850264845250333280282"
              ],
              "products_count": 50
            }
          },
          "examples": {
            "查询市场发布的商品列表": {
              "description": "查询市场发布的商品列表。",
              "value": {
                "product_ids": [
                  "16065793365869904616712340",
                  "16065793323425393631512340",
                  "16065690901535908341382340",
                  "16065690895797261611862340",
                  "16064130513208279099762340",
                  "16064130513114830006072340",
                  "16063827081911638501372340",
                  "16063827068327294480742340",
                  "16063826695322974362142340",
                  "16063826691183699652712340",
                  "16063824173154264755072340",
                  "16063434376948322207362340",
                  "16063434197904221869752340",
                  "16061634995776701135972340",
                  "16061246306308668863802340",
                  "16060405504526209790962788",
                  "16060405487448010311972788",
                  "16060405479426320035142788",
                  "16060405465922339097612788",
                  "16060389009008390587282788",
                  "16060388517788618662442788",
                  "16060388466424500983352788",
                  "16060168249162080005412788",
                  "16060138163779023693422788",
                  "16060128949221969178472788",
                  "16060128836758418310932788",
                  "16060128823883918292452788",
                  "16060128351674074473402788",
                  "16060128291745020059602788",
                  "16060128252554617897002788",
                  "16059678845260925524882788",
                  "16059678778391472401032788",
                  "16059677572514140705172788",
                  "16059625605167943573222788",
                  "16059625605010405484432788",
                  "16059358474019188528132788",
                  "16059211472066521570672788",
                  "16057660312387633863902788",
                  "16057660305330297953112788",
                  "16057660223136032411232788",
                  "16057660172527392801092788",
                  "16057590153890829521112788"
                ],
                "products_count": 42
              }
            }
          }
        }
      }
    },
    "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/:markets_id/products.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"
  ]
}
```