> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://api-docs.papertracc.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://api-docs.papertracc.com/_mcp/server.

# Get Collection

GET https://api.papertracc.com/v1/store/collections/{handle}

Returns a collection with one page of its products. The handle `all` returns every published product. The page details sit inside `data`.

**Keys:** public key or secret key.

Reference: https://api-docs.papertracc.com/storefront/catalogue/collections/get-collection

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.
- `identity` header (required) — The identity for the active workspace.

## Servers

- `https://api.papertracc.com/v1` (Production, default)
- `https://api.papertracc.com/rc-1` (Release Candidate 1)

## Request

### Path parameters

- `handle` (string, required) — The record's handle.

### Query parameters

- `q` (string, optional) — Search text, limited to the collection.
- `sort_by` (enum, optional) — Order of the results. Newest first when omitted.
  - Allowed values: `title-ascending`, `title-descending`, `created-ascending`, `price-ascending`, `price-descending`
- `country` (string, optional) — Market to price for, as a two- or three-letter country code (`NG` or `NGA`). Defaults to the channel's default country.
- `page` (integer, optional, default: 1) — Page number, starting at 1. Ignored when `last_id` and `keyset` are sent.
- `size` (integer, optional, default: 20) — Records per page. Defaults to 20, capped at 50.
- `last_id` (string, optional) — The `last_id` from the previous response. Send it with `keyset` to get the next page. Omit both for the first page.
- `keyset` (string, optional) — The `keyset` from the previous response. Send it with `last_id`. Copy it as it is; don't build or change it.

## Response

### 200

Successfully fetched collection

- `status` (boolean, required) — Always `true` on success.
- `message` (string, required) — Human-readable outcome.
- `data` (CollectionPage, required)

## Errors

### 400 Bad Request Error

The `channel` header is missing, the body is not valid JSON, or a field failed validation.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 401 Unauthorized Error

The API key is missing or invalid, the key owner is no longer an active member of the organisation, or the key owner is not a member of the workspace in the `identity` header.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 402 Payment Required Error

The workspace's subscription plan does not include the Open API.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

### 404 Not Found Error

The sales channel, or the record the request names, does not exist or is not published to this channel.

- `status` (boolean, required) — Always `false` on a failed request.
- `message` (string, required) — What went wrong, written for the shopper or the developer.
- `error_code` (string, optional) — Present on `402` responses.

## Types

### CollectionPage

- `collection` (Collection, required)
- `products` (list of ProductCard, required)
- `count` (integer, required) — Products in the collection that match the request.
- `pages` (integer, required)
- `page` (integer, required) — The page returned. `0` when the request used `last_id` and `keyset`.
- `sort` (string, required) — Order that was applied.
- `keyset` (string, required, nullable) — Send back as `keyset`, with `last_id`, to get the next page. `null` when there are no more records.
- `last_id` (string, required, nullable) — Send back as `last_id`, with `keyset`, to get the next page. `null` when there are no more records.

### Collection

- `id` (string, required, nullable) — `null` for the built-in `all` collection.
- `handle` (string, required) — URL-safe identifier.
- `title` (string, required) — Collection title.
- `description` (string, required, nullable)
- `image` (Image, required, nullable)
- `sort_order` (string, required) — Default product order for the collection.
- `products_count` (integer, required)

### ProductCard

Product summary used in lists.

- `id` (string, required)
- `handle` (string, required) — URL-safe identifier, unique in the workspace.
- `title` (string, required) — Product title.
- `vendor` (string, required, nullable)
- `product_type` (string, required, nullable)
- `tags` (list of string, required)
- `featured_image` (Image, required, nullable)
- `second_image` (Image, required, nullable)
- `price` (PriceRange, required)
- `available` (boolean, required) — Whether at least one variant can be bought now.
- `variants_count` (integer, required)
- `default_variant_id` (string, required, nullable) — First variant that can be bought. Use it for a one-click add to cart.
- `selling_unit` (string, required) — Unit the product is sold in.
- `unit_price` (UnitPrice, required, nullable) — Price per reference measure, for example per kilogram.
- `kind` (enum, required) — Whether the product is a physical good or a service.
  - Allowed values: `GOODS`, `SERVICE`
