---
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/remove-market-products'
  md: 'https://developer.shopline.com/zh-hans-cn/docs/admin-rest-api/market/remove-market-products.md'
---
# 从市场批量移除商品

批量移除指定市场中的商品。

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

## Endpoint

```http
POST /markets/:markets_id/unpublished_products.json
```

## Base URL

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

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

## Required Permissions

* `write_products`

## Request

### Path Parameters

* `markets_id`

  string (required)

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

### 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 格式传入。

### Request Body

* `product_ids`

  array<string>

  待移除的商品 ID。<br/> 
  最大个数限制：50

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

* `product_ids`

  array<string>

  在市场中移除的商品 ID 列表。


#### 401

* `errors`

  string

  错误描述。


#### 429

* `errors`

  string

  错误描述。


## OpenAPI Definition

```json
{
  "tags": [
    "从市场批量移除商品"
  ],
  "description": "批量移除指定市场中的商品。",
  "externalDocs": {
    "description": "接口使用的权限点: `write_products` ，更多权限点使用信息，请参考:",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=zh-hans-cn",
    "errorTableDescription": ""
  },
  "operationId": "JEFF3UAJ",
  "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": "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"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "name": "body",
          "description": "body位置参数",
          "type": "object",
          "properties": {
            "product_ids": {
              "name": "product_ids",
              "description": "待移除的商品 ID。<br/> \n最大个数限制：50",
              "type": "array",
              "items": {
                "type": "string"
              },
              "example": [
                "16057850264845250791280282",
                "16057850264845250333280282"
              ]
            }
          },
          "required": [
            "product_ids"
          ],
          "example": {
            "product_ids": [
              "16057850264845250791280282",
              "16057850264845250333280282"
            ]
          }
        },
        "examples": {
          "指定市场批量移除商品": {
            "description": "指定市场批量移除商品。",
            "value": {
              "product_ids": [
                "16058862795553170089862029",
                "16058910402019758566912029",
                "16058910656495731699282029",
                "16058980574022724890832029",
                "16059302701405621916822029",
                "16060418737484868223952029",
                "16060927716840157184432029",
                "16062026862565743752732925",
                "16062240622699840897282925",
                "16062313089907661290242925"
              ],
              "market_id": "6608773158211162343"
            }
          }
        }
      }
    },
    "required": true
  },
  "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": {
              "product_ids": {
                "name": "product_ids",
                "description": "在市场中移除的商品 ID 列表。",
                "type": "array",
                "items": {
                  "type": "string"
                },
                "example": [
                  "16057850264845250791280282",
                  "16057850264845250333280282"
                ]
              }
            },
            "example": {
              "product_ids": [
                "16057850264845250791280282",
                "16057850264845250333280282"
              ]
            }
          },
          "examples": {
            "指定市场批量移除商品": {
              "description": "指定市场批量移除商品。",
              "value": {
                "product_ids": [
                  "16058862795553170089862029",
                  "16058910402019758566912029",
                  "16058910656495731699282029",
                  "16058980574022724890832029",
                  "16059302701405621916822029",
                  "16060418737484868223952029",
                  "16060927716840157184432029",
                  "16062026862565743752732925",
                  "16062240622699840897282925",
                  "16062313089907661290242925"
                ]
              }
            }
          }
        }
      }
    },
    "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": "post",
  "path": "/markets/:markets_id/unpublished_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": [
    "write_products"
  ]
}
```