---
title: "Get a product collection relationship"
description: "Get a product collection relationship."
doc_type: openapi
doc_category: openapi
doc_version: v20270301
source_url:
  html: 'https://developer.shopline.com/docs/admin-rest-api/product/collection-relationship/get-a-product-collection-relationship'
  md: 'https://developer.shopline.com/docs/admin-rest-api/product/collection-relationship/get-a-product-collection-relationship.md'
---
# Get a product collection relationship

Get a product collection relationship.

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

## Endpoint

```http
GET /products/collects/:collect_id.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

* `read_products`

## Request

### Path Parameters

* `collect_id`

  string (required)

  The unique identifier for the product collection relationship.

### Query Parameters

* `fields`

  string (optional)

  Specify the fields to be returned, with multiple fields separated by commas. For available fields, refer to the top-level child parameters under the `collect` object in the response. 

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

* `collect`

  object

  Information on the product collection relationship. 

  * `collection_id`

    string

    The unique identifier for the collection.

  * `created_at`

    string

    The date and time when the product collection relationship was created. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).

  * `id`

    long

    The unique identifier for the product collection relationship.

  * `product_id`

    string

    The unique identifier for the product. 

  * `product_priority`

    long

    The priority of a product within a collection. A smaller value indicates a higher priority. The priority values are non-continuous and are not arranged in sequential integers.

  * `sort_value`

    string

    Product sorting value within a collection. Constructed by left-padding the `product_priority` value with zeros to reach a total length of 20 characters.

  * `updated_at`

    string

    The date and time when the product collection relationship was last updated. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).


#### 401

* `errors`

  string

  Error message. 


#### 429

* `errors`

  string

  Error message. 


## OpenAPI Definition

```json
{
  "tags": [
    "Get a product collection relationship"
  ],
  "description": "Get a product collection relationship.",
  "externalDocs": {
    "description": "Permission point used by the interface is `read_products` , For more information about the use of permission points, see",
    "url": "ec20/3cv5d7wpfgr6a8z5/xabczf5442284vkq?lang=en",
    "errorTableDescription": ""
  },
  "operationId": "NY6APGGG",
  "parameters": [
    {
      "name": "collect_id",
      "in": "path",
      "description": "The unique identifier for the product collection relationship.",
      "required": true,
      "style": "simple",
      "schema": {
        "name": "collect_id",
        "description": "The unique identifier for the product collection relationship.",
        "type": "string",
        "example": 5392284410644534000
      },
      "example": 5392284410644534000,
      "examples": {
        "Get a product collection relationship": {
          "value": "5511053632568035000"
        }
      }
    },
    {
      "name": "fields",
      "in": "query",
      "description": "Specify the fields to be returned, with multiple fields separated by commas. For available fields, refer to the top-level child parameters under the `collect` object in the response. ",
      "style": "form",
      "explode": true,
      "schema": {
        "name": "fields",
        "description": "Specify the fields to be returned, with multiple fields separated by commas. For available fields, refer to the top-level child parameters under the `collect` object in the response. ",
        "type": "string",
        "example": "collection_id,product_id"
      },
      "example": "collection_id,product_id",
      "examples": {
        "Get a product collection relationship": {
          "value": ""
        }
      }
    },
    {
      "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": {
              "collect": {
                "name": "collect",
                "description": "Information on the product collection relationship. ",
                "type": "object",
                "properties": {
                  "collection_id": {
                    "name": "collection_id",
                    "description": "The unique identifier for the collection.",
                    "type": "string",
                    "example": "12248721639068681442230282"
                  },
                  "created_at": {
                    "name": "created_at",
                    "description": "The date and time when the product collection relationship was created. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).",
                    "type": "string",
                    "example": "2021-09-03T14:11:54+00:00"
                  },
                  "id": {
                    "name": "id",
                    "description": "The unique identifier for the product collection relationship.",
                    "type": "long",
                    "example": 5332942101495347000
                  },
                  "product_id": {
                    "name": "product_id",
                    "description": "The unique identifier for the product. ",
                    "type": "string",
                    "example": "16053328646530847836660114"
                  },
                  "product_priority": {
                    "name": "product_priority",
                    "description": "The priority of a product within a collection. A smaller value indicates a higher priority. The priority values are non-continuous and are not arranged in sequential integers.",
                    "type": "long",
                    "example": 10000000000000
                  },
                  "sort_value": {
                    "name": "sort_value",
                    "description": "Product sorting value within a collection. Constructed by left-padding the `product_priority` value with zeros to reach a total length of 20 characters.",
                    "type": "string",
                    "example": "00000010000000000000"
                  },
                  "updated_at": {
                    "name": "updated_at",
                    "description": "The date and time when the product collection relationship was last updated. Format: [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html).",
                    "type": "string",
                    "example": "2021-09-03T14:11:54+00:00"
                  }
                },
                "example": {
                  "collection_id": "12248721639068681442230282",
                  "created_at": "2021-09-03T14:11:54+00:00",
                  "id": 5332942101495347000,
                  "product_id": "16053328646530847836660114",
                  "product_priority": 10000000000000,
                  "sort_value": "00000010000000000000",
                  "updated_at": "2021-09-03T14:11:54+00:00"
                }
              }
            },
            "example": {
              "collect": {
                "product_priority": 10000000000000,
                "sort_value": "00000010000000000000",
                "updated_at": "2021-09-03T14:11:54+00:00",
                "collection_id": "12248721639068681442230282",
                "created_at": "2021-09-03T14:11:54+00:00",
                "id": 5332942101495347000,
                "product_id": "16053328646530847836660114"
              }
            }
          },
          "examples": {
            "Get a product collection relationship": {
              "description": "Get a product collection relationship.",
              "value": {
                "collect": {
                  "product_id": "16054491142433826754900282",
                  "product_priority": 10000000000000,
                  "sort_value": "00000010000000000000",
                  "updated_at": "2022-07-26T13:15:03+08:00",
                  "collection_id": "12249026592161154694000282",
                  "created_at": "2022-07-26T13:15:03+08:00",
                  "id": 5511053632568035000
                }
              }
            }
          }
        }
      }
    },
    "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": "/products/collects/:collect_id.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 product collection relationship",
    "version": "v20270301"
  },
  "authIndexes": [
    "read_products"
  ]
}
```