# CollectionListing


    <p>A <code>CollectionListing</code> resource represents a <a href="https://help.shopify.com/manual/products/collections">product collection</a> that a
    merchant has made available to your sales channel. Merchants can make collections available to your sales channel
    directly from their Shopify admin.</p>

    <p>You can use this resource to retrieve collections that a merchant has published and display them in your
    marketplace. You can also retrieve a list of published product IDs that belong to a published collection.</p>

    <p>Only sales channels can publish collections using the REST Admin API. You can't publish collections
    and make them available to non-sales channels apps using the REST Admin API.</p>

    <div class="note">
      <h4>Note:</h4>
      <p>When a merchant makes a collection available to your app, the products belonging to that collection are not
      automatically made available. The merchant must make both the collection and each product available to your sales
      channel. </p>
    </div>


## Resource Properties

### CollectionListing

* collection_id: Identifies which collection this listing is for.
  * Type: x-string
  * Example: {"collection_id"=>1053727709}
* body_html: The description of the collection, complete with HTML formatting.
  * Type: x-string
  * Example: "It's a collection of curated products for the home page."
* default_product_image: The default product image for a collection.
  * Type: x-string
  * Example: [{"src"=>"http://example.com/burton.jpg"}]
* image: The image for a collection.
  * Type: x-string
  * Example: [{"src"=>"http://example.com/burton.jpg"}]
* handle: A human-friendly unique string for the Collection automatically generated from its title.
  * Type: x-string
  * Example: "ipod-nano"
* published_at: The date and time when the collection was published. The API returns this in ISO_8601.
  * Type: x-string
  * Example: "2007-12-31T19:00:00-05:00"
* title: The name of the collection.
  * Type: x-string
  * Example: "Home page"
* sort_order:       <p>The order in which products in the collection appear. Valid values are:</p>
      <ul>
        <li><strong>alpha-asc</strong>: Alphabetically, in ascending order (A - Z).</li>
        <li><strong>alpha-desc</strong>: Alphabetically, in descending order (Z - A).</li>
        <li><strong>best-selling</strong>: By best-selling products.</li>
        <li><strong>created</strong>: By date created, in ascending order (oldest - newest).</li>
        <li><strong>created-desc</strong>: By date created, in descending order (newest - oldest).</li>
        <li><strong>manual</strong>: Order created by the shop owner.</li>
        <li><Strong>price-asc</strong>: By price, in ascending order (lowest - highest).</li>
        <li><strong>price-desc</strong>: By price, in descending order (highest - lowest).</li>
      </ul>

  * Type: x-string
  * Example: "alpha-asc"
* updated_at: The date and time when the collection was last modified. The API returns this in ISO_8601.
  * Type: x-string
  * Example: "2012-08-24T14:01:47-04:00"
## Retrieve collection listings that are published to your app

Retrieve collection listings that are published to your app. <strong>Note:</strong> This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to <a href='/api/usage/pagination-rest'>Make paginated requests to the REST Admin API</a>.

### Endpoint
/admin/api/#{api_version}/collection_listings.json (GET)

### Parameters
* api_version (required): 
* limit: Amount of results

### Responses
#### 200
Retrieve collection listings that are published to your app

Examples:
##### Retrieve collection listings that are published to your app
Request:
```
GET /admin/api/unstable/collection_listings.json
```

Response:
```
HTTP/1.1 200 OK
{"collection_listings":[{"collection_id":482865238,"updated_at":"2025-01-02T11:09:43-05:00","body_html":"<p>The best selling ipod ever</p>","default_product_image":null,"handle":"smart-ipods","image":{"created_at":"2025-01-02T11:09:43-05:00","src":"https://cdn.shopify.com/s/files/1/0005/4838/0009/collections/ipod_nano_8gb.jpg?v=1735834183"},"title":"Smart iPods","sort_order":"manual","published_at":"2017-08-31T20:00:00-04:00"},{"collection_id":841564295,"updated_at":"2025-01-02T11:09:43-05:00","body_html":"<p>The best selling ipod ever</p>","default_product_image":null,"handle":"ipods","image":{"created_at":"2025-01-02T11:09:43-05:00","src":"https://cdn.shopify.com/s/files/1/0005/4838/0009/collections/ipod_nano_8gb.jpg?v=1735834183"},"title":"IPods","sort_order":"manual","published_at":"2017-08-31T20:00:00-04:00"},{"collection_id":395646240,"updated_at":"2025-01-02T11:09:43-05:00","body_html":"<p>The best selling ipod ever. Again</p>","default_product_image":{"id":850703190,"created_at":"2025-01-02T11:09:43-05:00","position":1,"updated_at":"2025-01-02T11:09:43-05:00","product_id":632910392,"src":"https://cdn.shopify.com/s/files/1/0005/4838/0009/products/ipod-nano.png?v=1735834183","variant_ids":[],"width":123,"height":456},"handle":"ipods_two","image":null,"title":"IPods Two","sort_order":"manual","published_at":"2017-08-31T20:00:00-04:00"},{"collection_id":691652237,"updated_at":"2025-01-02T11:09:43-05:00","body_html":"<p>No ipods here</p>","default_product_image":null,"handle":"non-ipods","image":null,"title":"Non Ipods","sort_order":"manual","published_at":"2017-08-31T20:00:00-04:00"}]}
```
## Retrieve <code>product_ids</code> that are published to a <code>collection_id</code>

