---
title: "Get a list of product IDs for a collection on a sales channel"
description: >
  Get a list of product IDs for a specified collection on the current sales channel.
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/sales-channels/query-sales-channels-specify-collection-product-id'
  md: 'https://developer.shopline.com/docs/admin-rest-api/sales-channels/query-sales-channels-specify-collection-product-id.md'
---
# Get a list of product IDs for a collection on a sales channel

Get a list of product IDs for a specified collection on the current sales channel.

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

## Endpoint

```http
GET /collection_listings/:collection_listing_id/product_ids.json
```

## Base URL

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

  * `{handle}`: `handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` .

## Required Permissions

* `write_product_listings`

## Request

### Path Parameters

* `collection_listing_id`

  string (required)

  The unique identifier for the collection.  <br/>
  Maximum length: 64

### Query Parameters

* `limit`

  string (optional)

  Maximum number of product IDs to be returned in the query.  <br/>
  Value range: 1-250  <br/>
  Default value: 50  

### Request Headers

* `Content-Type`

  string (required)

  The field must be set to the fixed value `application/json; charset=utf-8`.

* `Authorization`

  string (required)

   The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. 

## Response

### Status Codes

* `200`

  For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).

* `401`

  

* `429`

  

### Response Headers

* `traceId`

  A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise.

### Response Body

#### 200

* `product_ids`

  array<string>

  A list of product IDs.


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "tags": [
    "Get a list of product IDs for a collection on a sales channel"
  ],
  "description": "Get a list of product IDs for a specified collection on the current sales channel.",
  "externalDocs": {
    "description": "Permission point used by the interface is `write_product_listings` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": "| Error Code | HTTP Status Code | Error Description |\n|------------|------------------|-------------------|\n| TOO_MANY_REQUESTS | 429 | You sent too many requests. |\n| DATA_NOT_EXIST | 404 | The requested data does not exist. |\n| SUCCESS | 200 | request success |\n| SYSTEM_ERROR | 500 | system error |\n| PARAM_ILLEGAL | 422 | illegal param |\n"
  },
  "operationId": "QYddvv3s",
  "parameters": [
    {
      "name": "limit",
      "in": "query",
      "description": "Maximum number of product IDs to be returned in the query.  <br/>\nValue range: 1-250  <br/>\nDefault value: 50  ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "limit",
        "description": "Maximum number of product IDs to be returned in the query.  <br/>\nValue range: 1-250  <br/>\nDefault value: 50  ",
        "type": "string"
      },
      "examples": {
        "Get product IDs for a specified collection": {
          "value": "50"
        }
      }
    },
    {
      "name": "collection_listing_id",
      "in": "path",
      "description": "The unique identifier for the collection.  <br/>\nMaximum length: 64",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "collection_listing_id",
        "description": "The unique identifier for the collection.  <br/>\nMaximum length: 64",
        "type": "string",
        "example": "12271246965752684049451235"
      },
      "example": "12271246965752684049451235",
      "examples": {
        "Get product IDs for a specified collection": {
          "value": "12259764246208273857373144"
        }
      }
    },
    {
      "name": "Content-Type",
      "in": "header",
      "description": "The field must be set to the fixed value `application/json; charset=utf-8`.",
      "required": true,
      "schema": {
        "name": "Content-Type",
        "type": "string",
        "example": "application/json; charset=utf-8"
      }
    },
    {
      "name": "Authorization",
      "in": "header",
      "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
      "required": true,
      "style": "string",
      "schema": {
        "name": "Authorization",
        "description": " The access token for the API resource. Refer to [App authorization](https://developer.shopline.com/docs/apps/api-instructions-for-use/app-authorization.md?lang=en) to obtain the access token, and then pass the obtained token in the Bearer format. ",
        "type": "string",
        "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
      },
      "example": "Bearer eyJhbGciOiJIUzUxMiIsInR5cCI6IkpXVCJ9.eyJhcHBJZCI6MCwiYXBwS2V5IjoiNzU2ZjI1NWE2NjdlZTcwNTk1MzM0ZjVjYzk4NzU5MzBmN2E3NGZjMSIsImV4cCI6MTg3OTQ4MjA3NiwiaXNzIjoieXNvdWwiLCJzZWxsZXJJZCI6IjIwMDAyMzQ4ODAiLCJzdG9yZUlkIjoiMTY3MjM2OTcyOTYwNiIsInRpbWVzdGFtcCI6MTc4NDc4NzY3NjY2MSwidmVyc2lvbiI6IlYyIn0.3ZzbGAH4cLU1QR2VPEvMOQInUDvus-C4amkINSQIPuNVlXsFKj0sAt1c0KnUy9MWUOFV9cHlkf7J90r2y1FzpA"
    }
  ],
  "responses": {
    "200": {
      "description": "For the complete list of codes and messages, see [Http status code](https://developer.shopline.com/docs/apps/api-instructions-for-use/http-status-code.md?lang=en).",
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "name": "body",
            "type": "object",
            "properties": {
              "product_ids": {
                "name": "product_ids",
                "description": "A list of product IDs.",
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "example": {
              "product_ids": null
            }
          },
          "examples": {
            "Get product IDs for a specified collection": {
              "description": "Get product IDs for a specified collection.",
              "value": {
                "product_ids": [
                  "16060878916899800731963144",
                  "16060878914758692511253144",
                  "16060878908674770588483144",
                  "16060878906566210188893144",
                  "16060878902926560859813144",
                  "16060878900384309254383144",
                  "16060878893067429883503144",
                  "16060878859910114569133144",
                  "16060878853599197112313144",
                  "16060878850545743695513144",
                  "16060878847266804612583144",
                  "16060878844217209993043144",
                  "16060878842253940305683144",
                  "16060878828158562308823144",
                  "16060878812694163432133144",
                  "16060878809745399885323144",
                  "16060878805157334623403144",
                  "16060878793894789540103144",
                  "16060878788425249427503144",
                  "16060878780250550864763144",
                  "16060878769549874798573144"
                ]
              }
            }
          }
        }
      }
    },
    "401": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    },
    "429": {
      "headers": {
        "traceId": {
          "description": "A globally unique identifier for the request. It is used to track the request flow throughout the system, allowing for easy location and debugging when issues arise."
        }
      },
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "errors": {
                "description": "Error message. ",
                "type": "string"
              }
            },
            "required": [
              "errors"
            ]
          }
        }
      }
    }
  },
  "security": [
    {
      "oauth2": []
    }
  ],
  "method": "get",
  "path": "/collection_listings/:collection_listing_id/product_ids.json",
  "servers": [
    {
      "url": "https://{handle}.myshopline.com/admin/openapi",
      "variables": {
        "handle": {
          "default": "openapiceshidianpu",
          "description": "`handle` : The store's unique identifier, which is the prefix of the store's domain name. For example, if a store's domain name is `open001.myshopline.com` , the store handle is `open001` ."
        }
      }
    }
  ],
  "info": {
    "title": "Get a list of product IDs for a collection on a sales channel",
    "version": "v20270301"
  },
  "authIndexes": [
    "write_product_listings"
  ]
}
```