Skip to main content
Collections group products into navigable storefronts sections and support nested sub-collections. Articles are blog-style content entries attached to a Blog and support full-text search. Tags are free-form labels that can be attached to any taggable resource (product, customer, order, article, page, and more) via the polymorphic Taggable join table. All four resources are scoped to the authenticated tenant company. Base URL https://api.genuka.com · Auth Authorization: Bearer <token> + X-Company: <companyId> · See Getting Started for shared conventions, pagination & error formats.

Endpoints at a glance


Collections

A Collection groups products for navigation and merchandising. Collections support a single level of nesting via parent_collection_id and carry a cover image stored through Spatie Media Library (with micro, thumb, and large conversions).

GET /2023-11/admin/collections

List collections for the authenticated company with filtering, sorting, and optional relation includes.
  • Query parameters:
Request example:
Success response 200 OK:
Error responses:
  • 400 — Missing X-Company header (company_id_required)
  • 401 — Invalid or expired token
  • 403 — Token lacks the required OAuth scope (invalid_scope)

POST /2023-11/admin/collections

Create a new collection. The handle is slugified from the handle field, falling back to title. Returns a 500-level error (as a runtime exception) if a collection with the resulting handle already exists for this company.
  • Request body:
Request example:
Success response 200 OK:
Error responses:
  • 400 — Missing X-Company header
  • 401 — Invalid token
  • 500 — A collection with this handle already exists for the company

GET /2023-11/admin/collections/handle/{collection}

Retrieve a single collection by its URL handle.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — No collection with this handle exists for the company

GET /2023-11/admin/collections/{collection}

Retrieve a single collection by its ULID.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Collection not found

PUT /2023-11/admin/collections/{collection}

Update an existing collection. All fields are optional; only supplied fields are changed. Setting uploadImageUrl or uploadImageBase64 replaces the existing cover media. Setting parent_collection_id to null (or omitting it) clears the parent.
  • Path parameters:
  • Request body:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Collection not found

DELETE /2023-11/admin/collections/{collection}

Delete a collection. The response body is empty (no 204 status code is set explicitly by this endpoint; the Laravel response defaults to 200 with no body).
  • Path parameters:
Request example:
Success response 200 OK: Empty body. Error responses:
  • 401 — Invalid token
  • 404 — Collection not found

POST /2023-11/admin/collections/{collection}/products/link

Attach one or more products to a collection. Duplicate attach errors are swallowed and reported in the errors array without failing the whole request.
  • Path parameters:
  • Request body:
Request example:
Success response 200 OK:
If some products could not be linked (e.g. already attached), their error messages are listed in errors:
Error responses:
  • 401 — Invalid token
  • 404 — Collection not found

GET /2023-11/collections

Public endpoint — list collections scoped to the company identified by X-Company. Supports the same filters, includes, and sorts as the admin list endpoint. Request example:
Success response 200 OK:
Error responses:
  • 400 — Missing X-Company header

GET /2023-11/collections/count

Return the total number of collections for the company. Request example:
Success response 200 OK:
Error responses:
  • 400 — Missing X-Company header

GET /2023-11/collections/handle/{collection}

Public — retrieve a single collection by handle.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 404 — Collection not found

GET /2023-11/collections/handle/{collection}/products

Public — list all products belonging to the collection identified by handle. Returns the full ProductDetailResource shape for each product.
  • Path parameters:
Request example:
Success response 200 OK:
The response is an unwrapped JSON array (no pagination wrapper), reflecting all products in the collection.
Error responses:
  • 404 — Collection not found

GET /2023-11/collections/{collection}

Public — retrieve a single collection by ULID.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 404 — Collection not found

GET /2023-11/collections/{collection}/products

Public — list all products belonging to the collection identified by ULID. Identical behavior to the handle variant.
  • Path parameters:
Request example:
Success response 200 OK:
The response is an unwrapped JSON array (no pagination wrapper), reflecting all products in the collection.
Error responses:
  • 404 — Collection not found

Articles

Articles are rich-content entries (blog posts, guides) associated with a Blog and optionally tagged. Each article can carry a cover image and be toggled between draft and published.

POST /2023-11/admin/articles

Create a new article.
  • Request body:
Request example:
Success response 200 OK:
Error responses:
  • 400 — Missing X-Company header
  • 401 — Invalid token

GET /2023-11/admin/articles

List articles for the authenticated company with filtering, sorting, and optional includes.
  • Query parameters:
Request example:
Success response 200 OK:
Error responses:
  • 400 — Missing X-Company header
  • 401 — Invalid token

GET /2023-11/admin/articles/handle/{article}

Retrieve a single article by its URL handle.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Article not found

GET /2023-11/admin/articles/{article}

Retrieve a single article by ULID.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Article not found

PUT /2023-11/admin/articles/{article}

Update an article. All fields are optional; only the supplied fields are changed.
  • Path parameters:
  • Request body:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Article not found