- `price_on_request` (boolean, required) — The price is agreed at the point of sale, so the product cannot be added to a cart.
- `sell_mode` (enum, required) — Set when every variant of the product sells the same way and that way is not `STOCK`, so you can badge the card, for example "Pre-order". `null` otherwise; read `sell_mode` on each variant from Get Product.
  - Allowed values: `BACKORDER`, `PREORDER`, `MADE_TO_ORDER`

### Image

- `id` (string, required)
- `src` (string, required) — Absolute image URL.
- `alt` (string, required) — Alternative text. Falls back to the file name.
- `type` (string, required) — Media type.
- `width` (integer, required) — Width in pixels, `0` when unknown.
- `height` (integer, required) — Height in pixels, `0` when unknown.

### PriceRange

- `currency` (string, required) — ISO 4217 code.
- `min_price` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `max_price` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `compare_at_min_price` (string, required, nullable) — Original price of the cheapest variant when it is on sale.

### UnitPrice

Price per reference measure, for example per kilogram.

- `amount` (string, required) — Decimal amount as a string, in the currency shown alongside it.
- `quantity_value` (string, required) — Size of one selling unit.
- `quantity_unit` (string, required) — Unit of `quantity_value`.
- `reference_value` (string, required) — Size the unit price is quoted for.
- `reference_unit` (string, required) — Unit of `reference_value`.

## Examples

**Response**

```json
{
  "status": true,
  "message": "Successfully fetched collection",
  "data": {
    "collection": {
      "id": "string",
      "handle": "new-arrivals",
      "title": "New arrivals",
      "description": "string",
      "image": {
        "id": "string",
        "src": "https://cdn.papertracc.com/projects/acme/products/silk-scarf.jpg",
        "alt": "Blue silk scarf",
        "type": "image",
        "width": 1,
        "height": 1
      },
      "sort_order": "created-descending",
      "products_count": 1
    },
    "products": [
      {
        "id": "string",
        "handle": "silk-scarf",
        "title": "Silk scarf",
        "vendor": "string",
        "product_type": "string",
        "tags": [
          "string"
        ],
        "featured_image": {
          "id": "string",
          "src": "https://cdn.papertracc.com/projects/acme/products/silk-scarf.jpg",
          "alt": "Blue silk scarf",
          "type": "image",
          "width": 1,
          "height": 1
        },
        "second_image": {
          "id": "string",
          "src": "https://cdn.papertracc.com/projects/acme/products/silk-scarf.jpg",
          "alt": "Blue silk scarf",
          "type": "image",
          "width": 1,
          "height": 1
        },
        "price": {
          "currency": "NGN",
          "min_price": "25000.00",
          "max_price": "32000.00",
          "compare_at_min_price": "string"
        },
        "available": true,
        "variants_count": 1,
        "default_variant_id": "string",
        "selling_unit": "EACH",
        "unit_price": {
          "amount": "5000.00",
          "quantity_value": "500",
          "quantity_unit": "G",
          "reference_value": "1",
          "reference_unit": "KG"
        },
        "kind": "GOODS",
        "price_on_request": true,
        "sell_mode": "PREORDER"
      }
    ],
    "count": 1,
    "pages": 1,
    "page": 1,
    "sort": "created-descending",
    "keyset": "string",
    "last_id": "string"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.papertracc.com/v1/store/collections/handle"

headers = {
    "channel": "channel",
    "Authorization": "Bearer <apiKey>"
}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.papertracc.com/v1/store/collections/handle';
const options = {method: 'GET', headers: {channel: 'channel', Authorization: 'Bearer <apiKey>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.papertracc.com/v1/store/collections/handle"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("channel", "channel")
	req.Header.Add("Authorization", "Bearer <apiKey>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.papertracc.com/v1/store/collections/handle")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["channel"] = 'channel'
request["Authorization"] = 'Bearer <apiKey>'

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.papertracc.com/v1/store/collections/handle")
  .header("channel", "channel")
  .header("Authorization", "Bearer <apiKey>")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.papertracc.com/v1/store/collections/handle', [
  'headers' => [
    'Authorization' => 'Bearer <apiKey>',
    'channel' => 'channel',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.papertracc.com/v1/store/collections/handle");
var request = new RestRequest(Method.GET);
request.AddHeader("channel", "channel");
request.AddHeader("Authorization", "Bearer <apiKey>");
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "channel": "channel",
  "Authorization": "Bearer <apiKey>"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.papertracc.com/v1/store/collections/handle")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```