> ## Documentation Index
> Fetch the complete documentation index at: https://chariow.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List Products

> Retrieve all published products from your store

Retrieves a cursor-paginated list of all published products in your store. Only products in published status are returned. Supports optional filtering by category, type, or search term.

## Query Parameters

<ParamField query="per_page" type="integer" default="10">
  Number of products to return per page (maximum 100)
</ParamField>

<ParamField query="cursor" type="string">
  Cursor for pagination. Use the `next_cursor` from the previous response to fetch the next page.
</ParamField>

<ParamField query="search" type="string">
  Search products by name or slug
</ParamField>

<ParamField query="category" type="string">
  Filter by product category. Available values: `creative_arts`, `technology`, `business_and_finance`, `personal_development`, `education_and_learning`, `entertainment`, `health_and_wellness`, `literature_and_publishing`, `media_and_communication`, `miscellaneous`
</ParamField>

<ParamField query="type" type="string">
  Filter by product type. Available values: `downloadable`, `service`, `course`, `license`, `bundle`, `coaching`
</ParamField>

## Response

<ResponseField name="message" type="string">
  Response status message
</ResponseField>

<ResponseField name="data" type="object">
  <Expandable title="properties">
    <ResponseField name="data" type="array">
      Array of product objects

      <Expandable title="product object">
        <ResponseField name="id" type="string">
          Unique product identifier (e.g., `prd_abc123`)
        </ResponseField>

        <ResponseField name="name" type="string">
          Product name
        </ResponseField>

        <ResponseField name="slug" type="string">
          URL-friendly product identifier
        </ResponseField>

        <ResponseField name="type" type="string">
          Product type: `downloadable`, `service`, `course`, `license`, `bundle`, or `coaching`
        </ResponseField>

        <ResponseField name="category" type="object">
          <Expandable title="properties">
            <ResponseField name="value" type="string">
              Category value
            </ResponseField>

            <ResponseField name="label" type="string">
              Human-readable category label
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="status" type="string">
          Product status (always `published` for public API)
        </ResponseField>

        <ResponseField name="is_free" type="boolean">
          Whether the product is free
        </ResponseField>

        <ResponseField name="pictures" type="object">
          <Expandable title="properties">
            <ResponseField name="thumbnail" type="string|null">
              Thumbnail image URL
            </ResponseField>

            <ResponseField name="cover" type="string|null">
              Cover image URL
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="pricing" type="object">
          <Expandable title="properties">
            <ResponseField name="type" type="string">
              Pricing type: `free`, `one_time`, or `what_you_want`
            </ResponseField>

            <ResponseField name="current_price" type="object">
              <Expandable title="properties">
                <ResponseField name="value" type="number">
                  Price amount as decimal (e.g., 99.00)
                </ResponseField>

                <ResponseField name="formatted" type="string">
                  Formatted price string (e.g., `$99.00`)
                </ResponseField>

                <ResponseField name="short" type="string">
                  Short formatted price string (e.g., `$99`)
                </ResponseField>

                <ResponseField name="currency" type="string">
                  Currency code (e.g., `USD`)
                </ResponseField>
              </Expandable>
            </ResponseField>

            <ResponseField name="price" type="object">
              Base price (same structure as current\_price)
            </ResponseField>
          </Expandable>
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="pagination" type="object">
      <Expandable title="properties">
        <ResponseField name="next_cursor" type="string|null">
          Cursor for the next page
        </ResponseField>

        <ResponseField name="prev_cursor" type="string|null">
          Cursor for the previous page
        </ResponseField>

        <ResponseField name="has_more" type="boolean">
          Whether more results are available
        </ResponseField>
      </Expandable>
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="errors" type="array">
  Array of error messages (empty on success)
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET "https://api.chariow.com/v1/products?per_page=20&type=course" \
    -H "Authorization: Bearer sk_live_YOUR_API_KEY"
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api.chariow.com/v1/products?per_page=20&type=course', {
    headers: {
      'Authorization': 'Bearer sk_live_YOUR_API_KEY'
    }
  });
  const { data } = await response.json();
  console.log(data);
  ```

  ```php PHP theme={null}
  $ch = curl_init('https://api.chariow.com/v1/products?per_page=20&type=course');
  curl_setopt($ch, CURLOPT_HTTPHEADER, [
      'Authorization: Bearer sk_live_YOUR_API_KEY'
  ]);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);
  $data = json_decode($response, true);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      'https://api.chariow.com/v1/products',
      params={'per_page': 20, 'type': 'course'},
      headers={'Authorization': 'Bearer sk_live_YOUR_API_KEY'}
  )
  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json Success Response (200) theme={null}
  {
    "message": "success",
    "data": {
      "data": [
        {
          "id": "prd_abc123",
          "name": "Premium Course",
          "slug": "premium-course",
          "type": "course",
          "category": {
            "value": "education_and_learning",
            "label": "Education and Learning"
          },
          "status": "published",
          "is_free": false,
          "pictures": {
            "thumbnail": "https://cdn.chariow.com/products/abc123/thumb.jpg",
            "cover": "https://cdn.chariow.com/products/abc123/cover.jpg"
          },
          "pricing": {
            "type": "one_time",
            "current_price": {
              "value": 99.00,
              "formatted": "$99.00",
              "short": "99",
              "currency": "USD"
            },
            "price": {
              "value": 99.00,
              "formatted": "$99.00",
              "short": "99",
              "currency": "USD"
            }
          }
        },
        {
          "id": "prd_def456",
          "name": "Pro Software License",
          "slug": "pro-software",
          "type": "license",
          "category": {
            "value": "technology",
            "label": "Technology"
          },
          "status": "published",
          "is_free": false,
          "pictures": {
            "thumbnail": null,
            "cover": null
          },
          "pricing": {
            "type": "one_time",
            "current_price": {
              "value": 49.00,
              "formatted": "$49.00",
              "short": "49",
              "currency": "USD"
            },
            "price": {
              "value": 49.00,
              "formatted": "$49.00",
              "short": "49",
              "currency": "USD"
            }
          }
        }
      ],
      "pagination": {
        "next_cursor": "eyJpZCI6NTB9",
        "prev_cursor": null,
        "has_more": true
      }
    },
    "errors": []
  }
  ```

  ```json Unauthorised (401) theme={null}
  {
    "message": "Unauthorised",
    "data": [],
    "errors": ["Invalid API key"]
  }
  ```
</ResponseExample>
