Base URL
Base URL: https://kneady.dev/api/v1
Authentication
All endpoints require authentication using an API key passed in the x-api-key
header.
Request Header
x-api-key: your-api-key
GET /sites/[siteId]/products
Retrieve all product pages for a site. Product pages are returned in descending order by creation date.
Products Path Parameters
siteId
: The unique identifier of the site
Products Query Parameters
limit
(optional): Number of product pages to return. If not provided, returns all product pages. Example:/sites/\{siteId\}/products?limit=10
Products Response
Success Response (200 OK)
{ "count": number, "posts": [ { "id": "string", "title": "string", "description": "string", "image": "string", "imageBlurhash": "string", "slug": "string", "createdAt": "string (ISO date)", "updatedAt": "string (ISO date)", "published": boolean, "price": "string", "link": "string", "cta": "string" } ], "url": "string", "customUrl": "string" }
Products Error Responses
400 Bad Request
: Missing x-api-key header or siteId401 Unauthorized
: Invalid API key404 Not Found
: No products found500 Internal Server Error
: Server error while processing request
GET /sites/[siteId]/products/[productId]
Retrieve a specific product page by ID.
GET Path Parameters
siteId
: The unique identifier of the siteproductId
: The unique identifier of the product page
GET Response
Success Response (200 OK)
{ "title": "string", "description": "string", "image": "string", "imageBlurhash": "string", "slug": "string", "createdAt": "string (ISO date)", "updatedAt": "string (ISO date)", "published": boolean, "price": "string", "link": "string", "cta": "string", "url": "string", "customUrl": "string" }
GET Error Responses
400 Bad Request
: Missing x-api-key header or required parameters401 Unauthorized
: Invalid API key404 Not Found
: Product not found500 Internal Server Error
: Server error while processing request
PATCH /sites/[siteId]/products/[productId]
Update a specific product page by ID.
PATCH Path Parameters
siteId
: The unique identifier of the siteproductId
: The unique identifier of the product page
PATCH Request Body
All fields are optional. Only provided fields will be updated.
Request Body
{ "title": "string", "description": "string", "image": "string", "slug": "string", "content": "string", "published": boolean, "price": "string", "link": "string", "cta": "string" }
PATCH Notes
- If
slug
is provided as an empty string or null, a new random 7-character slug will be generated - When an image is updated, a new blurhash will be automatically generated
- If
price
is empty or null, it defaults to "Free" - If
link
is empty or null, it defaults to the root domain - If
cta
is empty or null, it defaults to "Check Availability"
PATCH Response
Success Response (200 OK)
{ "title": "string", "description": "string", "image": "string", "imageBlurhash": "string", "slug": "string", "createdAt": "string (ISO date)", "updatedAt": "string (ISO date)", "published": boolean, "price": "string", "link": "string", "cta": "string", "url": "string", "customUrl": "string" }
PATCH Error Responses
400 Bad Request
: Missing x-api-key header or required parameters401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error while processing request
DELETE /sites/[siteId]/products/[productId]
Delete a specific product page by ID.
DELETE Path Parameters
siteId
: The unique identifier of the siteproductId
: The unique identifier of the product page
DELETE Response
./
Product successfully deleted
DELETE Error Responses
400 Bad Request
: Missing x-api-key header or required parameters401 Unauthorized
: Invalid API key500 Internal Server Error
: Server error while processing request