DELETE /2023-11/admin/articles/{article}

Permanently delete an article.
  • Path parameters:
Request example:
Success response 204 No Content: Empty body. Error responses:
  • 401 — Invalid token
  • 404 — Article not found

GET /2023-11/articles

Public — list articles for the company. Supports the same filters, includes, and sorts as the admin list endpoint. Request example:
Success response 200 OK:

GET /2023-11/articles/count

Return the total number of articles for the company. Request example:
Success response 200 OK:

GET /2023-11/articles/handle/{article}

Public — retrieve a single article by handle.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 404 — Article not found

GET /2023-11/articles/{article}

Public — retrieve a single article by ULID.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 404 — Article not found

Tags

Tags are company-scoped labels attached to any supported resource through a polymorphic taggables join table. Supported taggable types are: shop, customer, order, user, product, blog, page, article. The tag create and index endpoints can optionally target a specific resource by passing model_type + model_id.

GET /2023-11/admin/tags

List all tags for the company. Optionally retrieve only tags for a specific resource instance by passing model_type and model_id.
  • Query parameters:
Request example:
Success response 200 OK:
When model_type + model_id are provided, the response is an unwrapped JSON array of tag objects (no pagination wrapper).
Error responses:
  • 400 — Missing X-Company header
  • 401 — Invalid token
  • 404 — Resource (model_type/model_id) not found
  • 422model_type is not one of the allowed values

POST /2023-11/admin/tags

Create a new tag for the company. If a tag with the same name already exists, the existing tag is returned (idempotent). Optionally attach the new (or existing) tag directly to a resource by supplying model_type and model_id.
  • Request body:
Request example:
Success response 201 Created (new tag) or 200 OK (existing tag returned):
Error responses:
  • 401 — Invalid token
  • 404 — Resource (model_type/model_id) not found
  • 422name required or model_type not in allowed list

GET /2023-11/admin/tags/{tag}

Retrieve a single tag by ULID. Include ?includes=taggables to load all attached taggable pivot records with their associated taggable entities.
  • Path parameters:
  • Query parameters:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Tag not found

PUT /2023-11/admin/tags/{tag}

Rename a tag.
  • Path parameters:
  • Request body:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Tag not found
  • 422name required

DELETE /2023-11/admin/tags/{tag}

Delete a tag. The taggables pivot rows are removed via database cascade.
  • Path parameters:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Tag not found

POST /2023-11/admin/tags/{tag}/restore

Restore a soft-deleted tag.
Note: The restore method is declared in the route but is not yet implemented in TagController. Calling this endpoint will result in a 500 error until the method is added.
  • Path parameters:
Request example: Request body: None — no body required for this action endpoint.
Success response 200 OK (anticipated once implemented):
Error responses:
  • 500 — Method not implemented

GET /2023-11/admin/tags/{tag}/taggables

List all taggable pivot records for a specific tag, with pagination and filtering.
  • Path parameters:
  • Query parameters:
Request example:
Success response 200 OK:
Error responses:
  • 401 — Invalid token
  • 404 — Tag not found

Taggables

The Taggable resource represents a single tag–resource association. Most write operations (create, show by handle, update, show, destroy) are stub endpoints — their controller methods are registered but have no implementation, and will return an empty 200 OK or unexpected behavior until implemented.
The only fully implemented endpoints in this resource group are List and the tag-scoped List taggables described under Tags.

POST /2023-11/admin/taggables

Create a taggable association. Not implemented — the store method is an empty stub.
  • Request body (anticipated — not validated by the stub):
Request example:
Success response 200 OK:
Returns an empty 200 OK until the method is implemented.

GET /2023-11/admin/taggables

List all taggable pivot records for the company, filtered to records whose tag belongs to the authenticated company.
  • Query parameters:
Request example:
Success response 200 OK:
Error responses:
  • 400 — Missing X-Company header
  • 401 — Invalid token

GET /2023-11/admin/taggables/handle/{taggable}

Retrieve a taggable by handle. Not implemented — the show method is an empty stub.
  • Path parameters:
Success response 200 OK:
Returns an empty 200 OK until the method is implemented.

GET /2023-11/admin/taggables/{taggable}

Retrieve a single taggable by ULID. Not implemented — the show method is an empty stub.
  • Path parameters:
Success response 200 OK:
Returns an empty 200 OK until the method is implemented.

PUT /2023-11/admin/taggables/{taggable}

Update a taggable record. Not implemented — the update method is an empty stub.
  • Path parameters:
  • Request body (anticipated — not validated by the stub):
Success response 200 OK:
Returns an empty 200 OK until the method is implemented.

DELETE /2023-11/admin/taggables/{taggable}

Delete a taggable record. Not implemented — the destroy method is an empty stub.
  • Path parameters:
Success response 200 OK:
Returns an empty 200 OK until the method is implemented.