List Products
Retrieve a paginated list of Easycart products linked to a course. The list is the live paywall and it has no preview_url. See Paywall.
Request
GET /players/{id}/products
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | Yes | Course UUID. See Identifiers. |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
page | integer | 1 | Page number. A missing, non-numeric, zero, or negative value is treated as 1 and does not return an error. A page past the end returns an empty data array and 200. |
per_page | integer | 25 | Items per page (min: 1, max: 100). Anything else is 422. |
Example Request
curl -X GET "https://app.easy.tools/api/v1/players/8f3c1a62-d047-4e89-9b25-1c6a4d8e0f71/products?page=1&per_page=25" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Accept: application/json"
Response
Success Response (200)
{
"data": [
{
"product_id": "2f1c0a2e-7b3d-4e1a-9c55-0a1b2c3d4e5f",
"product_name": "Course",
"variant_ids": null,
"missing": false
}
],
"pagination": {
"current_page": 1,
"total_pages": 1,
"per_page": 25,
"total": 1
}
}
Response Fields
Each entry in data has the fields described in Product Link Object. variant_ids null means every current and future variant. A product Easycart no longer resolves is a row with missing true. See Missing products.
include=products on Get Course returns this same collection in one array, without pagination. Zero links is [].
Pagination Object
See Pagination Object. total is the number of product links on the course.
Error Responses
Not Found Error (404)
See Identifiers.
{
"error": {
"code": "RESOURCE_NOT_FOUND",
"message": "Resource not found"
}
}
Validation Error (422 Unprocessable Entity)
{
"error": {
"code": "VALIDATION_ERROR",
"message": "The given data was invalid",
"details": {
"per_page": ["per_page must not be greater than 100"]
}
}
}
A workspace that is not connected to an Easycart store also returns 422 VALIDATION_ERROR.
Bad Gateway Error (502)
Easycart answered, but not with a result the API can use.
{
"error": {
"code": "UPSTREAM_ERROR",
"message": "EasyCart rejected the request"
}
}
Service Unavailable Error (503)
Easycart is unreachable or failing. Retry later.
{
"error": {
"code": "SERVICE_UNAVAILABLE",
"message": "EasyCart is unavailable"
}
}
Authentication, permission, and rate-limit errors are described in Authorization.