Retrieve <code>product_ids</code> that are published to a <code>collection_id</code>.       <strong>Note:</strong> This endpoint implements pagination by using links that are provided in the response header. To learn more, refer to <a href='/api/usage/pagination-rest'>Make paginated requests to the REST Admin API</a>.

### Endpoint
/admin/api/#{api_version}/collection_listings/{collection_listing_id}/product_ids.json (GET)

### Parameters
* api_version (required): 
* collection_listing_id (required): 
* limit: Amount of results

### Responses
#### 200
Retrieve <code>product_ids</code> that are published to a <code>collection_id</code>

Examples:
##### Retrieve <code>product_ids</code> that are published to a <code>collection_id</code>
Request:
```
GET /admin/api/unstable/collection_listings/841564295/product_ids.json
```

Response:
```
HTTP/1.1 200 OK
{"product_ids":[632910392]}
```
## Retrieve a specific collection listing that is published to your app

Retrieve a specific collection listing that is published to your app

### Endpoint
/admin/api/#{api_version}/collection_listings/{collection_listing_id}.json (GET)

### Parameters
* api_version (required): 
* collection_listing_id (required): 

### Responses
#### 200
Retrieve a specific collection listing that is published to your app

Examples:
##### Retrieve a specific collection listing that is published to your app
Request:
```
GET /admin/api/unstable/collection_listings/482865238.json
```

Response:
```
HTTP/1.1 200 OK
{"collection_listing":{"collection_id":482865238,"updated_at":"2025-01-02T11:09:43-05:00","body_html":"<p>The best selling ipod ever</p>","default_product_image":null,"handle":"smart-ipods","image":{"created_at":"2025-01-02T11:09:43-05:00","src":"https://cdn.shopify.com/s/files/1/0005/4838/0009/collections/ipod_nano_8gb.jpg?v=1735834183"},"title":"Smart iPods","sort_order":"manual","published_at":"2017-08-31T20:00:00-04:00"}}
```
## Create a collection listing to publish a collection to your app

Create a collection listing to publish a collection to your app

### Endpoint
/admin/api/#{api_version}/collection_listings/{collection_listing_id}.json (PUT)

### Parameters
* api_version (required): 
* collection_listing_id (required): 

### Responses
#### 200
Create a collection listing to publish a collection to your app

Examples:
##### Create a collection listing to publish a collection to your app
Request:
```
PUT /admin/api/unstable/collection_listings/482865238.json
{"collection_listing":{"collection_id":482865238}}
```

Response:
```
HTTP/1.1 200 OK
{"collection_listing":{"collection_id":482865238,"updated_at":"2025-01-02T11:09:43-05:00","body_html":"<p>The best selling ipod ever</p>","default_product_image":null,"handle":"smart-ipods","image":{"created_at":"2025-01-02T11:09:43-05:00","src":"https://cdn.shopify.com/s/files/1/0005/4838/0009/collections/ipod_nano_8gb.jpg?v=1735834183"},"title":"Smart iPods","sort_order":"manual","published_at":"2017-08-31T20:00:00-04:00"}}
```
## Delete a collection listing to unpublish a collection from your app

Delete a collection listing to unpublish a collection from your app

### Endpoint
/admin/api/#{api_version}/collection_listings/{collection_listing_id}.json (DELETE)

### Parameters
* api_version (required): 
* collection_listing_id (required): 

### Responses
#### 200
Delete a collection listing to unpublish a collection from your app

Examples:
##### Delete a collection listing to unpublish a collection from your app
Request:
```
DELETE /admin/api/unstable/collection_listings/841564295.json
```

Response:
```
HTTP/1.1 200 OK

```